In this module, the control structure for computing each time step is established.
Various different control structures can be defined and set by function pointers. The current main routine is recursive_multilevel which recursively computes the new time step for all the schemes defined on all levels, starting from the coarsest.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | save | :: | iStage | = | 0 | |
logical, | private, | save | :: | running | = | .false. |
Interface describes the main control routine which does computation set boundary and check flow status
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_control_type) | :: | me |
self control type |
|||
type(mus_scheme_type), | intent(inout) | :: | scheme |
container for the scheme |
||
type(mus_geom_type), | intent(inout) | :: | geometry |
geometry infomation |
||
type(mus_param_type), | intent(inout) | :: | params |
global parameters |
||
integer, | intent(in) | :: | iLevel |
Level counter variable |
Datatype containing mapping of control routines to function pointers
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(computation), | public, | pointer | :: | do_computation | => | null() |
This routines sets the function pointer to main control routine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=labelLen), | intent(in) | :: | controlRoutine | |||
type(mus_control_type), | intent(out) | :: | me |
contains function pointer to point control routine |
||
integer, | intent(in) | :: | minLevel | |||
integer, | intent(in) | :: | maxLevel |
Main control routine: Update the time step for all levels. Main steps: * if iLevel < maxLevel do recursive at iLevel+1 * do BC at iLevel * do auxField calculation at iLevel * do compute kernel at iLevel * do apply source at iLevel * do do_IntpFinerAndExchange at iLevel if iLevel < maxLevel * intp My Coarser ghost (iLevel) from Finer (iLevel+1) * do exchange bufferFromFiner at iLevel * exchange buffer at iLevel * exchange bufferFromCoarser at iLevel if iLevel > minLevel * do do_intpCoarserAndExchange at iLevel if iLevel < maxLevel * intp Finer Ghost (iLevel+1) from my coarser (iLevel) * exchange bufferFromCoarser at iLevel+1
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_control_type) | :: | me |
self control type |
|||
type(mus_scheme_type), | intent(inout) | :: | scheme |
container for the scheme |
||
type(mus_geom_type), | intent(inout) | :: | geometry |
geometry infomation |
||
type(mus_param_type), | intent(inout) | :: | params |
global parameters |
||
integer, | intent(in) | :: | iLevel |
the current level |
This routine does: 1. interpolate my coarse ghost element (iLevel) from finer level (iLevel+1) 2. exchange the data of my coarse ghost elements between process
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_scheme_type), | intent(inout), | target | :: | scheme |
containers for the different schemes |
|
type(mus_param_type), | intent(inout) | :: | params |
global parameters |
||
integer, | intent(in) | :: | iLevel |
This routine utilizes fluid elements on my level (L) to fill finer ghost elements on next level (L+1). Then it exchanges the datas of finer ghost elements (L+1) between process.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mus_scheme_type), | intent(inout), | target | :: | scheme |
containers for the different schemes |
|
type(mus_param_type), | intent(in) | :: | params |
global parameters |
||
integer, | intent(in) | :: | iLevel |
Level counter variable |
Control routine for an optimized workflow with reduced functionality.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_control_type) | :: | me |
self control type dummy variable in this routine, required by interface |
|||
type(mus_scheme_type), | intent(inout) | :: | scheme |
container for the scheme |
||
type(mus_geom_type), | intent(inout) | :: | geometry |
geometry infomation |
||
type(mus_param_type), | intent(inout) | :: | params |
global parameters |
||
integer, | intent(in) | :: | iLevel |
Level counter variable |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mus_control_type) | :: | me |
self control type dummy variable in this routine, required by interface |
|||
type(mus_scheme_type), | intent(inout) | :: | scheme |
containers for the different schemes |
||
type(mus_geom_type), | intent(inout) | :: | geometry |
geometry infomation |
||
type(mus_param_type), | intent(inout) | :: | params |
global parameters |
||
integer, | intent(in) | :: | iLevel |
Level counter variable |