Module that defines the abstract interface of an equation class.
The initialization routine. There are no additional input arguments. The routine gets it's input from the run-time parameters.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout), | target | :: | this | The equation that is being initialized. |
The RHS routine that sets the RHS variables from the current state of the system.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout) | :: | this | The equation for which the RHS is calculated. |
Set either the main, RHS or temporary variables to zero.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout) | :: | this | The routine is called on this equation. |
||
integer(kind=ip), | intent(in) | :: | dest | Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary). |
The routine that updates the variables defined in an equation. This is used to make the time integrator agnostic to how storage for the variables in the system of equations are set up.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout), | target | :: | this | The routine is called on this equation. |
|
integer(kind=ip), | intent(in) | :: | source | The first source for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary). |
||
integer(kind=ip), | intent(in) | :: | dest | The destination for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary). |
||
integer(kind=ip), | intent(in), | optional | :: | source2 | The second source for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary). |
|
real(kind=wp), | intent(in), | optional | :: | scalar | The scalar multiplying the first source. |
|
real(kind=wp), | intent(in), | optional | :: | scalar2 | The scalar multiplying the second source. |
The routine where the equation can set global variables (for communication with other equations) for the first time.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout) | :: | this | The routine is called on this equation. |
The routine where the equation can set global variables (for communication with other equations) for the first time.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout) | :: | this | The routine is called on this equation. |
The routine where the equation can get global variables (for communication with other equations).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout) | :: | this | The routine is called on this equation. |
The routine where output of the equation's variables is done.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout) | :: | this | The routine is called on this equation. |
The routine where debug output (to stdout) of the equation's variables is done.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(equation), | intent(inout) | :: | this | The routine is called on this equation. |
An abstract equation interface.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=ip), | public | :: | ntmp | The number of temporary storage variables to allocate. |
|||
character(len=:), | public, | allocatable | :: | ename | The name of the system of equations |
procedure(eq_init_interface), public, pass :: init | The initialization routine. Implementation is deferred to the derived class that actually implements an equation system. |
procedure(eq_rhs_interface), public, pass :: rhs | The right hand side (RHS) routine. Implementation is deferred to the derived class that actually implements an equation system. |
procedure(eq_set_to_zero_interface), public, pass :: set_to_zero | Routine to set the main, rhs or temporary variables to zero. Implementation is deferred to the derived class that actually implements an equation system. |
procedure(eq_update_vars_interface), public, pass :: update_vars | Routine to update the main or temporary variables. Implementation is deferred to the derived class that actually implements an equation system. |
procedure(eq_save_globals_1), public, pass :: save_globals_1 | First of 2 routines to set global variables to interact with other equation systems. Implementation is deferred to the derived class that actually implements an equation system. |
procedure(eq_save_globals_2), public, pass :: save_globals_2 | Second of 2 routines to set global variables to interact with other equation systems. Implementation is deferred to the derived class that actually implements an equation system. |
procedure(eq_load_globals), public, pass :: load_globals | Routine to get global variables from other equation systems. Implementation is deferred to the derived class that actually implements an equation system. |
procedure(eq_output), public, pass :: output | Routine to perform output of the equation systems variables. Implementation is deferred to the derived class that actually implements an equation system. |
procedure(eq_print_data), public, pass :: print_data | Routine to perform debug output of the equation systems variables. Implementation is deferred to the derived class that actually implements an equation system. |
A type with pointer that can point to the equation class and any derived class.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
class(equation), | public, | pointer | :: | p | A pointer to the equation class. |