BaseMesh¶
-
class
emg3d.meshes.
BaseMesh
(h, origin, **kwargs)[source]¶ Bases:
object
Minimal TensorMesh for internal multigrid computation.
The base mesh has everything that is needed within
emg3d.solver.solve
, but nothing more.- Parameters
- h[array_like, array_like, array_like]
Cell widths in x, y, and z directions.
- originarray_like
Origin (x, y, z).
Examples
In [1]: import emg3d ...: import numpy as np ...: In [2]: # Create a simple grid, 8 cells of length 100 m in each ...: # direction, centered around the origin. ...: hx = np.ones(8)*100 ...: grid = emg3d.meshes.BaseMesh( ...: [hx, hx, hx], origin=(-400, -400, -400)) ...: grid # QC grid ...: Out[2]: TensorMesh: 8 x 8 x 8 (512)
Attributes Summary
Construct cell volumes of the 3D model as 1D array.
Attributes Documentation
-
cell_volumes
¶ Construct cell volumes of the 3D model as 1D array.