namespace mom_remapping¶
Overview¶
Provides column-wise vertical remapping functions. More…
namespace mom_remapping { // global variables integer, parameter remapping_pcm = 0; character(len=256), public remappingschemesdoc = "PCM(1st-order accurate)\n"// "PLM(2nd-order accurate)\n"// "PPM_H4(3rd-order accurate)\n"// "PPM_IH4(3rd-order accurate)\n"// "PQM_IH4IH3(4th-order accurate)\n"// "PQM_IH6IH5(5th-order accurate)\n"; character(len=3), public remappingdefaultscheme = "PLM"; // global functions subroutine, public remapping_set_param( CS CS, remapping_scheme remapping_scheme, boundary_extrapolation boundary_extrapolation, check_reconstruction check_reconstruction, check_remapping check_remapping, force_bounds_in_subcell force_bounds_in_subcell ); subroutine, public extract_member_remapping_cs( CS CS, remapping_scheme remapping_scheme, degree degree, boundary_extrapolation boundary_extrapolation, check_reconstruction check_reconstruction, check_remapping check_remapping, force_bounds_in_subcell force_bounds_in_subcell ); subroutine, public remapping_core_h( CS CS, n0 n0, h0 h0, u0 u0, n1 n1, h1 h1, u1 u1, h_neglect h_neglect, h_neglect_edge h_neglect_edge ); subroutine, public remapping_core_w( CS CS, n0 n0, h0 h0, u0 u0, n1 n1, dx dx, u1 u1, h_neglect h_neglect, h_neglect_edge h_neglect_edge ); subroutine, public build_reconstructions_1d( CS CS, n0 n0, h0 h0, u0 u0, ppoly_r_coefs ppoly_r_coefs, ppoly_r_E ppoly_r_E, ppoly_r_S ppoly_r_S, iMethod iMethod, h_neglect h_neglect, h_neglect_edge h_neglect_edge ); real function, public average_value_ppoly( n0 n0, u0 u0, ppoly0_E ppoly0_E, ppoly0_coefs ppoly0_coefs, method method, i0 i0, xa xa, xb xb ); subroutine, public dzfromh1h2(n1 n1, h1 h1, n2 n2, h2 h2, dx dx); subroutine, public initialize_remapping( CS CS, remapping_scheme remapping_scheme, boundary_extrapolation boundary_extrapolation, check_reconstruction check_reconstruction, check_remapping check_remapping, force_bounds_in_subcell force_bounds_in_subcell ); subroutine, public end_remapping(CS CS); logical function, public remapping_unit_tests(verbose verbose); } // namespace mom_remapping
Detailed Documentation¶
Provides column-wise vertical remapping functions.
Global Variables¶
integer, parameter remapping_pcm = 0
O(h^1) remapping scheme.
character(len=256), public remappingschemesdoc = "PCM(1st-order accurate)\n"// "PLM(2nd-order accurate)\n"// "PPM_H4(3rd-order accurate)\n"// "PPM_IH4(3rd-order accurate)\n"// "PQM_IH4IH3(4th-order accurate)\n"// "PQM_IH6IH5(5th-order accurate)\n"
Documentation for external callers.
character(len=3), public remappingdefaultscheme = "PLM"
Default remapping method.
Global Functions¶
subroutine, public remapping_set_param( CS CS, remapping_scheme remapping_scheme, boundary_extrapolation boundary_extrapolation, check_reconstruction check_reconstruction, check_remapping check_remapping, force_bounds_in_subcell force_bounds_in_subcell )
Set parameters within remapping object.
Parameters:
cs |
Remapping control structure |
remapping_scheme |
Remapping scheme to use |
boundary_extrapolation |
Indicate to extrapolate in boundary cells |
check_reconstruction |
Indicate to check reconstructions |
check_remapping |
Indicate to check results of remapping |
force_bounds_in_subcell |
Force subcells values to be bounded |
subroutine, public extract_member_remapping_cs( CS CS, remapping_scheme remapping_scheme, degree degree, boundary_extrapolation boundary_extrapolation, check_reconstruction check_reconstruction, check_remapping check_remapping, force_bounds_in_subcell force_bounds_in_subcell )
Parameters:
cs |
Control structure for remapping module |
remapping_scheme |
Determines which reconstruction scheme to use |
degree |
Degree of polynomial reconstruction |
boundary_extrapolation |
If true, extrapolate boundaries |
check_reconstruction |
If true, reconstructions are checked for consistency. |
check_remapping |
If true, the result of remapping are checked for conservation and bounds. |
force_bounds_in_subcell |
If true, the intermediate values used in remapping are forced to be bounded. |
subroutine, public remapping_core_h( CS CS, n0 n0, h0 h0, u0 u0, n1 n1, h1 h1, u1 u1, h_neglect h_neglect, h_neglect_edge h_neglect_edge )
Remaps column of values u0 on grid h0 to grid h1 assuming the top edge is aligned.
Parameters:
cs |
Remapping control structure |
n0 |
Number of cells on source grid |
h0 |
Cell widths on source grid |
u0 |
Cell averages on source grid |
n1 |
Number of cells on target grid |
h1 |
Cell widths on target grid |
u1 |
Cell averages on target grid |
h_neglect |
A negligibly small width for the purpose of cell reconstructions in the same units as h0. |
h_neglect_edge |
A negligibly small width for the purpose of edge value calculations in the same units as h0. |
subroutine, public remapping_core_w( CS CS, n0 n0, h0 h0, u0 u0, n1 n1, dx dx, u1 u1, h_neglect h_neglect, h_neglect_edge h_neglect_edge )
Remaps column of values u0 on grid h0 to implied grid h1 where the interfaces of h1 differ from those of h0 by dx.
Parameters:
cs |
Remapping control structure |
n0 |
Number of cells on source grid |
h0 |
Cell widths on source grid |
u0 |
Cell averages on source grid |
n1 |
Number of cells on target grid |
dx |
Cell widths on target grid |
u1 |
Cell averages on target grid |
h_neglect |
A negligibly small width for the purpose of cell reconstructions in the same units as h0. |
h_neglect_edge |
A negligibly small width for the purpose of edge value calculations in the same units as h0. |
subroutine, public build_reconstructions_1d( CS CS, n0 n0, h0 h0, u0 u0, ppoly_r_coefs ppoly_r_coefs, ppoly_r_E ppoly_r_E, ppoly_r_S ppoly_r_S, iMethod iMethod, h_neglect h_neglect, h_neglect_edge h_neglect_edge )
Creates polynomial reconstructions of u0 on the source grid h0.
Parameters:
cs |
Remapping control structure |
n0 |
Number of cells on source grid |
h0 |
Cell widths on source grid |
u0 |
Cell averages on source grid |
ppoly_r_coefs |
Coefficients of polynomial |
ppoly_r_e |
Edge value of polynomial |
ppoly_r_s |
Edge slope of polynomial |
imethod |
Integration method |
h_neglect |
A negligibly small width for the purpose of cell reconstructions in the same units as h0. |
h_neglect_edge |
A negligibly small width for the purpose of edge value calculations in the same units as h0. |
real function, public average_value_ppoly( n0 n0, u0 u0, ppoly0_E ppoly0_E, ppoly0_coefs ppoly0_coefs, method method, i0 i0, xa xa, xb xb )
Returns the average value of a reconstruction within a single source cell, i0, between the non-dimensional positions xa and xb (xa<=xb) with dimensional separation dh.
Parameters:
n0 |
Number of cells in source grid |
u0 |
Cell means |
ppoly0_e |
Edge value of polynomial |
ppoly0_coefs |
Coefficients of polynomial |
method |
Remapping scheme to use |
i0 |
Source cell index |
xa |
Non-dimensional start position within source cell |
xb |
Non-dimensional end position within source cell |
subroutine, public dzfromh1h2(n1 n1, h1 h1, n2 n2, h2 h2, dx dx)
Calculates the change in interface positions based on h1 and h2.
Parameters:
n1 |
Number of cells on source grid |
h1 |
Cell widths of source grid (size n1) |
n2 |
Number of cells on target grid |
h2 |
Cell widths of target grid (size n2) |
dx |
Change in interface position (size n2+1) |
subroutine, public initialize_remapping( CS CS, remapping_scheme remapping_scheme, boundary_extrapolation boundary_extrapolation, check_reconstruction check_reconstruction, check_remapping check_remapping, force_bounds_in_subcell force_bounds_in_subcell )
Constructor for remapping control structure.
Parameters:
cs |
Remapping control structure |
remapping_scheme |
Remapping scheme to use |
boundary_extrapolation |
Indicate to extrapolate in boundary cells |
check_reconstruction |
Indicate to check reconstructions |
check_remapping |
Indicate to check results of remapping |
force_bounds_in_subcell |
Force subcells values to be bounded |
subroutine, public end_remapping(CS CS)
Destrcutor for remapping control structure.
Parameters:
cs |
Remapping control structure |
logical function, public remapping_unit_tests(verbose verbose)
Runs unit tests on remapping functions. Should only be called from a single/root thread Returns True if a test fails, otherwise False.
Parameters:
verbose |
If true, write results to stdout |