discretize.utils.refine_tree_xyz(mesh, xyz, method='radial', octree_levels=[1, 1, 1], octree_levels_padding=None, finalize=False, min_level=0, max_distance=inf)[source]

Refine a TreeMesh based on xyz point locations

  • mesh (TreeMesh) – The TreeMesh object to be refined
  • xyz (numpy.ndarray) – 2D array of points
  • method (str) –

    Method used to refine the mesh based on xyz locations

    • ”radial”: Based on radial distance xyz and cell centers
    • ”surface”: Along triangulated surface repeated vertically
    • ”box”: Inside limits defined by outer xyz locations
  • octree_levels (list) – Minimum number of cells around points in each k octree level [N(k), N(k-1), …]
  • octree_levels_padding (list) – Padding cells added to the outer limits of the data each octree levels used for method= “surface” and “box” [N(k), N(k-1), …].
  • finalize (bool) – True | [False] Finalize the TreeMesh
  • max_distance (float) – Maximum refinement distance from xyz locations. Used for method=”surface” to reduce interpolation distance.


Return type:


Examples using discretize.utils.refine_tree_xyz