perform_test Submodule

This submodule contains the implementation of the PROCEDURES in MODULE cauchy_convergence_test that perform the Cauchy convergence test

FT 22.09.2022



Uses

  • module~~perform_test~~UsesGraph module~perform_test perform_test module~cauchy_convergence_test cauchy_convergence_test module~perform_test->module~cauchy_convergence_test module~utility utility module~perform_test->module~utility tensor tensor module~perform_test->tensor module~cauchy_convergence_test->module~utility module~standard_tpo_formulation standard_tpo_formulation module~cauchy_convergence_test->module~standard_tpo_formulation constants constants module~utility->constants matrix matrix module~utility->matrix module~standard_tpo_formulation->module~utility mesh_refinement mesh_refinement module~standard_tpo_formulation->mesh_refinement module~id_base id_base module~standard_tpo_formulation->module~id_base module~sph_particles sph_particles module~standard_tpo_formulation->module~sph_particles timing timing module~standard_tpo_formulation->timing module~id_base->module~utility module~id_base->timing module~sph_particles->module~utility module~sph_particles->module~id_base module~sph_particles->timing

Contents


Variables

Type Visibility Attributes Name Initial
logical, private, parameter :: debug = .FALSE.
procedure(get_scalar_at_grid_point), private, POINTER :: get_ham_ptr
double precision, private, parameter :: tiny_real = 1D-30

Interfaces

Generic PROCEDURE to compute the Cauchy convergence factor

  • module subroutine compute_convergence_factor_known_sol(nx, ny, nz, num, den, ref_lev, tpo_coarse, tpo_fine, get_hc, convergence_factor)

    Compute the Cauchy convergence factor when the exact solution is known.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx
    integer, intent(in) :: ny
    integer, intent(in) :: nz
    double precision, intent(in) :: num
    double precision, intent(in) :: den
    integer, intent(in) :: ref_lev
    class(tpo), intent(inout) :: tpo_coarse
    class(tpo), intent(inout) :: tpo_fine
    procedure(get_scalar_at_grid_point), intent(in), POINTER :: get_hc
    double precision, intent(inout), DIMENSION(:,:,:), ALLOCATABLE :: convergence_factor
  • module subroutine compute_convergence_factor_unknown_sol(nx, ny, nz, num, den, ref_lev, tpo_coarse, tpo_medium, tpo_fine, get_hc, convergence_factor)

    Compute the Cauchy convergence factor when the exact solution is not known.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx
    integer, intent(in) :: ny
    integer, intent(in) :: nz
    double precision, intent(in) :: num
    double precision, intent(in) :: den
    integer, intent(in) :: ref_lev
    class(tpo), intent(inout) :: tpo_coarse
    class(tpo), intent(inout) :: tpo_medium
    class(tpo), intent(inout) :: tpo_fine
    procedure(get_scalar_at_grid_point), intent(in), POINTER :: get_hc
    double precision, intent(inout), DIMENSION(:,:,:), ALLOCATABLE :: convergence_factor

interface

  • module subroutine get_scalar_at_grid_point(tpof, i, j, k, l, scalar)

    Returns the value of a scalar field at the desired point

    Arguments

    Type IntentOptional Attributes Name
    class(tpo), intent(inout) :: tpof
    integer, intent(in) :: i

    index of the desired point

    integer, intent(in) :: j

    index of the desired point

    integer, intent(in) :: k

    index of the desired point

    integer, intent(in) :: l

    Index of the refinement level

    double precision, intent(out) :: scalar

    Value of the scalar field at


Subroutines

subroutine get_ham(tpof, i, j, k, l, hc)

Wrapper SUBROUTINE to get the value of the Hamiltonian constraint computed using ID read on the refined mesh, at a given mesh point (i,j,k), on the refinement level l, for the tpo object tpof

Arguments

Type IntentOptional Attributes Name
class(tpo), intent(inout) :: tpof

tpo object to use

integer, intent(in) :: i

index of the desired point

integer, intent(in) :: j

index of the desired point

integer, intent(in) :: k

index of the desired point

integer, intent(in) :: l

Index of the refinement level

double precision, intent(out) :: hc

Value of the Hamiltonian constraint at

subroutine get_ham_parts(tpof, i, j, k, l, hc)

Wrapper SUBROUTINE to get the value of the Hamiltonian constraint computed using using the hydro ID mapped from the particles to the refined mesh, at a given mesh point (i,j,k), on the refinement level l, for the tpo object tpof

Arguments

Type IntentOptional Attributes Name
class(tpo), intent(inout) :: tpof

tpo object to use

integer, intent(in) :: i

index of the desired point

integer, intent(in) :: j

index of the desired point

integer, intent(in) :: k

index of the desired point

integer, intent(in) :: l

Index of the refinement level

double precision, intent(out) :: hc

Value of the Hamiltonian constraint at

subroutine print_convergence_factor(nx, ny, nz, shared_grid, convergence_factor, unit, filename)

Print the Cauchy convergence factor to a formatted file

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx
integer, intent(in) :: ny
integer, intent(in) :: nz
double precision, intent(in), DIMENSION(nx,ny,nz,3) :: shared_grid
double precision, intent(in), DIMENSION(nx,ny,nz) :: convergence_factor
integer, intent(in) :: unit
character(len=:), ALLOCATABLE :: filename

Module Procedures

module procedure compute_convergence_factor_known_sol module procedure compute_convergence_factor_known_sol()

Compute the Cauchy convergence factor when the exact solution is known.

Arguments

None

module procedure compute_convergence_factor_unknown_sol module procedure compute_convergence_factor_unknown_sol()

Compute the Cauchy convergence factor when the exact solution is not known.

Arguments

None

module procedure perform_cauchy_convergence_test_known_sol module procedure perform_cauchy_convergence_test_known_sol()

Perform the Cauchy convergence test when the exact solution is known. The ratio between the grid spacings is num/den.

Read more…

Arguments

None

module procedure perform_cauchy_convergence_test_unknown_sol module procedure perform_cauchy_convergence_test_unknown_sol()

Perform the Cauchy convergence test when the exact solution is not known. The ratio between the grid spacings is num/den.

Read more…

Arguments

None