implementations.sweeper_classes.generic_implicit_MPI module¶
- class SweeperMPI(params)[source]¶
Bases:
sweeper
MPI based sweeper where each rank administers one collocation node. Adapt sweepers to MPI by use of multiple inheritance. See for example the generic_implicit_MPI sweeper, which has a class definition:
` class generic_implicit_MPI(SweeperMPI, generic_implicit): `
this means in inherits both from SweeperMPI and generic_implicit. The hierarchy works such that functions are first called from SweeperMPI and then from generic_implicit. For instance, in the __init__ function, the SweeperMPI class adds a communicator and nothing else. The generic_implicit implicit class adds a preconditioner and so on. It’s a bit confusing because self.params is overwritten in the second call to the __init__ of the core sweeper class, but the SweeperMPI class adds parameters to the params dictionary, which will again be added in generic_implicit.
- property comm¶
- compute_end_point()[source]¶
Compute u at the right point of the interval
The value uend computed here is a full evaluation of the Picard formulation unless do_full_update==False
- Returns:
None
- compute_residual(stage=None)[source]¶
Computation of the residual using the collocation matrix Q
- Parameters:
stage (str) – The current stage of the step the level belongs to
- predict()[source]¶
Predictor to fill values at nodes before first sweep
Default prediction for the sweepers, only copies the values to all collocation nodes and evaluates the RHS of the ODE there
- property rank¶
- class generic_implicit_MPI(params)[source]¶
Bases:
SweeperMPI
,generic_implicit
Generic implicit sweeper parallelized across the nodes. Please supply a communicator as comm to the parameters!
- rank¶
MPI rank
- Type:
int
- compute_end_point()[source]¶
Compute u at the right point of the interval
The value uend computed here is a full evaluation of the Picard formulation unless do_full_update==False
- Returns:
None