origin_and_widths#
- emg3d.meshes.origin_and_widths(frequency, properties, center, domain=None, vector=None, seasurface=None, **kwargs)[source]#
Return origin and cell widths for given parameters.
Calculate and return the starting point (origin) and cell widths given the input parameters. The output can be used as input (for one dimension) to create a
emg3d.meshes.TensorMesh
. The function is used byconstruct_mesh
once in each direction.Note
The parameters are described in
construct_mesh
. Described here are only the differences. It is recommended to use directlyconstruct_mesh
.- Parameters
- verbint, default: 0
If 1 verbose, if 0 silent, if -1 it returns the info as string instead of printing it.
- raise_errorbool, default: True
If True, an error is raised if no suitable grid is found. Otherwise it just returns None’s (used by
construct_mesh
).
- Returns
- originfloat
Origin of the mesh.
- widthsndarray
Cell widths of mesh.
- infostr, returned if verb<0
Info.