off_time_object Module

module~~off_time_object~~UsesGraph module~off_time_object off_time_object module~off_error_object off_error_object module~off_error_object->module~off_time_object finer finer finer->module~off_time_object penf penf penf->module~off_time_object penf->module~off_error_object iso_fortran_env iso_fortran_env iso_fortran_env->module~off_error_object
Help

OFF time object definition and implementation.

Used By

module~~off_time_object~~UsedByGraph module~off_time_object off_time_object module~off_simulation_object off_simulation_object module~off_time_object->module~off_simulation_object module~off_objects off_objects module~off_time_object->module~off_objects module~off_simulation_object->module~off_objects program~off_test_save_load_file_parameters off_test_save_load_file_parameters module~off_objects->program~off_test_save_load_file_parameters program~off_test_load_file_parameters off_test_load_file_parameters module~off_objects->program~off_test_load_file_parameters program~off_test_save_load_file_grid off_test_save_load_file_grid module~off_objects->program~off_test_save_load_file_grid
Help


Variables

TypeVisibility AttributesNameInitial
character(len=4), private, parameter:: INI_SECTION_NAME ='time'

INI (config) file section name containing the time parameters.


Derived Types

type, public :: time_object

Time object class.

Components

TypeVisibility AttributesNameInitial
real(kind=R8P), public :: CFL =0.3_R8P

Courant-Friedrichs-Lewy stability coefficient.

type(error_object), public :: error

Errors handler.

logical, public :: is_unsteady =.true.

Type of simulation: unsteady or steady.

integer(kind=I8P), public :: n =0

Time steps counter.

integer(kind=I8P), public :: n_max =0

Maximum number of time steps computed.

real(kind=R8P), public :: t =0._R8P

Time.

real(kind=R8P), public :: t_max =0._R8P

Maximum time of integration, ignored if n_max>0.

Type-Bound Procedures

generic, public :: assignment(=) => time_assign_time

Overload =.

procedure, public, pass(self) :: description

Return a pretty-formatted description of time parameters.

procedure, public, pass(self) :: destroy

Destroy time.

procedure, public, pass(self) :: initialize

Initialize time.

procedure, public, pass(self) :: is_the_end

Return true if the end of simulation is reached.

procedure, public, pass(self) :: load_from_file

Load from file.

procedure, public, pass(self) :: progress

Return the progress of simulation.

procedure, public, pass(self) :: save_into_file

Save into file.

procedure, public, pass(self) :: set_stop

Set simulation stop condition.

procedure, public, pass(lhs) :: time_assign_time

Operator =.

procedure, public, pass(self) :: update

Update time.


Functions

private pure function description(self, prefix) result(desc)

Return a pretty-formatted description of time parameters.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(in) :: self

Time object.

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

Prefixing string.

Return Value character(len=:), allocatable

Description.

private elemental function is_the_end(self) result(yes)

Return true if the end of simulation is reached.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(in) :: self

Time object.

Return Value logical

Test result.

private elemental function progress(self) result(prog)

Return the progress of simulation.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(in) :: self

Time object.

Return Value real(kind=R8P)

Actual progress value.


Subroutines

private elemental subroutine destroy(self)

Destroy time.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(inout) :: self

Time object.

private elemental subroutine initialize(self)

Initialize time.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(inout) :: self

Time object.

private subroutine load_from_file(self, fini, go_on_fail)

Load from file.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(inout) :: self

Time object.

type(file_ini), intent(in) :: fini

Simulation parameters ini file handler.

logical, intent(in), optional :: go_on_fail

Go on if load fails.

private subroutine save_into_file(self, fini)

Save into file.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(inout) :: self

Time object.

type(file_ini), intent(inout) :: fini

Simulation parameters ini file handler.

private elemental subroutine set_stop(self)

Set simulation stop condition.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(inout) :: self

Time object.

private pure subroutine time_assign_time(lhs, rhs)

Operator =.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(inout) :: lhs

Left hand side.

type(time_object), intent(in) :: rhs

Right hand side.

private elemental subroutine update(self, global_min_dt)

Update time.

Arguments

Type IntentOptional AttributesName
class(time_object), intent(inout) :: self

Time object.

real(kind=R8P), intent(inout) :: global_min_dt

Global (all processes/images, all blocks) minimum time step.