PyPFASST is an object-orientated implementation of the PFASST algorithm.
User interactions with PyPFASST are typically marshaled through the :py~pfasst.pfasst.PFASST
class. This class acts as the overall controller of the algorithm. Implementing a PDE solver in PyPFASST generally consists of the following steps:
- Instantiate the :py
~pfasst.pfasst.PFASST
controller. - Add each level of the grid/solver hierarchy, along with appropriate interpolation and restriction operations, to the controller.
- Call the :py
~pfasst.pfasst.PFASST.run
method of the controller.
Note that if you add only level, then the PFASST algorithm reduces to a serial SDC integrator. In this case it does not make sense to use multiple time processors. If you add multiple levels but only one time processors, then the PFASST algorithm reduces to a space/time multigrid version of SDC (MGSDC).
Each level of the grid hierarchy consists of:
A SDC itegrator. PyPFASST includes once pre-packaged general purpose IMEX SDC integrator:
- :py
~pfasst.imex.IMEXSDC
for implicit/explicit schemes.
Users are free to provide their own SDC integrators as extensions of the :py
~pfasst.sdc.SDC
class.- :py
- A function evaluator. These are loosely coupled to the SDC integrator used for the level. For the pre-packaged SDC integrators mentioned above, the user should extend the :py
~pfasst.imex.IMEXFEval
to provide their function evaluations. - Spatial interpolation and restriction operators.
Levels are added to the controller from finest (level 0) to coarsest using the controllers :py~pfasst.pfasst.PFASST.add_level
method. Internally, each level is represented by an instance of the :py~pfasst.level.Level
class.
Each level has an associated SDC integrator. The SDC integrators are implemented as extensions of the base :py~pfasst.sdc.SDC
class. User implementations must override the :py~pfasst.sdc.SDC.sweep
method.
The constructor of the base :py~pfasst.sdc.SDC
class uses the :py~pfasst.quadrature
module to load precomputed SDC integration matrices. The base class also provides a :py~pfasst.sdc.SDC.residual
method for computing residuals.
Each level has an associated function evaluator. The function evaluators are implemented as extensions of the base :py~pfasst.feval.FEval
class, but are typically implemented as extensions of either the :py~pfasst.imex.IMEXFEval
class or as dictated by the SDC integrator.
Each function evaluation class must set its shape and size attributes appropriately (see :py~pfasst.feval.FEval
).
XXX: description of how the interpolation and restriction routines are called.
XXX: description of how time interpolation and restriction is done.
XXX: description of hooks, state etc.