Define new abortCriteria.
A new abortCriteria object will be filled according to the parameters passed into the function.
Type | Intent | Optional | 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. |
A new variable of abortCriteria filled with the values provided as arguments.
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