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.



Variables

Type Visibility Attributes Name Initial
integer, private, save :: iStage = 0
logical, private, save :: running = .false.

Abstract Interfaces

abstract interface

  • private subroutine computation(me, iLevel)

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

    Arguments

    Type IntentOptional Attributes Name
    class(mus_control_type) :: me

    self control type

    integer, intent(in) :: iLevel

    Level counter variable

abstract interface

  • private subroutine update_particles_if(me)

    Arguments

    Type IntentOptional Attributes Name
    class(mus_control_type) :: me

    self control type


Derived Types

type, public ::  mus_control_type

Datatype containing mapping of control routines to function pointers

Components

Type Visibility Attributes Name Initial
type(mus_scheme_type), public, pointer :: scheme => null()
type(mus_geom_type), public, pointer :: geometry => null()
type(mus_param_type), public, pointer :: params => null()
type(mus_particle_group_type), public, pointer :: particleGroup => null()
logical, public :: DPS_do_volfract = .false.
logical, public :: DPS_do_advance = .true.
integer, public :: curlvl = 0
procedure(computation), public, pointer :: do_computation => null()
procedure(update_particles_if), public, pointer :: check_particles => null()
procedure(update_particles_if), public, pointer :: advance_particles => null()

Subroutines

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

This routines sets the function pointer to main control routine

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=labelLen), intent(in) :: controlRoutine
type(mus_control_type), intent(inout) :: me

contains function pointer to point control routine

integer, intent(in) :: minLevel
integer, intent(in) :: maxLevel
character(len=labelLen), intent(in) :: particle_kind

string containing kind of solid particles for coupled LBM-DEM simulations Can be fully resolved 'MEM' or unresolved 'DPS', 'DPS_twoway' or 'DPS_oneway'

private recursive subroutine do_recursive_multiLevel(me, iLevel)

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

Arguments

Type IntentOptional Attributes Name
class(mus_control_type) :: me

self control type

integer, intent(in) :: iLevel

the current level

private subroutine do_fast_singleLevel(me, iLevel)

Control routine for an optimized workflow with reduced functionality.

Read more…

Arguments

Type IntentOptional Attributes Name
class(mus_control_type) :: me

self control type dummy variable in this routine, required by interface

integer, intent(in) :: iLevel

Level counter variable

private subroutine do_benchmark(me, iLevel)

Arguments

Type IntentOptional Attributes Name
class(mus_control_type) :: me

self control type dummy variable in this routine, required by interface

integer, intent(in) :: iLevel

Level counter variable

private subroutine do_intpFinerAndExchange(scheme, params, iLevel)

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

Arguments

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

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

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

private subroutine check_particles_MEM(me)

Arguments

Type IntentOptional Attributes Name
class(mus_control_type) :: me

self control type

private subroutine advance_particles_MEM(me)

Arguments

Type IntentOptional Attributes Name
class(mus_control_type) :: me

self control type

private subroutine check_particles_DPS(me)

Arguments

Type IntentOptional Attributes Name
class(mus_control_type) :: me

self control type

private subroutine advance_particles_DPS(me)

Arguments

Type IntentOptional Attributes Name
class(mus_control_type) :: me

self control type

private subroutine start_stageTimer()

Arguments

None

private subroutine stop_stageTimer()

Arguments

None