Define Burgers field that is a concrete extension of the abstract integrand type.
Burgers equations field.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=I_P), | private | :: | Ni | = | 0 | Number of grid nodes. |
|
real(kind=R_P), | private, | dimension(:), allocatable | :: | U | Integrand (state) variables, whole physical domain, [1:Ni]. |
||
integer(kind=I_P), | private | :: | dims | = | 0 | Space dimensions. |
|
real(kind=R_P), | private | :: | h | = | 0._R_P | Space step discretization. |
|
real(kind=R_P), | private | :: | nu | = | 0._R_P | Viscosity. |
|
real(kind=R_P), | private, | dimension(:,:), allocatable | :: | previous | Previous time steps states, [1:Ni,1:steps]. |
||
integer(kind=I_P), | private | :: | steps | = | 0 | Number of time steps stored. |
procedure, public, pass(lhs) :: add => add_burgers | Burgers + Burgers operator. |
procedure, public, pass(lhs) :: assign_integrand => burgers_assign_burgers | Burgers = Burgers. |
procedure, public, pass(lhs) :: assign_real => burgers_assign_real | Burgers = real. |
procedure, public, pass(self) :: dt => compute_dt | Compute the current time step, by means of CFL condition. |
procedure, public, pass(self) :: init | Init field. |
procedure, public, pass(lhs) :: integrand_multiply_integrand => burgers_multiply_burgers | Burgers * burgers operator. |
procedure, public, pass(lhs) :: integrand_multiply_real => burgers_multiply_real | Burgers * real operator. |
procedure, public, pass(lhs) :: local_error => burgers_local_error | Local error. |
procedure, public, pass(self) :: output | Extract Burgers field. |
procedure, public, pass(self) :: previous_step | Get a previous time step. |
procedure, public, pass(rhs) :: real_multiply_integrand => real_multiply_burgers | Real * Burgers operator. |
procedure, public, pass(lhs) :: sub => sub_burgers | Burgers - Burgers operator. |
procedure, public, pass(self) :: t => dBurgers_dt | Time derivative, residuals func. |
procedure, public, pass(self) :: update_previous_steps | Update previous time steps. |
procedure, private, pass(self) :: x => dBurgers_dx | 1st derivative. |
procedure, private, pass(self) :: xx => d2Burgers_dx2 | 2nd derivative. |
Add two Burgers fields.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Estimate local truncation error between 2 burgers approximations.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Error estimation.
Multiply a Burgers field by another one.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Multiply a Burgers field by a real scalar.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | lhs | Left hand side. |
||
real(kind=R_P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Compute the current time step, by means of CFL condition.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | self | Burgers field. |
||
real(kind=R_P), | intent(in) | :: | CFL | Courant-Friedricks-Lewi stability coefficient. |
Current time step.
Time derivative of Burgers field, residuals function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | self | Burgers field. |
||
real(kind=R_P), | intent(in), | optional | :: | t | Time. |
Burgers field time derivative.
Output the Burgers field state.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | self | Burgers field. |
Burgers state variable.
Extract previous time solution of Burgers field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | self | Burgers field. |
||
integer(kind=I_P), | intent(in) | :: | n | Time level. |
Previous time solution of Burgers field.
Multiply a real scalar by a Burgers field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R_P), | intent(in) | :: | lhs | Left hand side. |
||
class(burgers), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Subtract two Burgers fields.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Operator result.
Assign one Burgers field to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Assign one real to a Burgers field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(inout) | :: | lhs | Left hand side. |
||
real(kind=R_P), | intent(in) | :: | rhs | Right hand side. |
Construct an initialized Burgers field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(inout) | :: | self | Burgers field. |
||
real(kind=R_P), | intent(in), | dimension(1:Ni) | :: | initial_state | Initial state of Burgers field domain. |
|
integer(kind=I_P), | intent(in) | :: | Ni | Number of grid nodes. |
||
real(kind=R_P), | intent(in) | :: | h | Space step discretization. |
||
real(kind=R_P), | intent(in) | :: | nu | Viscosity. |
||
integer(kind=I_P), | intent(in), | optional | :: | steps | Time steps stored. |
Update previous time steps.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(burgers), | intent(inout) | :: | self | Burgers field. |
||
class(integrand), | intent(in), | optional | :: | filter | Filter field displacement. |
|
real(kind=R_P), | intent(in), | optional | :: | weights(:) | Weights for filtering the steps. |