Time object class.
Class designed to handle the timing data of the simulation.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| 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 |
Overload =.
Operator =.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(inout) | :: | lhs | Left hand side. |
||
| type(time_object), | intent(in) | :: | rhs | Right hand side. |
Return a pretty-formatted description of time parameters.
Return a pretty-formatted description of time parameters.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(in) | :: | self | Time object. |
||
| character(len=*), | intent(in), | optional | :: | prefix | Prefixing string. |
Description.
Destroy time.
Destroy time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(inout) | :: | self | Time object. |
Initialize time.
Initialize time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(inout) | :: | self | Time object. |
Return true if the end of simulation is reached.
Return true if the end of simulation is reached.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(in) | :: | self | Time object. |
Test result.
Load from file.
Load from file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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. |
Return the progress of simulation.
Return the progress of simulation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(in) | :: | self | Time object. |
Actual progress value.
Save into file.
Save into file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(inout) | :: | self | Time object. |
||
| type(file_ini), | intent(inout) | :: | fini | Simulation parameters ini file handler. |
Set simulation stop condition.
Set simulation stop condition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(inout) | :: | self | Time object. |
Operator =.
Operator =.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(time_object), | intent(inout) | :: | lhs | Left hand side. |
||
| type(time_object), | intent(in) | :: | rhs | Right hand side. |
Update time.
Update time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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. |
type :: time_object
!< Time object class.
!<
!< Class designed to handle the timing data of the simulation.
type(error_object) :: error !< Errors handler.
logical :: is_unsteady=.true. !< Type of simulation: unsteady or steady.
integer(I8P) :: n=0 !< Time steps counter.
real(R8P) :: t=0._R8P !< Time.
integer(I8P) :: n_max=0 !< Maximum number of time steps computed.
real(R8P) :: t_max=0._R8P !< Maximum time of integration, ignored if `n_max>0`.
real(R8P) :: CFL=0.3_R8P !< Courant-Friedrichs-Lewy stability coefficient.
contains
! public methods
procedure, pass(self) :: description !< Return a pretty-formatted description of time parameters.
procedure, pass(self) :: destroy !< Destroy time.
procedure, pass(self) :: initialize !< Initialize time.
procedure, pass(self) :: is_the_end !< Return true if the end of simulation is reached.
procedure, pass(self) :: progress !< Return the progress of simulation.
procedure, pass(self) :: load_from_file !< Load from file.
procedure, pass(self) :: save_into_file !< Save into file.
procedure, pass(self) :: set_stop !< Set simulation stop condition.
procedure, pass(self) :: update !< Update time.
! operators
generic :: assignment(=) => time_assign_time !< Overload `=`.
! private methods
procedure, pass(lhs) :: time_assign_time !< Operator `=`.
endtype time_object