FOODIE integrator: provide an explicit class of Adams-Moulton multi-step schemes, from 1st to 16th order accurate.
The integrator must be created or initialized (initialize the b coefficients) 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. |
||
logical, | public | :: | autoupdate | Perform cyclic autoupdate of previous time steps buffers. |
|||
real(kind=R_P), | private, | allocatable | :: | b(:) | \(b\) coefficients. |
||
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. |
||
integer(kind=I_P), | public | :: | iterations | Implicit iterations. |
|||
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_multistep_object), | 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_adams_moulton), | 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_adams_moulton), | 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_adams_moulton), | intent(in) | :: | self | Integrator. |
Inquire result.
Initialize (create) the integrator.
Create the actual Adams-Moulton integrator: initialize the b coefficients.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_adams_moulton), | intent(inout) | :: | self | Integrator. |
||
character(len=*), | intent(in) | :: | scheme | Selected scheme. |
||
integer(kind=I_P), | intent(in), | optional | :: | iterations | Implicit iterations. |
|
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_adams_moulton), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrator_object), | intent(in) | :: | rhs | Right hand side. |
Integrate integrand field.
Integrate field with Adams-Moulton class scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_adams_moulton), | 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 Adams-Moulton class scheme, fast mode.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_adams_moulton), | 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_adams_moulton), | 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_adams_moulton), | 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_adams_moulton
!< FOODIE integrator: provide an explicit class of Adams-Moulton multi-step schemes, from 1st to 16th order accurate.
!<
!< @note The integrator must be created or initialized (initialize the *b* coefficients) 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), allocatable :: b(:) !< \(b\) coefficients.
contains
! deferred methods
procedure, pass(self) :: class_name !< Return the class name of schemes.
procedure, pass(lhs) :: integr_assign_integr !< Operator `=`.
procedure, pass(self) :: has_fast_mode !< Return .true. if the integrator class has *fast mode* integrate.
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.
endtype integrator_adams_moulton