edges2cellaverages

emg3d.maps.edges2cellaverages(ex, ey, ez, vol, out_x, out_y, out_z)[source]

Interpolate fields defined on edges to volume-averaged cell values.

Parameters:
ex, ey, ez : ndarray

Electric fields in x-, y-, and z-directions, as obtained from emg3d.fields.Field.

vol : ndarray

Volumes of the grid, as obtained from emg3d.meshes.TensorMesh.

out_x, out_y, out_z : ndarray

Arrays where the results are placed (per direction).