recon1d_plm_hybgen module reference¶
Piecewise Linear Method 1D reconstruction ported from “hybgen” module in Hycom.
Data Types¶
PLM reconstruction following “hybgen”. |
Functions/Subroutines¶
Initialize a 1D PLM reconstruction for n cells. |
|
Calculate a 1D PLM reconstructions based on h(:) and u(:) |
|
Value of PLM_hybgen reconstruction at a point in cell k [A]. |
|
Derivative of PLM_hybgen reconstruction at a point in cell k [A]. |
|
Average between xa and xb for cell k of a 1D PLM reconstruction [A]. |
|
Deallocate the PLM reconstruction. |
|
Checks the PLM_hybgen reconstruction for consistency. |
|
Runs PLM reconstruction unit tests and returns True for any fails, False otherwise. |
Detailed Description¶
This implementation of PLM follows Colella and Woodward, 1984, with cells resorting to PCM for extrema including first and last cells in column. The cell-wise reconstructions are limited so that the edge values (which are also the extrema in a cell) are bounded by the neighbors. The limiter yields monotonicity for the CFL<1 transport problem where parts of a cell can only move to a neighboring cell, but does not yield monotonic profiles for the general remapping problem. The first and last cells are always limited to PCM.
The mom_hybgen_remap.hybgen_plm_coefs() function calculates PLM coefficients numerically equiavalent to the function calculates PLM coefficients numerically equiavalent to the recon1d_plm_hybgen() module (this implementation). module (this implementation).
Type Documentation¶
-
type
recon1d_plm_hybgen/plm_hybgen¶ PLM reconstruction following “hybgen”.
- Type fields:
%ul[real(:),allocatable, private] :: Left edge value [A].%ur[real(:),allocatable, private] :: Right edge value [A].%slp[real(:),allocatable, private] :: Right minus left edge values [A].%init[procedure,private] :: Implementation of the PLM_hybgen initialization.%reconstruct[procedure,private] :: Implementation of the PLM_hybgen reconstruction.%average[procedure,private] :: Implementation of the PLM_hybgen average over an interval [A].%f[procedure,private] :: Implementation of evaluating the PLM_hybgen reconstruction at a point [A].%dfdx[procedure,private] :: Implementation of the derivative of the PLM_hybgen reconstruction at a point [A].%destroy[procedure,private] :: Implementation of deallocation for PLM_hybgen.%check_reconstruction[procedure,private] :: Implementation of check reconstruction for the PLM_hybgen reconstruction.%unit_tests[procedure,private] :: Implementation of unit tests for the PLM_hybgen reconstruction.%init_parent[procedure,private] :: Duplicate interface to%reconstruct_parent[procedure,private] :: Duplicate interface to
Function/Subroutine Documentation¶
-
subroutine
recon1d_plm_hybgen/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_plm_hybgen/reconstruct(this, h, u)¶ Calculate a 1D PLM reconstructions based on h(:) and u(:)
- Parameters:
this :: [inout] This reconstruction
h :: [in] Grid spacing (thickness) [typically H]
u :: [in] Cell mean values [A]
-
function
recon1d_plm_hybgen/f(this, k, x) [real]¶ Value of PLM_hybgen reconstruction at a point in cell k [A].
- Parameters:
this :: [in] This reconstruction
k :: [in] Cell number
x :: [in] Non-dimensional position within element [nondim]
-
function
recon1d_plm_hybgen/dfdx(this, k, x) [real]¶ Derivative of PLM_hybgen reconstruction at a point in cell k [A].
- Parameters:
this :: [in] This reconstruction
k :: [in] Cell number
x :: [in] Non-dimensional position within element [nondim]
-
function
recon1d_plm_hybgen/average(this, k, xa, xb) [real]¶ Average between xa and xb for cell k of a 1D PLM reconstruction [A].
- 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_plm_hybgen/destroy(this)¶ Deallocate the PLM reconstruction.
- Parameters:
this :: [inout] This reconstruction
-
function
recon1d_plm_hybgen/check_reconstruction(this, h, u) [logical]¶ Checks the PLM_hybgen reconstruction for consistency.
- Parameters:
this :: [in] This reconstruction
h :: [in] Grid spacing (thickness) [typically H]
u :: [in] Cell mean values [A]
-
function
recon1d_plm_hybgen/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