tem_abortCriteria_module Module

This module provides the definition of various abort criteria upon which a simulation should be stopped. Note that solvers may extend this table and have their own set of addititonal abort parameters to be set in this table.

There are two primary options that may be set:

  • stop_file this denotes a file that will be checked for existence in the current working directory. If it exists the simulation will be stopped (if restarts are active, a restart will be written). If the file is empty the file will be deleted upon completion of the application. Otherwise, if the file is not empty it will be kept around.
  • steady_state this is a boolean to indicate whether the simulation is to halt when a steady state is reached. If this is true a convergence table, where the condition for a steady state may be defined, is read. See tem_convergence_module for details.

If the abort criteria table is not provided, the defaults for both settings will be used, which is equivalent to the following definition:

  abort_criteria = {stop_file = '', steady_state = false}

That is, no stop files to look for, and no check whether a steady state is reached.

A more complete example with a check for steady state and a convergence table (more details in tem_convergence_module could look like this:

  abort_criteria = {
    stop_file = 'stop',
    steady_state = true,
    convergence = {
      variable = {'pressure', 'velocity'},
      shape = {kind = 'all'},
      time_control = {
        min = {iter = 0},
        max = {iter = tmax},
        interval = {iter = 10}
      },
      reduction = { 'average', 'average' },
      norm = 'average',
      nvals = 100,
      absolute = true,
      condition = {
         { threshold = 1.e-15, operator = '<=' },
         { threshold = 1.e-12, operator = '<=' }
      }
    }
  }

This results in the application to look for a file named stop in the working directory and will abort the run if it is found to exist. The application will check for a steady state, where a steady state is assumed when the average of pressure and velocity across the complete domain does not deviate by more of 1.e-15 for pressure and not more than 1.e-12 for the velocity.


Uses

  • module~~tem_abortcriteria_module~~UsesGraph module~tem_abortcriteria_module tem_abortCriteria_module module~env_module env_module module~tem_abortcriteria_module->module~env_module module~tem_convergence_module tem_convergence_module module~tem_abortcriteria_module->module~tem_convergence_module module~aotus_module aotus_module module~tem_abortcriteria_module->module~aotus_module module~aot_out_general_module aot_out_general_module module~tem_abortcriteria_module->module~aot_out_general_module module~aot_out_module aot_out_module module~tem_abortcriteria_module->module~aot_out_module module~aot_table_module aot_table_module module~tem_abortcriteria_module->module~aot_table_module module~env_module->module~aotus_module iso_fortran_env iso_fortran_env module~env_module->iso_fortran_env mpi mpi module~env_module->mpi module~flu_binding flu_binding module~env_module->module~flu_binding module~tem_convergence_module->module~env_module module~tem_convergence_module->module~aotus_module module~tem_convergence_module->module~aot_out_module module~tem_convergence_module->module~aot_table_module module~tem_status_module tem_status_module module~tem_convergence_module->module~tem_status_module module~tem_shape_module tem_shape_module module~tem_convergence_module->module~tem_shape_module module~tem_aux_module tem_aux_module module~tem_convergence_module->module~tem_aux_module module~tem_comm_env_module tem_comm_env_module module~tem_convergence_module->module~tem_comm_env_module module~tem_geometry_module tem_geometry_module module~tem_convergence_module->module~tem_geometry_module module~tem_solvehead_module tem_solveHead_module module~tem_convergence_module->module~tem_solvehead_module module~tem_bc_prop_module tem_bc_prop_module module~tem_convergence_module->module~tem_bc_prop_module module~tem_logging_module tem_logging_module module~tem_convergence_module->module~tem_logging_module module~tem_timecontrol_module tem_timeControl_module module~tem_convergence_module->module~tem_timecontrol_module module~tem_tools_module tem_tools_module module~tem_convergence_module->module~tem_tools_module module~tem_stencil_module tem_stencil_module module~tem_convergence_module->module~tem_stencil_module module~tem_condition_module tem_condition_module module~tem_convergence_module->module~tem_condition_module module~tem_time_module tem_time_module module~tem_convergence_module->module~tem_time_module module~treelmesh_module treelmesh_module module~tem_convergence_module->module~treelmesh_module module~tem_subtree_type_module tem_subTree_type_module module~tem_convergence_module->module~tem_subtree_type_module module~tem_reduction_spatial_module tem_reduction_spatial_module module~tem_convergence_module->module~tem_reduction_spatial_module module~tem_varsys_module tem_varSys_module module~tem_convergence_module->module~tem_varsys_module module~tem_varmap_module tem_varMap_module module~tem_convergence_module->module~tem_varmap_module module~tem_subtree_module tem_subTree_module module~tem_convergence_module->module~tem_subtree_module

Used by

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

Contents


Abstract Interfaces

abstract interface

  • private subroutine load_aborts(me, conf, abort_table)

    Loading additional parameters for solver specific abort criteria from the configuration file.

    Arguments

    Type IntentOptional Attributes Name
    class(tem_solverAborts_type), intent(inout) :: me

    The solver specific type to hold additional abort parameters.

    type(flu_State), intent(in) :: conf

    Handle to Lua configuration file to load parameters from.

    integer, intent(in) :: abort_table

    Handle to the abort criteria table to read from.


Derived Types

type, public ::  tem_solverAborts_type

Abstract type to describe solver specific abort criteria.

Read more…

Type-Bound Procedures

procedure (load_aborts) , public :: load

type, public ::  tem_abortCriteria_type

Definition of the various abort criteria.

Read more…

Components

Type Visibility Attributes Name Initial
character(len=labelLen), public :: stop_file

A file which should cause the simulation to stop. Default: ''.

Read more…
logical, public :: steady_state

Should the simulation be checked for a steady state convergence and stop if it is detected? Default: .false.

type(tem_convergence_type), public, allocatable :: convergence(:)

Convergence conditions for steady state check. Filled only when steady_state is True


Functions

public function tem_abortCriteria_new(stop_file, steady_state) result(ac)

Define new abortCriteria.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: stop_file

Name of the stop file to react on. Default=''.

Read more…
logical, intent(in), optional :: steady_state

Flag to indicate if the simulation should stop upon reaching a steady state. What a steady state exactly is has to be defined in the solver. Default: .false.

Return Value type(tem_abortCriteria_type)

A new variable of abortCriteria filled with the values provided as arguments.

public function tem_stop_file_exists(abortCriteria, rank) result(sf_exists)

Check if the stop file exists.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_abortCriteria_type), intent(in) :: abortCriteria

