Define Lorenz field that is a concrete extension of the abstract integrand type.
Lorenz equations field.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=R_P), | private, | dimension(:), allocatable | :: | U | Integrand (state) variables, [1:dims]. |
||
real(kind=R_P), | private | :: | beta | = | 0._R_P | Lorenz \(\beta\). |
|
integer(kind=I_P), | private | :: | dims | = | 0 | Space dimensions. |
|
real(kind=R_P), | private, | dimension(:,:), allocatable | :: | previous | Previous time steps states, [1:dims,1:steps]. |
||
real(kind=R_P), | private | :: | rho | = | 0._R_P | Lorenz \(\rho\). |
|
real(kind=R_P), | private | :: | sigma | = | 0._R_P | Lorenz \(\sigma\). |
|
integer(kind=I_P), | private | :: | steps | = | 0 | Number of time steps stored. |
procedure, public, pass(lhs) :: add => add_lorenz | Lorenz + Lorenz operator. |
procedure, public, pass(lhs) :: assign_integrand => lorenz_assign_lorenz | Lorenz = Lorenz. |
procedure, public, pass(lhs) :: assign_real => lorenz_assign_real | Lorenz = real. |
procedure, public, pass(self) :: init | Init field. |
procedure, public, pass(lhs) :: integrand_multiply_integrand => lorenz_multiply_lorenz | Lorenz * Lorenz operator. |
procedure, public, pass(lhs) :: integrand_multiply_real => lorenz_multiply_real | Lorenz * real operator. |
procedure, public, pass(lhs) :: local_error => lorenz_local_error | Local error. |
procedure, public, pass(self) :: output | Extract Lorenz field. |
procedure, public, pass(self) :: previous_step | Get a previous time step. |
procedure, public, pass(rhs) :: real_multiply_integrand => real_multiply_lorenz | Real * Lorenz operator. |
procedure, public, pass(lhs) :: sub => sub_lorenz | Lorenz - Lorenz. |
procedure, public, pass(self) :: t => dLorenz_dt | Time derivative, residuals function. |
procedure, public, pass(self) :: update_previous_steps | Update previous time steps. |
Add two Lorenz fields.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Time derivative of Lorenz field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | self | Lorenz field. |
||
real(kind=R_P), | intent(in), | optional | :: | t | Time. |
Lorenz field time derivative.
Estimate local truncation error between 2 lorenz approximations.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Error estimation.
Multiply a lorenz field by another one.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Multiply a Lorenz field by a real scalar.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | lhs | Left hand side. |
||
real(kind=R_P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Output the Lorenz field state.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | self | Lorenz field. |
Lorenz state vector.
Extract previous time solution of Lorenz field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | self | Lorenz field. |
||
integer(kind=I_P), | intent(in) | :: | n | Time level. |
Previous time solution of Lorenz field.
Multiply a real scalar by a Lorenz field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R_P), | intent(in) | :: | lhs | Left hand side. |
||
class(lorenz), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Subtract two Lorenz fields.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Construct an initialized Lorenz field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(inout) | :: | self | Lorenz field. |
||
real(kind=R_P), | intent(in), | dimension(:) | :: | initial_state | Initial state of Lorenz field vector. |
|
real(kind=R_P), | intent(in) | :: | sigma | Lorenz \(\sigma\). |
||
real(kind=R_P), | intent(in) | :: | rho | Lorenz \(\rho\). |
||
real(kind=R_P), | intent(in) | :: | beta | Lorenz \(\beta\). |
||
integer(kind=I_P), | intent(in), | optional | :: | steps | Time steps stored. |
Assign one Lorenz field to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Assign one real to a Lorenz field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(inout) | :: | lhs | Left hand side. |
||
real(kind=R_P), | intent(in) | :: | rhs | Right hand side. |
Update previous time steps.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(inout) | :: | self | Lorenz field. |
||
class(integrand), | intent(in), | optional | :: | filter | Filter field displacement. |
|
real(kind=R_P), | intent(in), | optional | :: | weights(:) | Weights for filtering the steps. |