restriction¶
- emg3d.solver.restriction(model, sfield, residual, sc_dir)[source]¶
Downsampling of grid, model, and fields to a coarser grid.
The restriction of the residual is used as source term for the coarse grid.
Corresponds to Equations 8 and 9 and surrounding text in [Muld06]. In the case of the restriction of the residual, this function is a wrapper for the jitted functions
emg3d.core.restrict_weights
andemg3d.core.restrict
(consult these functions for more details and corresponding theory).This function is called by
emg3d.solver.multigrid
.- Parameters
- modelVolumeModel
Input model; a
emg3d.models.Model
instance.- sfieldField
Input source field; a
emg3d.fields.Field
instance.- sc_dirint
Direction of semicoarsening.
- Returns
- cmodelVolumeModel
Coarse model.
- csfieldField
Coarse source field. Corresponds to restriction of fine-grid residual.
- cefieldField
Coarse electric field, complex zeroes.