Abort criteria settings to use in this check for a stop file.

integer, intent(in) :: rank

Rank of the probing process, only rank==0 actually checks for the file.

Return Value logical

Result that indicates, if the stop files exists.


Subroutines

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

Load the abortCriteria from a given configuration.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_abortCriteria_type), intent(out) :: me

Abort criteria to load from the Lua table.

type(flu_State) :: conf

Handle for the Lua script.

integer, intent(in), optional :: parent

Parent table to read from.

character(len=*), intent(in), optional :: key

Name of the time control table. Default: 'time_control'

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

Solver specific abort criteria to load.

public subroutine tem_abortCriteria_out(me, conf, key)

Saves the abortCriteria to a given configuration.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_abortCriteria_type), intent(in) :: me

The abortCriteria to write out as a Lua table.

type(aot_out_type), intent(inout) :: conf

Handle for the Lua script to write to.

character(len=*), optional :: key

A name for the table to write the abortCriteria to. Default: 'abort_criteria'.

public subroutine tem_abortCriteria_dump(me, outUnit)

Dump abort criteria information to the specified outUnit.

Arguments

Type IntentOptional Attributes Name
type(tem_abortCriteria_type), intent(in) :: me

Abort criteria settings to write on outUnit.

integer, intent(in) :: outUnit

File unit to write the settings to.