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_weightsandemg3d.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.Modelinstance.- sfieldField
Input source field; a
emg3d.fields.Fieldinstance.- 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.