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.

raise_error : bool, optional

If True, an error is raised if no suitable grid is found. Otherwise it just prints a message and returns None’s. Default is True.

Returns:
origin : float

Origin of the mesh.

widths : ndarray

Cell widths of mesh.