recon1d_mplm_wa_poly module reference¶
Monotonized Piecewise Linear Method 1D reconstruction using polynomial representation.
Data Types¶
Limited Monotonic PLM reconstruction following White and Adcroft, 2008. |
Functions/Subroutines¶
Initialize a 1D PLM reconstruction for n cells. |
|
Calculate a 1D MPLM_WA_poly reconstructions based on h(:) and u(:) |
|
Returns a limited PLM slope following White and Adcroft, 2008, in the same arbitrary units [A] as the input values. |
|
Returns a limited PLM slope following Colella and Woodward 1984, in the same arbitrary units as the input values [A]. |
|
Average between xa and xb for cell k of a 1D PLM reconstruction [A] Note: this uses the simple polynomial form a + b * x on x E (0,1) which can overshoot at x=1. |
|
Remaps the column to subgrid h_sub. |
|
Checks the MPLM_WA_poly reconstruction for consistency. |
|
Runs PLM reconstruction unit tests and returns True for any fails, False otherwise. |
Detailed Description¶
This implementation of PLM follows White and Adcroft, 2008 [87]. The PLM slopes are first limited following Colella and Woodward, 1984, but are then further limited to ensure the edge values moving across cell boundaries are monotone. The first and last cells are always limited to PCM.
This stores and evaluates the reconstruction using a polynomial representation which is not preferred but was the form used in OM4.
Type Documentation¶
-
type
recon1d_mplm_wa_poly/mplm_wa_poly¶ Limited Monotonic PLM reconstruction following White and Adcroft, 2008.
- Type fields:
%degree[integer,private] :: Degree of polynomial used in legacy representation.%poly_coef[real(:,:),allocatable, private] :: Polynomial coefficients in legacy representation.%init[procedure,private] :: Implementation of the MPLM_WA_poly initialization.%reconstruct[procedure,private] :: Implementation of the MPLM_WA_poly reconstruction.%average[procedure,private] :: Implementation of the MPLM_WA_poly average over an interval [A].%check_reconstruction[procedure,private] :: Implementation of check reconstruction for the MPLM_WA_poly reconstruction.%unit_tests[procedure,private] :: Implementation of unit tests for the MPLM_WA_poly reconstruction.%init_parent[procedure,private] :: Duplicate interface to%reconstruct_parent[procedure,private] :: Duplicate interface to%remap_to_sub_grid[procedure,private] :: Remaps the column to subgrid h_sub.
Function/Subroutine Documentation¶
-
subroutine
recon1d_mplm_wa_poly/init(this, n, h_neglect, check)¶ Initialize a 1D PLM reconstruction for n cells.
- Parameters:
this :: [out] This reconstruction
n :: [in] Number of cells in this column
h_neglect :: [in] A negligibly small width used in cell reconstructions [H]
check :: [in] If true, enable some consistency checking
-
subroutine
recon1d_mplm_wa_poly/reconstruct(this, h, u)¶ Calculate a 1D MPLM_WA_poly reconstructions based on h(:) and u(:)
- Parameters:
this :: [inout] This reconstruction
h :: [in] Grid spacing (thickness) [typically H]
u :: [in] Cell mean values [A]
- Call to:
-
function
recon1d_mplm_wa_poly/plm_slope_wa(h_l, h_c, h_r, h_neglect, u_l, u_c, u_r) [pure]¶ Returns a limited PLM slope following White and Adcroft, 2008, in the same arbitrary units [A] as the input values. Note that this is not the same as the Colella and Woodward method.
- Parameters:
h_l :: [in] Thickness of left cell in arbitrary grid thickness units [H]
h_c :: [in] Thickness of center cell in arbitrary grid thickness units [H]
h_r :: [in] Thickness of right cell in arbitrary grid thickness units [H]
h_neglect :: [in] A negligible thickness [H]
u_l :: [in] Value of left cell in arbitrary units [A]
u_c :: [in] Value of center cell in arbitrary units [A]
u_r :: [in] Value of right cell in arbitrary units [A]
- Called from:
-
function
recon1d_mplm_wa_poly/plm_monotonized_slope(u_l, u_c, u_r, s_l, s_c, s_r) [pure]¶ Returns a limited PLM slope following Colella and Woodward 1984, in the same arbitrary units as the input values [A].
- Parameters:
u_l :: [in] Value of left cell in arbitrary units [A]
u_c :: [in] Value of center cell in arbitrary units [A]
u_r :: [in] Value of right cell in arbitrary units [A]
s_l :: [in] PLM slope of left cell [A]
s_c :: [in] PLM slope of center cell [A]
s_r :: [in] PLM slope of right cell [A]
- Called from:
-
function
recon1d_mplm_wa_poly/average(this, k, xa, xb) [real]¶ Average between xa and xb for cell k of a 1D PLM reconstruction [A] Note: this uses the simple polynomial form a + b * x on x E (0,1) which can overshoot at x=1.
- Parameters:
this :: [in] This reconstruction
k :: [in] Cell number
xa :: [in] Start of averaging interval on element (0 to 1)
xb :: [in] End of averaging interval on element (0 to 1)
-
subroutine
recon1d_mplm_wa_poly/remap_to_sub_grid(this, h0, u0, n1, h_sub, isrc_start, isrc_end, isrc_max, isub_src, u_sub, uh_sub, u02_err)¶ Remaps the column to subgrid h_sub.
It is assumed that h_sub is a perfect sub-grid of h0, meaning each h0 cell can be constructed by joining a contiguous set of h_sub cells. The integer indices isrc_start, isrc_end, isub_src provide this mapping, and are calculated in MOM_remapping
- Parameters:
this :: [in] 1-D reconstruction type
h0 :: [in] Source grid widths (size n0) [H]
u0 :: [in] Source grid widths (size n0) [H]
n1 :: [in] Number of cells in target grid
h_sub :: [in] Overlapping sub-cell thicknesses, h_sub [H]
isrc_start :: [in] Index of first sub-cell within each source cell
isrc_end :: [in] Index of last sub-cell within each source cell
isrc_max :: [in] Index of thickest sub-cell within each source cell
isub_src :: [in] Index of source cell for each sub-cell
u_sub :: [out] Sub-cell cell averages (size n1) [A]
uh_sub :: [out] Sub-cell cell integrals (size n1) [A H]
u02_err :: [out] Integrated reconstruction error estimates [A H]
-
function
recon1d_mplm_wa_poly/check_reconstruction(this, h, u) [logical]¶ Checks the MPLM_WA_poly reconstruction for consistency.
- Parameters:
this :: [in] This reconstruction
h :: [in] Grid spacing (thickness) [typically H]
u :: [in] Cell mean values [A]
-
function
recon1d_mplm_wa_poly/unit_tests(this, verbose, stdout, stderr) [logical]¶ Runs PLM reconstruction unit tests and returns True for any fails, False otherwise.
- Parameters:
this :: [inout] This reconstruction
verbose :: [in] True, if verbose
stdout :: [in] I/O channel for stdout
stderr :: [in] I/O channel for stderr