oscillation_test Derived Type

type, public :: oscillation_test

type~~oscillation_test~~InheritsGraph type~oscillation_test oscillation_test command_line_interface command_line_interface command_line_interface->type~oscillation_test cli
Help


Class to handle oscillation test(s).

Test is driven by the Command Line Interface (CLI) options.

Test has only 1 public method execute: it executes test(s) accordingly to cli options.


Source Code


Components

TypeVisibility AttributesNameInitial
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.


Type-Bound Procedures

procedure, public, pass(self) :: execute

Execute selected test(s).

  • private subroutine execute(self)

    Execute test(s).

    Arguments

    Type IntentOptional AttributesName
    class(oscillation_test), intent(inout) :: self

    Test.

procedure, private, pass(self) :: initialize

Initialize test: set Command Line Interface, parse it and check its validity.

  • private subroutine initialize(self)

    Initialize test: set Command Line Interface, parse it and check its validity.

    Arguments

    Type IntentOptional AttributesName
    class(oscillation_test), intent(inout) :: self

    Test.

procedure, private, pass(self) :: test

Perform the test.

  • private subroutine test(self, scheme)

    Perform the test.

    Arguments

    Type IntentOptional AttributesName
    class(oscillation_test), intent(in) :: self

    Test.

    character(len=*), intent(in) :: scheme

    Selected scheme.

Source Code

type :: oscillation_test
   !< Class to handle oscillation test(s).
   !<
   !< Test is driven by the Command Line Interface (CLI) options.
   !<
   !< Test has only 1 public method `execute`: it executes test(s) accordingly to cli options.
   private
   type(command_line_interface) :: cli                     !< Command line interface handler.
   integer(I_P)                 :: error=0                 !< Error handler.
   character(99)                :: scheme=''               !< Scheme used.
   logical                      :: is_fast=.false.         !< Flag for activating fast schemes.
   integer(I_P)                 :: implicit_iterations=0   !< Number of iterations (implicit solvers).
   integer(I_P)                 :: stages=0                !< Number of stages.
   real(R_P), allocatable       :: Dt(:)                   !< Time step(s) exercised.
   real(R_P)                    :: frequency=0.0_R_P       !< Oscillation frequency.
   real(R_P)                    :: U0(1:2)=[0._R_P,0._R_P] !< Initial conditions.
   real(R_P)                    :: final_time=0.0_R_P      !< Final integration time.
   logical                      :: results=.false.         !< Flag for activating results saving.
   character(99)                :: output=''               !< Output files basename.
   logical                      :: exact_solution=.false.  !< Flag for activating exact solution saving.
   logical                      :: errors_analysis=.false. !< Flag for activating errors analysis.
   contains
      ! public methods
      procedure, pass(self) :: execute !< Execute selected test(s).
      ! private methods
      procedure, pass(self), private :: initialize !< Initialize test: set Command Line Interface, parse it and check its validity.
      procedure, pass(self), private :: test       !< Perform the test.
endtype oscillation_test