Module of routines to run PFASST
This is the main interface to pfasst. It examines the parameters and decides which subroutine to call to execute the code correctly Set the number of time steps to do The user can either pass in the number of time steps or pass in the time step size and length of run Allocate stuff for holding results
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout), | target | :: | pf | The complete PFASST structure |
|
class(pf_encap_t), | intent(in) | :: | q0 | The initial condition |
||
real(kind=pfdp), | intent(in) | :: | dt | The time step for each processor |
||
real(kind=pfdp), | intent(in) | :: | tend | The final time of run |
||
integer, | intent(in), | optional | :: | nsteps | The number of time steps |
|
class(pf_encap_t), | intent(inout), | optional | :: | qend | The computed solution at tend |
|
integer, | intent(in), | optional | :: | flags(:) | User defnined flags |
PFASST Predictor. Subroutine to initialize the solution on each processor The goal is to have a solution at each level and each node set to a consistent value When this is called, the value of q0 at the fine level on each processor has been set somehow (see q0_style below)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout), | target | :: | pf | PFASST main data structure |
|
real(kind=pfdp), | intent(in) | :: | t0 | Initial time of this processor |
||
real(kind=pfdp), | intent(in) | :: | dt | time step |
||
integer, | intent(in), | optional | :: | flags(:) | User defined flags |
Subroutine to test residuals to determine if the current processor has converged.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | |||
logical, | intent(out) | :: | residual_converged | Return true if residual is below tolerances |
Subroutine to check if the current processor has converged and to update the next processor on the status Note that if the previous processor hasn't converged yet (pstatus), the current processor can't be converged yet either Check to see if tolerances are met
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | |||
integer, | intent(in) | :: | send_tag | identifier for status send and receive |
PFASST controller for block mode When starting a new block, broadcast new initial conditions to all procs For initial block, this is done when initial conditions are set Reset some flags Pack away your last solution Everyone resets their q0 Just stick qend in q0 Update the step and t0 variables for new block Call the predictor to get an initial guess on all levels and all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout), | target | :: | pf | ||
class(pf_encap_t), | intent(in) | :: | q0 | |||
real(kind=pfdp), | intent(in) | :: | dt | |||
integer, | intent(in) | :: | nsteps | |||
class(pf_encap_t), | intent(inout), | optional | :: | qend | ||
integer, | intent(in), | optional | :: | flags(:) |
Execute a V-cycle between levels nfine and ncoarse
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout), | target | :: | pf | ||
integer, | intent(in) | :: | iteration | |||
real(kind=pfdp), | intent(in) | :: | t0 | |||
real(kind=pfdp), | intent(in) | :: | dt | |||
integer, | intent(in) | :: | level_index_c | Coarsest level of V-cycle |
||
integer, | intent(in) | :: | level_index_f | Finest level of V-cycle |
||
integer, | intent(in), | optional | :: | flags |