tem_simControl_module Module

This module provides the facility to control the execution of the solver.

It is configured by the sim_control table in the configuration. From this table three settings will be read:

  • time_control defines the control of time stepping see tem_timeControl_module.
  • abort_criteria defines additional abort criteria to be heeded see tem_abortCriteria_module.
  • delay_check defines whether checks should be delayed (default is false).

If there is no sim_control found in the configuration, an attempt will be made to read the time_control table instead, while an empty abort_criteria table is assumed.

Thus, the general structure of the sim_control configuration has the following form:

  sim_control = {
    time_control = {},
    abort_criteria = {},
    delay_check = false
  }

Alternatively, if there are no abort criteria to be specified, and delay_check should not be activated in general, just the time_control table may be specified:

    time_control = {}

See the tem_timeControl_module for details on the time_control table. See the tem_abortCriteria_module for details on the time_control table.

The delay_check flag indicates whether to use a nonblocking allreduce for the synchronization of status flags, to decide on triggered events during the computation. It relaxes the synchronization requirements but introduces a delay by one check interval until all processes get set status bits.

A simple complete example without checks for steady state would be:

  sim_control = {
    time_control = {
      min = 0,
      max = 10.0,
      interval = {iter = 5}
    },
    abort_criteria = {
      stop_file = 'stop',
    },
    delay_check = false
  }

Uses

Used by

  • module~~tem_simcontrol_module~~UsedByGraph module~tem_simcontrol_module tem_simControl_module module~tem_general_module tem_general_module module~tem_general_module->module~tem_simcontrol_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_simcontrol_module

Derived Types

type, public ::  tem_simControl_type

Data structure to describe the overall control of a simulation.

Read more…

Components

Type Visibility Attributes Name Initial
type(tem_time_type), public :: now

Representation of the current time.

type(tem_timeControl_type), public :: timeControl

Time control, when the simulation should end, and definition of special interval, at which regular actions should take place.

Read more…
type(tem_abortCriteria_type), public :: abortCriteria

Further abort criteria.

type(tem_status_type), public :: status

Flag collection to describe the status of the simulation.

logical, public :: delay_check = .false.

Use nonblocking operations for gobal checks and delay evaluation by one check interval (see timeControl%check_iter)

integer, public :: syncUpdate_timer

Handle for the syncUpdate timer to measure the time spent on syncUpdate calls.


Subroutines

public subroutine tem_simControl_start(me)

Start a sim control by resetting its time object.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_simControl_type), intent(inout) :: me

The simulation control structure to start.

public subroutine tem_simControl_load(me, conf, parent, key, solverAborts)

Load sim control settings from a configuration script.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_simControl_type), intent(inout) :: me

Simulation control parameters to set.

type(flu_State) :: conf

Handle to the configuration script to load the settings from.

integer, intent(in), optional :: parent

Potential parent table, in which the simulation control table is to be found.

character(len=*), optional :: key

Name for the simulation control table. Default is 'sim_control'.

class(tem_solverAborts_type), intent(inout), optional :: solverAborts

Solver specific abort criteria to load.

public subroutine tem_simControl_out(me, conf, key)

Write sim control settings to a configuration script.

Arguments

Type IntentOptional Attributes Name
type(tem_simControl_type), intent(inout) :: me

The simulation control settings to write to a Lua table.

type(aot_out_type) :: conf

Handle for the Lua script to write to.

character(len=*), optional :: key

Name for the simulation control table. Default is sim_control.

public subroutine tem_simControl_dump_now(me, outUnit)

Dump the current time (now) of the simControl to outUnit.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_simControl_type), intent(inout) :: me

Simulation control settings to write to outUnit.

integer, intent(in) :: outUnit

File unit to write to.

public subroutine tem_simControl_dump(me, outUnit)

Dump simcontrol information to the specified outUnit.

Arguments

Type IntentOptional Attributes Name
type(tem_simControl_type), intent(inout) :: me

Simulation control settings to write to outUnit.

integer, intent(in) :: outUnit

File unit to write to.

public subroutine tem_simControl_syncUpdate(me, proc, dt, d_iter, outUnit)

Synchronize the status bits across all processes and update the time.

Arguments

Type IntentOptional Attributes Name
type(tem_simControl_type), intent(inout) :: me

Simulation control information.

type(tem_comm_env_type), intent(in) :: proc

Communicator to use for the communication of status flags.

real(kind=rk), intent(in), optional :: dt

Time step to use for updating the simulation time.

Read more…
integer, intent(in), optional :: d_iter

Number of iterations to add to the current number of iterations. (Default: 1)

integer, intent(in), optional :: outUnit

Unit to write messages to.

Read more…

public subroutine tem_simControl_clearStat(me)

Clear the status flags in the simcontrol.

Arguments

Type IntentOptional Attributes Name
type(tem_simControl_type), intent(inout) :: me

Simulation control information.

public subroutine tem_simControl_steadyState_reset(me)

Reset trigger, status bit and current time for steady state

Arguments

Type IntentOptional Attributes Name
type(tem_simControl_type), intent(inout) :: me