Meshes, Models, and Fields

emg3d.meshes Module

Everything related to meshes appropriate for the multigrid solver.

Functions

construct_mesh(frequency, properties, center) Return a TensorMesh for given parameters.
get_origin_widths(frequency, properties, center) Return origin and cell widths for given parameters.
skin_depth(frequency, conductivity[, mu]) Return skin depth for provided frequency and conductivity.
wavelength(skin_depth) Return the wavelength.
good_mg_cell_nr([max_nr, max_prime, min_div]) Returns ‘good’ cell numbers for the multigrid method.
min_cell_width(skin_depth[, pps, limits]) Return the minimum cell width.
get_hx_h0(freq, res, domain[, fixed, …]) Return cell widths and origin for given parameters.
get_cell_numbers(max_nr[, max_prime, min_div])
get_stretched_h(min_width, domain, nx[, x0, …]) Return cell widths for a stretched grid within the domain.
get_domain([x0, freq, res, limits, …]) Get domain extent and minimum cell width as a function of skin depth.
get_hx(alpha, domain, nx, x0[, resp_domain]) Return cell widths for given input.

Classes

TensorMesh([h, origin]) A slightly modified discretize.TensorMesh.

emg3d.models Module

Everything to create model-properties for the multigrid solver.

Classes

Model(grid[, property_x, property_y, …]) Create a model instance.
VolumeModel(grid, model, sfield) Return a volume-averaged version of provided model.

emg3d.maps Module

Interpolation routines mapping grids to grids, grids to fields, and fields to grids.

Functions

grid2grid(grid, values, new_grid[, method, …]) Interpolate values located on grid to new_grid.
interp3d(points, values, new_points, method, …) Interpolate values in 3D either linearly or with a cubic spline.
edges2cellaverages(ex, ey, ez, vol, out_x, …) Interpolate fields defined on edges to volume-averaged cell values.

Classes

MapConductivity() Maps σ to computational variable σ (conductivity).
MapLgConductivity() Maps log_10(σ) to computational variable σ (conductivity).
MapLnConductivity() Maps log_e(σ) to computational variable σ (conductivity).
MapResistivity() Maps ρ to computational variable σ (conductivity).
MapLgResistivity() Maps log_10(ρ) to computational variable σ (conductivity).
MapLnResistivity() Maps log_e(ρ) to computational variable σ (conductivity).

emg3d.fields Module

Everything related to the multigrid solver that is a field: source field, electric and magnetic fields, and fields at receivers.

Functions

get_source_field(grid, src, freq[, strength]) Return the source field.
get_receiver(grid, values, coordinates[, …]) Return values corresponding to grid at coordinates.
get_receiver_response(grid, field, rec) Return the field (response) at receiver coordinates.
get_h_field(grid, model, field) Return magnetic field corresponding to provided electric field.

Classes

Field Create a Field instance with x-, y-, and z-views of the field.
SourceField Create a Source-Field instance with x-, y-, and z-views of the field.