This submodule contains the implementation of the PROCEDURES in MODULE cauchy_convergence_test that perform the Cauchy convergence test
FT 22.09.2022
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 |
Generic PROCEDURE to compute the Cauchy convergence factor
Compute the Cauchy convergence factor when the exact solution is known.
Type | Intent | Optional | 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 |
Compute the Cauchy convergence factor when the exact solution is not known.
Type | Intent | Optional | 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 |
Returns the value of a scalar field at the desired point
Type | Intent | Optional | 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 |
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
Type | Intent | Optional | 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 |
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
Type | Intent | Optional | 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 |
Print the Cauchy convergence factor to a formatted file
Type | Intent | Optional | 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 |
Compute the Cauchy convergence factor when the exact solution is known.
Compute the Cauchy convergence factor when the exact solution is not known.
Perform the Cauchy convergence test when the exact solution is
known. The ratio between the grid spacings is num/den
.
Perform the Cauchy convergence test when the exact solution is not
known. The ratio between the grid spacings is num/den
.