Mesh

A general Mesh class representing data points in n-dimensions in either a structured, unstructured, or semi-structured manner. Exists mostly to provides a unified interface to difference FD and Surface methods.

MeshError: MeshError
MeshType: MeshType

 

__new__(cls, data, mesh_type=None, allow_indeterminate=None): 
  • griddata: np.ndarray

    the raw grid-point data the mesh uses

  • mesh_type: None | str

    the type of mesh we have

  • opts: Any

 

__init__(self, *args, **kwargs): 

 

__array_finalize__(self, mesh): 

 

@property
mesh_spacings(self): 

 

@property
subgrids(self): 

 

@property
bounding_box(self): 

 

@property
dimension(self): 

Returns the dimension of the grid (not necessarily ndim)

  • :returns: int

 

@property
npoints(self): 

Returns the number of gridpoints in the mesh

  • :returns: int

 

@property
gridpoints(self): 

Returns the flattened set of gridpoints for a structured tensor grid and otherwise just returns the gridpoints

  • :returns: _

 

get_npoints(g): 

Returns the number of gridpoints in the grid

  • g: np.ndarray
  • :returns: int

 

get_gridpoints(g): 

Returns the gridpoints in the grid

  • g: np.ndarray
  • :returns: int

 

get_mesh_subgrids(grid, tol=None): 

Returns the subgrids for a mesh

  • grid: Any
  • tol: Any
  • :returns: _

 

get_mesh_spacings(grid, tol=None): 

 

get_mesh_type(grid, check_product_grid=True, check_regular_grid=True, tol=None): 

Determines what kind of grid we’re working with

  • grid: np.ndarray
  • :returns: MeshType

    m e s h _ t y p e

 

RegularMesh(*mesh_specs): 

Builds a grid from multiple linspace arguments, basically insuring it’s structured (if non-Empty)

  • mesh_specs: Any
  • :returns: _

Feedback

Examples

Templates

Documentation