FOODIE integrator: provide an explicit class of leapfrog multi-step schemes, 2nd order accurate.
The integrator must be initialized before used.
The time steps Dt(1:steps)
passed to the integrate methods must be identical: this integrator supports only
fixed time steps.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=R_P), | public, | allocatable | :: | Dt(:) | Previous time steps. |
||
real(kind=R_P), | private | :: | alpha | Robert-Asselin-Williams filter coefficient. |
|||
logical, | public | :: | autoupdate | Perform cyclic autoupdate of previous time steps buffers. |
|||
class(integrand_object), | public, | allocatable | :: | buffer | Buffer used for fast integration. |
||
character(len=:), | public, | allocatable | :: | description_ | Informative description of the integrator. |
||
integer(kind=I_P), | public | :: | error | = | 0 | Error status code. |
|
character(len=:), | public, | allocatable | :: | error_message | Error message, hopefully meaningful. |
||
class(integrand_object), | private, | allocatable | :: | filter | Filter field displacement. |
||
logical, | private | :: | is_filtered | Flag to check if the integration if RAW filtered. |
|||
integer(kind=I_P), | public | :: | iterations | Implicit iterations. |
|||
real(kind=R_P), | private | :: | nu | Robert-Asselin filter coefficient. |
|||
class(integrand_object), | public, | allocatable | :: | previous(:) | Previous steps. |
||
integer(kind=I_P), | public | :: | registers | Number of registers used for steps. |
|||
integer(kind=I_P), | public | :: | steps | Number of time steps. |
|||
real(kind=R_P), | public, | allocatable | :: | t(:) | Previous times. |
Allocate integrand members.
Allocate members of interpolator being of integrand_object class.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(inout) | :: | self | Integrator. |
||
class(integrand_object), | intent(in) | :: | U | Integrand. |
Assign ony members of abstract integrator_object type.
Assign ony members of abstract integrator_object type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_object), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrator_object), | intent(in) | :: | rhs | Right hand side. |
Assign members of integrator_multistep_object and parents.
Assign members of integrator_multistep_object and parents.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_multistep_object), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrator_object), | intent(in) | :: | rhs | Right hand side. |
Overload =
.
Operator =
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_adams_bashforth_moulton), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrator_object), | intent(in) | :: | rhs | Right hand side. |
Check for error occurrencies.
Check for error occurencies.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_object), | intent(in) | :: | self | Integrator. |
||
logical, | intent(in), | optional | :: | is_severe | Flag to activate severe faliure, namely errors trigger a stop. |
Return the class name of schemes.
Return the class name of schemes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(in) | :: | self | Integrator. |
Class name.
Return informative integrator description.
Return informative integrator description.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_object), | intent(in) | :: | self | Integrator. |
||
character(len=*), | intent(in), | optional | :: | prefix | Prefixing string. |
Description.
Destroy the integrator.
Destroy the integrator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(inout) | :: | self | Integrator. |
Destroy only members of abstract integrator_object type.
Destroy only members of abstract integrator_object type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_object), | intent(inout) | :: | self | Integrator. |
Destroy the integrator.
Destroy the integrator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_multistep_object), | intent(inout) | :: | self | Integrator. |
Return .true. if the integrator class has fast mode integrate.
Return .true. if the integrator class has fast mode integrate.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(in) | :: | self | Integrator. |
Inquire result.
Initialize (create) the integrator.
Create the actual leapfrog integrator: initialize the filter coefficient.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(inout) | :: | self | Integrator. |
||
character(len=*), | intent(in) | :: | scheme | Selected scheme. |
||
real(kind=R_P), | intent(in), | optional | :: | nu | Williams-Robert-Asselin filter coefficient. |
|
real(kind=R_P), | intent(in), | optional | :: | alpha | Robert-Asselin filter coefficient. |
|
logical, | intent(in), | optional | :: | autoupdate | Enable cyclic autoupdate of previous time steps. |
|
class(integrand_object), | intent(in), | optional | :: | U | Integrand molding prototype. |
|
logical, | intent(in), | optional | :: | stop_on_fail | Stop execution if initialization fail. |
Operator =
.
Operator =
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrator_object), | intent(in) | :: | rhs | Right hand side. |
Integrate integrand field.
Integrate field with leapfrog class scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(inout) | :: | self | Integrator. |
||
class(integrand_object), | intent(inout) | :: | U | Field to be integrated. |
||
real(kind=R_P), | intent(in) | :: | Dt | Time step. |
||
real(kind=R_P), | intent(in) | :: | t | Time. |
Integrate integrand field, fast mode.
Integrate field with leapfrog class scheme, fast mode.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(inout) | :: | self | Integrator. |
||
class(integrand_object), | intent(inout) | :: | U | Field to be integrated. |
||
real(kind=R_P), | intent(in) | :: | Dt | Time step. |
||
real(kind=R_P), | intent(in) | :: | t | Time. |
Return .true. for multistage integrator.
Return .true. for multistage integrator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_multistep_object), | intent(in) | :: | self | Integrator. |
Inquire result.
Return .true. for multistep integrator.
Return .true. for multistage integrator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_multistep_object), | intent(in) | :: | self | Integrator. |
Inquire result.
Return .true. if the integrator class support the given scheme.
Return .true. if the integrator class support the given scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(in) | :: | self | Integrator. |
||
character(len=*), | intent(in) | :: | scheme | Selected scheme. |
Inquire result.
Return number of stages used.
Return number of stages used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_multistep_object), | intent(in) | :: | self | Integrator. |
Number of stages used.
Return number of steps used.
Return number of steps used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_multistep_object), | intent(in) | :: | self | Integrator. |
Number of steps used.
Return the list of supported schemes.
Return the list of supported schemes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_leapfrog), | intent(in) | :: | self | Integrator. |
Queried scheme.
Trigger an error.
Check for error occurencies.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_object), | intent(inout) | :: | self | Integrator. |
||
integer(kind=I_P), | intent(in) | :: | error | Error status code. |
||
character(len=*), | intent(in), | optional | :: | error_message | Error message, hopefully meaningful. |
|
logical, | intent(in), | optional | :: | is_severe | Flag to activate severe faliure, namely errors trigger a stop. |
Cyclic update previous time steps.
Cyclic update previous time steps.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrand_object), | intent(in) | :: | U | Field to be integrated. |
||
class(integrand_object), | intent(inout) | :: | previous(1:) | Previous time steps solutions of integrand. |
||
real(kind=R_P), | intent(in), | optional | :: | Dt | Time step. |
|
real(kind=R_P), | intent(in), | optional | :: | t | Time. |
|
real(kind=R_P), | intent(inout), | optional | :: | previous_Dt(1:) | Time step. |
|
real(kind=R_P), | intent(inout), | optional | :: | previous_t(1:) | Time. |
type, extends(integrator_multistep_object) :: integrator_leapfrog
!< FOODIE integrator: provide an explicit class of leapfrog multi-step schemes, 2nd order accurate.
!<
!< @note The integrator must be initialized before used.
!<
!< @note The time steps `Dt(1:steps)` passed to the integrate methods must be identical: this integrator supports only
!< fixed time steps.
private
real(R_P) :: nu !< Robert-Asselin filter coefficient.
real(R_P) :: alpha !< Robert-Asselin-Williams filter coefficient.
logical :: is_filtered !< Flag to check if the integration if RAW filtered.
class(integrand_object), allocatable :: filter !< Filter field displacement.
contains
! deferred methods
procedure, pass(self) :: class_name !< Return the class name of schemes.
procedure, pass(self) :: has_fast_mode !< Return .true. if the integrator class has *fast mode* integrate.
procedure, pass(lhs) :: integr_assign_integr !< Operator `=`.
procedure, pass(self) :: integrate !< Integrate integrand field.
procedure, pass(self) :: integrate_fast !< Integrate integrand field, fast mode.
procedure, pass(self) :: is_supported !< Return .true. if the integrator class support the given scheme.
procedure, pass(self) :: supported_schemes !< Return the list of supported schemes.
! public methods
procedure, pass(self) :: destroy !< Destroy the integrator.
procedure, pass(self) :: initialize !< Initialize (create) the integrator.
! overridden public methods
procedure, pass(self) :: allocate_integrand_members !< Allocate integrand members.
endtype integrator_leapfrog