recon1d_pcm module reference
1D reconstructions using the Piecewise Constant Method (PCM)
Data Types
PCM (piecewise constant) reconstruction. |
Functions/Subroutines
Initialize a 1D PCM reconstruction for n cells. |
|
Calculate a 1D PCM reconstructions based on h(:) and u(:) |
|
Value of PCM reconstruction at a point in cell k [A]. |
|
Derivative of PCM reconstruction at a point in cell k [A]. |
|
Solver for x: f(x)=t. |
|
Average between xa and xb for cell k of a 1D PCM reconstruction [A]. |
|
Deallocate the PCM reconstruction. |
|
Checks the PCM reconstruction for consistency. |
|
Runs PCM reconstruction unit tests and returns True for any fails, False otherwise. |
Detailed Description
1D reconstructions using the Piecewise Constant Method (PCM)
Type Documentation
- type recon1d_pcm/pcm
PCM (piecewise constant) reconstruction.
- Type fields:
% init ::
procedure, privateImplementation of the PCM initialization.% reconstruct ::
procedure, privateImplementation of the PCM reconstruction.% average ::
procedure, privateImplementation of the PCM average over an interval [A].% f ::
procedure, privateImplementation of evaluating the PCM reconstruction at a point [A].% dfdx ::
procedure, privateImplementation of the derivative of the PCM reconstruction at a point [A].% x ::
procedure, privateImplementation of solver for x: f(x)=t.% destroy ::
procedure, privateImplementation of deallocation for PCM.% check_reconstruction ::
procedure, privateImplementation of check reconstruction for the PCM reconstruction.% unit_tests ::
procedure, privateImplementation of unit tests for the PCM reconstruction.% init_parent ::
procedure, privateDuplicate interface to% reconstruct_parent ::
procedure, privateDuplicate interface to
Function/Subroutine Documentation
- subroutine recon1d_pcm/init(this, n, h_neglect, check)
Initialize a 1D PCM reconstruction for n cells.
- Parameters:
this ::
this[out] This reconstructionn ::
n[in] Number of cells in this columnh_neglect ::
h_neglect[in] A negligibly small width used in cell reconstructions [H]. Not used by PCM.check ::
check[in] If true, enable some consistency checking
- subroutine recon1d_pcm/reconstruct(this, h, u)
Calculate a 1D PCM reconstructions based on h(:) and u(:)
- Parameters:
this ::
this[inout] This reconstructionh ::
h[in] Grid spacing (thickness) [typically H]u ::
u[in] Cell mean values [A]
- function recon1d_pcm/f(this, k, x)
Value of PCM reconstruction at a point in cell k [A].
- Parameters:
this ::
this[in] This reconstructionk ::
k[in] Cell numberx ::
x[in] Non-dimensional position within element [nondim]
- function recon1d_pcm/dfdx(this, k, x)
Derivative of PCM reconstruction at a point in cell k [A].
- Parameters:
this ::
this[in] This reconstructionk ::
k[in] Cell numberx ::
x[in] Non-dimensional position within element [nondim]
- function recon1d_pcm/x(this, k, t)
Solver for x: f(x)=t.
- Parameters:
this ::
this[in] This reconstructionk ::
k[in] Cell numbert ::
t[in] Value to solve for [A]
- function recon1d_pcm/average(this, k, xa, xb)
Average between xa and xb for cell k of a 1D PCM reconstruction [A].
- Parameters:
this ::
this[in] This reconstructionk ::
k[in] Cell numberxa ::
xa[in] Start of averaging interval on element (0 to 1)xb ::
xb[in] End of averaging interval on element (0 to 1)
- subroutine recon1d_pcm/destroy(this)
Deallocate the PCM reconstruction.
- Parameters:
this ::
this[inout] This reconstruction
- function recon1d_pcm/check_reconstruction(this, h, u)
Checks the PCM reconstruction for consistency.
- Parameters:
this ::
this[in] This reconstructionh ::
h[in] Grid spacing (thickness) [typically H]u ::
u[in] Cell mean values [A]
- function recon1d_pcm/unit_tests(this, verbose, stdout, stderr)
Runs PCM reconstruction unit tests and returns True for any fails, False otherwise.
- Parameters:
this ::
this[inout] This reconstructionverbose ::
verbose[in] True, if verbosestdout ::
stdout[in] I/O channel for stdoutstderr ::
stderr[in] I/O channel for stderr