pf_mod_parallel_oc Module

Module of parallel PFASST routines for optimal control problems.


Uses

  • module~~pf_mod_parallel_oc~~UsesGraph module~pf_mod_parallel_oc pf_mod_parallel_oc module~pf_mod_interpolate pf_mod_interpolate module~pf_mod_parallel_oc->module~pf_mod_interpolate module~pf_mod_utils pf_mod_utils module~pf_mod_parallel_oc->module~pf_mod_utils module~pf_mod_restrict pf_mod_restrict module~pf_mod_parallel_oc->module~pf_mod_restrict module~pf_mod_pfasst pf_mod_pfasst module~pf_mod_parallel_oc->module~pf_mod_pfasst module~pf_mod_comm pf_mod_comm module~pf_mod_parallel_oc->module~pf_mod_comm module~pf_mod_dtype pf_mod_dtype module~pf_mod_parallel_oc->module~pf_mod_dtype module~pf_mod_hooks pf_mod_hooks module~pf_mod_parallel_oc->module~pf_mod_hooks module~pf_mod_timer pf_mod_timer module~pf_mod_parallel_oc->module~pf_mod_timer module~pf_mod_interpolate->module~pf_mod_utils module~pf_mod_interpolate->module~pf_mod_restrict module~pf_mod_interpolate->module~pf_mod_dtype module~pf_mod_interpolate->module~pf_mod_hooks module~pf_mod_interpolate->module~pf_mod_timer module~pf_mod_utils->module~pf_mod_dtype module~pf_mod_utils->module~pf_mod_timer module~pf_mod_restrict->module~pf_mod_dtype module~pf_mod_restrict->module~pf_mod_hooks module~pf_mod_restrict->module~pf_mod_timer module~pf_mod_pfasst->module~pf_mod_dtype module~pf_mod_comm_mpi pf_mod_comm_mpi module~pf_mod_pfasst->module~pf_mod_comm_mpi module~pf_mod_comm->module~pf_mod_pfasst iso_c_binding iso_c_binding module~pf_mod_dtype->iso_c_binding module~pf_mod_hooks->module~pf_mod_dtype module~pf_mod_timer->module~pf_mod_dtype module~pf_mod_comm_mpi->module~pf_mod_dtype module~pf_mod_comm_mpi->module~pf_mod_timer module~pf_mod_mpi pf_mod_mpi module~pf_mod_comm_mpi->module~pf_mod_mpi

Contents


Subroutines

public subroutine pf_predictor_oc(pf, t0, dt, flags)

Step 1. Getting the initial condition on the finest level at each processor If we are doing multiple levels, then we need to coarsen to fine level Step 2: Proceed fine to coarse levels coarsening the fine solution and computing tau correction If RK_pred is true, just do some RK_steps

Arguments

Type IntentOptional AttributesName
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

public subroutine pf_check_residual_oc(pf, residual_converged)

Subroutine to test residuals to determine if the current processor has converged.

Arguments

Type IntentOptional AttributesName
type(pf_pfasst_t), intent(inout) :: pf
logical, intent(out) :: residual_converged

Return true if residual is below tolerances

public subroutine pf_check_convergence_oc(pf, send_tag, flags)

Test residuals to determine if the current processor has converged, adapted to optimal control. Can probably be removed, when pf_pfasst_block_oc is changed to use pf_check_convergence of pf_check_convergence_old.

Read more…

Arguments

Type IntentOptional AttributesName
type(pf_pfasst_t), intent(inout) :: pf
integer, intent(in) :: send_tag
integer, intent(in), optional :: flags

public subroutine pf_pfasst_block_oc(pf, dt, nsteps, predict, flags, step)

Routine to do the pfasst iterations for optimal control problems on one block of processors until completion. Each processor will do either a fixed number of iterations, or iterate until a tolerance is met On calling, it is assumed that the levels are already loaded with the initial guesses

Arguments

Type IntentOptional AttributesName
type(pf_pfasst_t), intent(inout), target:: pf
real(kind=pfdp), intent(in) :: dt
integer, intent(in) :: nsteps
logical, intent(in) :: predict
integer, intent(in), optional :: flags
integer, intent(in), optional :: step

public subroutine pf_v_cycle_oc(pf, iteration, t0, dt, level_index_c, level_index_f, flags)

Post the nonblocking receives on the all the levels that will be recieving later (for single level this will be skipped) move from fine to coarse doing sweeps

Arguments

Type IntentOptional AttributesName
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