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_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_simcontrol_module module~tem_general_module tem_general_module module~tem_general_module->module~tem_simcontrol_module program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->module~tem_general_module module~tem_utestenv_module tem_utestEnv_module program~tem_varsys_stfunvar_test->module~tem_utestenv_module program~tem_varsys_statevar_test tem_varSys_stateVar_test program~tem_varsys_statevar_test->module~tem_general_module program~tem_varsys_statevar_test->module~tem_utestenv_module program~tem_varsys_derivevar_test tem_varSys_deriveVar_test program~tem_varsys_derivevar_test->module~tem_general_module program~tem_varsys_derivevar_test->module~tem_utestenv_module program~tem_sparta_test tem_sparta_test program~tem_sparta_test->module~tem_general_module program~tem_sparta_test->module~tem_utestenv_module program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->module~tem_general_module program~tem_variable_evaltype_test->module~tem_utestenv_module program~tem_varsys_test tem_varSys_test program~tem_varsys_test->module~tem_general_module program~tem_varsys_test->module~tem_utestenv_module program~tem_spacetime_fun_test tem_spacetime_fun_test program~tem_spacetime_fun_test->module~tem_general_module program~tem_spacetime_fun_test->module~tem_utestenv_module program~tem_logical_opertor_test tem_logical_opertor_test program~tem_logical_opertor_test->module~tem_general_module program~tem_logical_opertor_test->module~tem_utestenv_module program~bin_search_test bin_search_test program~bin_search_test->module~tem_general_module program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->module~tem_general_module program~tem_variable_extract_test->module~tem_utestenv_module program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->module~tem_general_module program~tem_variable_combine_test->module~tem_utestenv_module program~tem_tracking_test tem_tracking_test program~tem_tracking_test->module~tem_tracking_module program~tem_face_test tem_face_test program~tem_face_test->module~tem_general_module program~tem_face_test->module~tem_utestenv_module program~tem_face_test~2 tem_face_test program~tem_face_test~2->module~tem_general_module program~tem_face_test~2->module~tem_utestenv_module module~tem_utestenv_module->module~tem_general_module program~tem_face_test~3 tem_face_test program~tem_face_test~3->module~tem_general_module program~tem_face_test~3->module~tem_utestenv_module program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->module~tem_general_module program~tem_varsys_opvar_test->module~tem_utestenv_module

Contents


Derived Types

type, public :: tem_simControl_type

Data structure to describe the overall control of a simulation.

Read more…

Components

TypeVisibilityAttributesNameInitial
type(tem_time_type), private :: now

Representation of the current time.

type(tem_timeControl_type), private :: 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), private :: abortCriteria

Further abort criteria.

type(tem_status_type), private :: status

Flag collection to describe the status of the simulation.

logical, private :: delay_check =.false.

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

integer, private :: 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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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.

If this is not given, no advance of the time will be done.

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.

If this argument is present, the current time will be printed whenever the interval of the simControl is triggered.

public subroutine tem_simControl_clearStat(me)

Clear the status flags in the simcontrol.

Arguments

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
type(tem_simControl_type), intent(inout) :: me