timer_obj Derived Type

type, public :: timer_obj

Time management utility


Inherits

type~~timer_obj~~InheritsGraph type~timer_obj timer_obj type~parser_obj parser_obj type~timer_obj->type~parser_obj parser type~entry_obj entry_obj type~parser_obj->type~entry_obj entries

Inherited by

type~~timer_obj~~InheritedByGraph type~timer_obj timer_obj type~marker_set marker_set type~marker_set->type~timer_obj timer type~respart_set ResPart_set type~respart_set->type~timer_obj timer type~respart_set->type~marker_set ib type~solver_obj solver_obj type~solver_obj->type~timer_obj timer type~cdifs_obj cdifs_obj type~cdifs_obj->type~marker_set IB type~cdifs_obj->type~respart_set RP type~cdifs_obj->type~solver_obj type~grans_obj grans_obj type~grans_obj->type~marker_set IB type~grans_obj->type~respart_set RP type~grans_obj->type~solver_obj type~solid_obj solid_obj type~solid_obj->type~marker_set type~solid_set solid_set type~solid_set->type~solid_obj p

Components

Type Visibility Attributes Name Initial
real(kind=wp), public :: dt

Timestep

logical, public :: finish = .false.

Instructs simulation to end

real(kind=wp), public :: freq_output = huge(1.0_wp)

Frequency of visualization writes

real(kind=wp), public :: freq_write = huge(1.0_wp)

Frequency of restart writes

integer, public :: iter = 0

Current iteration

integer, public :: iter_max = huge(1)

Maximum iterations

type(parser_obj), public, pointer :: parser

Parser object

real(kind=wp), public :: time = 0.0_wp

Time at the n-th timestep

real(kind=wp), public :: time_max = huge(1.0_wp)

Maximum simulation time

real(kind=wp), public :: time_wall = huge(1.0_wp)

Wall time


Type-Bound Procedures

procedure, public :: Done => timer_obj_Done

  • private function timer_obj_Done(this) result(res)

    Determines whether simulation is over

    Arguments

    Type IntentOptional Attributes Name
    class(timer_obj), intent(inout) :: this

    Timer

    Return Value logical

procedure, public :: EndRun => timer_obj_EndRun

  • private subroutine timer_obj_EndRun(this)

    Change run status to finished

    Arguments

    Type IntentOptional Attributes Name
    class(timer_obj), intent(inout) :: this

    Timer

procedure, public :: Finalize => timer_obj_Final

  • private subroutine timer_obj_Final(this)

    Finalize

    Arguments

    Type IntentOptional Attributes Name
    class(timer_obj), intent(inout) :: this

    Timer

procedure, public :: Initialize => timer_obj_Init

  • private subroutine timer_obj_Init(this, parser)

    Initialize the timer

    Arguments

    Type IntentOptional Attributes Name
    class(timer_obj), intent(inout) :: this

    Timer

    type(parser_obj), intent(in), target :: parser

    Input file parsing tool

procedure, public :: StepForward => timer_obj_StepForward

  • private subroutine timer_obj_StepForward(this)

    Move timer from n to n+1

    Arguments

    Type IntentOptional Attributes Name
    class(timer_obj), intent(inout) :: this

    Timer

procedure, public :: TimeToWriteOutputData => timer_obj_TimeToWriteOutputData

  • private function timer_obj_TimeToWriteOutputData(this) result(res)

    Determine whether it is time to write visualization files

    Arguments

    Type IntentOptional Attributes Name
    class(timer_obj), intent(inout) :: this

    Timer

    Return Value logical

procedure, public :: TimeToWriteRestartData => timer_obj_TimeToWriteRestartData

  • private function timer_obj_TimeToWriteRestartData(this) result(res)

    Determine whether it is time to write restart files

    Arguments

    Type IntentOptional Attributes Name
    class(timer_obj), intent(inout) :: this

    Timer

    Return Value logical