Module containing the routines to create, setup, and destroy the main data structure in PFASST
Create a PFASST object gather some input from a file and command line fname present, read inputs from a file (and maybe command line) fname not present, only call read_opts if we want command line read set communicator
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | Main pfasst object |
||
type(pf_comm_t), | intent(inout), | target | :: | comm | Communicator |
|
integer, | intent(in), | optional | :: | nlevels | number of pfasst levels |
|
character(len=*), | intent(in), | optional | :: | fname | Input file for pfasst parameters |
|
logical, | intent(in), | optional | :: | nocmd | Determines if command line variables are to be read |
Setup both the PFASST object and the comm object loop over levels to set parameters Loop over levels setting interpolation and restriction matrices (in time)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout), | target | :: | pf | Main pfasst structure |
Setup (allocate) PFASST level If the level is already setup, calling this again will allocate (or deallocate) tauQ appropriately. do some sanity checks (re)allocate tauQ (may to need create/destroy tauQ dynamically when doing AMR) skip the rest if we're already allocated allocate flat buffers for send, and recv allocate nodes, flags, and integration matrices make quadrature matrices Allocate and compute all the matrices initialize sweeper allocate solution and function arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(in) | :: | pf | Main pfasst structure |
||
class(pf_level_t), | intent(inout), | target | :: | lev | Level to set up |
Deallocate PFASST object destroy all levels deallocate pfasst pointer arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | Main pfasst structure |
Deallocate PFASST level deallocate flat buffers for communcition deallocate nodes, flags, and integration matrices deallocate solution and function storage
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(pf_level_t), | intent(inout) | :: | lev | level to destroy |
||
integer | :: | nlevels | number of pfasst levels |
Subroutine to read pfasst options from file and command line define the namelist for reading set local variables to pf_pfasst defaults open the file "fname" and read the pfasst namelist overwrite parameters defined on command line re-assign the pfasst internals Sanity check
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | |||
logical, | intent(in) | :: | read_cmd | |||
character(len=*), | intent(in), | optional | :: | fname |
Subroutine to write out run parameters
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | |||
integer, | intent(in), | optional | :: | un_opt | ||
logical, | intent(in), | optional | :: | show_mats_opt |
Subroutine to make the matrices for interpolation between noodes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=pfdp), | intent(in) | :: | f_nodes(0:f_nnodes-1) | quadrature nodes on fine level |
||
integer, | intent(in) | :: | f_nnodes | number of nodes on fine level |
||
real(kind=pfdp), | intent(in) | :: | c_nodes(0:c_nnodes-1) | quadrature nodes on coarse level |
||
integer, | intent(in) | :: | c_nnodes | number of nodes on coarse level |
||
real(kind=pfdp), | intent(out) | :: | tmat(0:f_nnodes-1,0:c_nnodes-1) | Interpolation matrix to compute |