recon1d_pcm module reference

1D reconstructions using the Piecewise Constant Method (PCM)

More…

Data Types

pcm

PCM (piecewise constant) reconstruction.

Functions/Subroutines

init()

Initialize a 1D PCM reconstruction for n cells.

reconstruct()

Calculate a 1D PCM reconstructions based on h(:) and u(:)

f()

Value of PCM reconstruction at a point in cell k [A].

dfdx()

Derivative of PCM reconstruction at a point in cell k [A].

average()

Average between xa and xb for cell k of a 1D PCM reconstruction [A].

destroy()

Deallocate the PCM reconstruction.

check_reconstruction()

Checks the PCM reconstruction for consistency.

unit_tests()

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,private] :: Implementation of the PCM initialization.

  • % reconstruct [procedure,private] :: Implementation of the PCM reconstruction.

  • % average [procedure,private] :: Implementation of the PCM average over an interval [A].

  • % f [procedure,private] :: Implementation of evaluating the PCM reconstruction at a point [A].

  • % dfdx [procedure,private] :: Implementation of the derivative of the PCM reconstruction at a point [A].

  • % destroy [procedure,private] :: Implementation of deallocation for PCM.

  • % check_reconstruction [procedure,private] :: Implementation of check reconstruction for the PCM reconstruction.

  • % unit_tests [procedure,private] :: Implementation of unit tests for the PCM reconstruction.

  • % init_parent [procedure,private] :: Duplicate interface to

  • % reconstruct_parent [procedure,private] :: Duplicate interface to

Function/Subroutine Documentation

subroutine recon1d_pcm/init(this, n, h_neglect, check)

Initialize a 1D PCM 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]. Not used by PCM.

  • 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 :: [inout] This reconstruction

  • h :: [in] Grid spacing (thickness) [typically H]

  • u :: [in] Cell mean values [A]

function recon1d_pcm/f(this, k, x) [real]

Value of PCM 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_pcm/dfdx(this, k, x) [real]

Derivative of PCM 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_pcm/average(this, k, xa, xb) [real]

Average between xa and xb for cell k of a 1D PCM 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_pcm/destroy(this)

Deallocate the PCM reconstruction.

Parameters:

this :: [inout] This reconstruction

function recon1d_pcm/check_reconstruction(this, h, u) [logical]

Checks the PCM reconstruction for consistency.

Parameters:
  • this :: [in] This reconstruction

  • h :: [in] Grid spacing (thickness) [typically H]

  • u :: [in] Cell mean values [A]

function recon1d_pcm/unit_tests(this, verbose, stdout, stderr) [logical]

Runs PCM 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