get_origin_widths

emg3d.meshes.get_origin_widths(frequency, properties, center, domain=None, vector=None, seasurface=None, **kwargs)[source]

Return origin and cell widths for given parameters.

This function works in one dimension only, and is used by construct_mesh() once in each direction. It is recommended to use directly function construct_mesh(), which returns a TensorMesh.

All the parameters are described in construct_mesh(). Described here are only the differences.

Parameters:
All : description

All parameters are described in construct_mesh(). The only difference is that here only variables for one direction are accepted.

verb : int

If 1 verbose, if 0 silent (default); if -1 it returns the info as string instead of printing it.

raise_error : bool, optional

If True, an error is raised if no suitable grid is found. Otherwise it just returns None’s (used by construct_mesh). Default is True.

Returns:
origin : float

Origin of the mesh.

widths : ndarray

Cell widths of mesh.

info : str

Info, only if ``verb<0`.