tem_abortCriteria_new Function

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

Define new abortCriteria.

A new abortCriteria object will be filled according to the parameters passed into the function.

Arguments

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

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

Any non-empty string activates this criterion.

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.


Called by

proc~~tem_abortcriteria_new~~CalledByGraph proc~tem_abortcriteria_new tem_abortCriteria_new proc~tem_simcontrol_load tem_simControl_load proc~tem_simcontrol_load->proc~tem_abortcriteria_new proc~tem_load_general tem_load_general proc~tem_load_general->proc~tem_simcontrol_load

Source Code

  function tem_abortCriteria_new(stop_file, steady_state) result(ac)
    ! -------------------------------------------------------------------- !
    !> Name of the stop file to react on. Default=''.
    !!
    !! Any non-empty string activates this criterion.
    character(len=*), optional, intent(in) :: stop_file

    !> 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.
    logical, optional, intent(in) :: steady_state

    !> A new variable of abortCriteria filled with the values provided as
    !! arguments.
    type(tem_abortCriteria_type) :: ac
    ! -------------------------------------------------------------------- !
    ! -------------------------------------------------------------------- !

    if (present(stop_file)) then
      ac%stop_file = trim(stop_file)
    else
      ac%stop_file = ''
    end if

    if (present(steady_state)) then
      ac%steady_state = steady_state
    else
      ac%steady_state = .false.
    end if

    allocate(ac%convergence(0))

  end function tem_abortCriteria_new