mus_control_module Module

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.


Uses

Used by

  • module~~mus_control_module~~UsedByGraph module~mus_control_module mus_control_module module~mus_program_module mus_program_module module~mus_program_module->module~mus_control_module program~musubi musubi program~musubi->module~mus_control_module program~musubi->module~mus_program_module

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private, save:: iStage =0
logical, private, save:: running =.false.

Abstract Interfaces

abstract interface

  • private subroutine computation(me, scheme, geometry, params, iLevel)

    Interface describes the main control routine which does computation set boundary and check flow status

    Arguments

    TypeIntentOptionalAttributesName
    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


Derived Types

type, public :: mus_control_type

Datatype containing mapping of control routines to function pointers

Components

TypeVisibilityAttributesNameInitial
procedure(computation), private, pointer:: do_computation=> null()

Subroutines

public subroutine mus_init_control(controlRoutine, me, minLevel, maxLevel)

This routines sets the function pointer to main control routine

Read more…

Arguments

TypeIntentOptionalAttributesName
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

private recursive subroutine do_recursive_multiLevel(me, scheme, geometry, params, iLevel)

Main control routine: Update the time step for all levels. Main steps: * do BC at iLevel * do compute kernel at iLevel * do do_computeFinerIntpAndExchange at iLevel if iLevel < maxLevel * do recursive at iLevel+1 * 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

Arguments

TypeIntentOptionalAttributesName
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

private recursive subroutine do_computeFinerIntpAndExchange(me, scheme, geometry, params, iLevel)

This routine does: 1. computation twice at finer level (iLevel+1), 2. interpolate my coarse ghost element (iLevel) from finer level (iLevel+1) 3. exchange the data of my coarse ghost elements between process

Arguments

TypeIntentOptionalAttributesName
class(mus_control_type) :: me
type(mus_scheme_type), intent(inout), target:: 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

private subroutine do_intpCoarserAndExchange(scheme, params, 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.

Arguments

TypeIntentOptionalAttributesName
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

private subroutine do_fast_singleLevel(me, scheme, geometry, params, iLevel)

Control routine for an optimized workflow with reduced functionality.

Read more…

Arguments

TypeIntentOptionalAttributesName
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

private subroutine do_benchmark(me, scheme, geometry, params, iLevel)

Arguments

TypeIntentOptionalAttributesName
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

private subroutine start_stageTimer()

Arguments

None

private subroutine stop_stageTimer()

Arguments

None

private subroutine mus_calcAuxFieldAndExchange(auxField, calcAuxField, state, pdfData, nFields, field, globSrc, stencil, varSys, derVarPos, phyConvFac, general, iLevel, minLevel, schemeHeader)

This routine compute auxField variable from pre-collision pdf and exchange halos

Arguments

TypeIntentOptionalAttributesName
type(mus_auxFieldVar_type), intent(inout) :: auxField

auxilary field array

procedure(mus_proc_calcAuxField), intent(in), pointer:: calcAuxField

function pointer to calculate auxField

real(kind=rk), intent(in) :: state(:)

state array

type(pdf_data_type), intent(in) :: pdfData

contains neigh array and nElems on current level

integer, intent(in) :: nFields

Number of fields

type(mus_field_type), intent(inout) :: field(nFields)

contains sources of all fields

type(mus_source_type), intent(inout) :: globSrc

global source

type(tem_stencilHeader_type), intent(in) :: stencil

stencil header

type(tem_varSys_type), intent(in) :: varSys

variable system

type(mus_derVarPos_type), intent(in) :: derVarPos(:)

contains auxField position of all fields in varSys

type(mus_convertFac_type), intent(in) :: phyConvFac

physics conversion factors for this level

type(tem_general_type), intent(in) :: general

contains commPattern, MPI communicator and simControl

integer, intent(in) :: iLevel

current level

integer, intent(in) :: minLevel

minlevel

type(mus_scheme_header_type), intent(in) :: schemeHeader

scheme header