Oscillation test handler definition.
Class to handle oscillation test(s).
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=R_P), | private, | allocatable | :: | Dt(:) | Time step(s) exercised. |
||
real(kind=R_P), | private | :: | U0(1:2) | = | [0._R_P, 0._R_P] | Initial conditions. |
|
type(command_line_interface), | private | :: | cli | Command line interface handler. |
|||
integer(kind=I_P), | private | :: | error | = | 0 | Error handler. |
|
logical, | private | :: | errors_analysis | = | .false. | Flag for activating errors analysis. |
|
logical, | private | :: | exact_solution | = | .false. | Flag for activating exact solution saving. |
|
real(kind=R_P), | private | :: | final_time | = | 0.0_R_P | Final integration time. |
|
real(kind=R_P), | private | :: | frequency | = | 0.0_R_P | Oscillation frequency. |
|
integer(kind=I_P), | private | :: | implicit_iterations | = | 0 | Number of iterations (implicit solvers). |
|
logical, | private | :: | is_fast | = | .false. | Flag for activating fast schemes. |
|
character(len=99), | private | :: | output | = | '' | Output files basename. |
|
logical, | private | :: | results | = | .false. | Flag for activating results saving. |
|
character(len=99), | private | :: | scheme | = | '' | Scheme used. |
|
integer(kind=I_P), | private | :: | stages | = | 0 | Number of stages. |
procedure, public, pass(self) :: execute | Execute selected test(s). |
procedure, private, pass(self) :: initialize | Initialize test: set Command Line Interface, parse it and check its validity. |
procedure, private, pass(self) :: test | Perform the test. |
Estimate the order of accuracy using 2 subsequent refined numerical solutions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R_P), | intent(in) | :: | error(1:,1:) | Computed errors. |
||
real(kind=R_P), | intent(in) | :: | Dt(1:) | Time steps used. |
Estimation of the order of accuracy.
Check if a scheme support fast mode integrate.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | scheme | Scheme name. |
||
class(integrator_object), | intent(in) | :: | integrator | Integrator instance. |
Execute test(s).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(oscillation_test), | intent(inout) | :: | self | Test. |
Initialize test: set Command Line Interface, parse it and check its validity.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(oscillation_test), | intent(inout) | :: | self | Test. |
Integrate domain by means of the given scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | scheme | Selected scheme. |
||
real(kind=R_P), | intent(in) | :: | frequency | Oscillation frequency. |
||
real(kind=R_P), | intent(in) | :: | U0(1:) | Initial state. |
||
real(kind=R_P), | intent(in) | :: | final_time | Final integration time. |
||
real(kind=R_P), | intent(in) | :: | Dt | Time step. |
||
integer(kind=I_P), | intent(in) | :: | iterations | Number of fixed point iterations. |
||
integer(kind=I_P), | intent(in) | :: | stages | Number of stages. |
||
logical, | intent(in) | :: | is_fast | Activate fast mode integration. |
||
real(kind=R_P), | intent(out), | allocatable | :: | solution(:,:) | Solution at each time step, X-Y. |
|
real(kind=R_P), | intent(out) | :: | error(1:) | Error (norm L2) with respect the exact solution. |
||
integer(kind=I_P), | intent(out) | :: | last_step | Last time step computed. |
Save results (and plots).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | results | Flag for activating results saving. |
||
character(len=*), | intent(in) | :: | output | Output files basename coming from CLI. |
||
character(len=*), | intent(in) | :: | scheme | Selected scheme: must be defined into solvers. |
||
real(kind=R_P), | intent(in) | :: | frequency | Oscillation frequency. |
||
real(kind=R_P), | intent(in) | :: | U0(1:) | Initial state. |
||
logical, | intent(in) | :: | save_exact_solution | Flag for saving exact solution. |
||
real(kind=R_P), | intent(in) | :: | solution(0:,0:) | Solution at each time step. |
Perform the test.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(oscillation_test), | intent(in) | :: | self | Test. |
||
character(len=*), | intent(in) | :: | scheme | Selected scheme. |