This MODULE collects PROCEDURES used in the PROGRAM convergence_test
FT 22.09.2022
This MODULE was created on 22.09.2022 to collect already existing PROCEDURES
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
double precision, | public, | parameter | :: | tol | = | 1.D-10 |
Tolerance used as an upper bound for the relative difference between the coordinates of 2 grid points, to consider them the same point |
integer, | public, | parameter | :: | use_constraints_on_mesh | = | 1 |
Parameter that identifies the case where the Cauchy convergence test is performed using the constraints computed using ID read on the refined mesh. Neither the particle ID nor the mapping are used. |
integer, | public, | parameter | :: | use_constraints_with_mapped_hydro | = | 2 |
Parameter that identifies the case where the Cauchy convergence test is performed using the constraints computed using the hydro ID mapped from the particles to the refined mesh. |
Generic PROCEDURE to compute the grid points shared by all the grids used to perform a Cauchy convergence test
Find the grid points shared by the 2 grids used in the
Cauchy convergence test, when the exact solution is
known. The ratio between the grid spacings is num/den
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tpo), | intent(inout) | :: | tpo_coarse | |||
class(tpo), | intent(inout) | :: | tpo_fine | |||
double precision, | intent(in) | :: | num | |||
double precision, | intent(in) | :: | den | |||
integer, | intent(in) | :: | ref_lev | |||
double precision, | intent(out), | DIMENSION(:,:,:,:), ALLOCATABLE | :: | shared_grid |
Find the grid points shared by the 3 grids used in the
Cauchy convergence test, when the exact solution is not
known. The ratio between the grid spacings is num/den
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tpo), | intent(inout) | :: | tpo_coarse | |||
class(tpo), | intent(inout) | :: | tpo_medium | |||
class(tpo), | intent(inout) | :: | tpo_fine | |||
double precision, | intent(in) | :: | num | |||
double precision, | intent(in) | :: | den | |||
integer, | intent(in) | :: | ref_lev | |||
double precision, | intent(out), | DIMENSION(:,:,:,:), ALLOCATABLE | :: | shared_grid |
Generic PROCEDURE to perform the Cauchy convergence test
Perform the Cauchy convergence test when the exact solution is
known. The ratio between the grid spacings is num/den
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tpo), | intent(inout) | :: | tpo_coarse | |||
class(tpo), | intent(inout) | :: | tpo_fine | |||
integer, | intent(in) | :: | use_constraints | |||
double precision, | intent(in) | :: | num | |||
double precision, | intent(in) | :: | den | |||
integer, | intent(in) | :: | ref_lev |
Perform the Cauchy convergence test when the exact solution is not
known. The ratio between the grid spacings is num/den
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tpo), | intent(inout) | :: | tpo_coarse | |||
class(tpo), | intent(inout) | :: | tpo_medium | |||
class(tpo), | intent(inout) | :: | tpo_fine | |||
integer, | intent(in) | :: | use_constraints | |||
double precision, | intent(in) | :: | num | |||
double precision, | intent(in) | :: | den | |||
integer, | intent(in) | :: | ref_lev |