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].

x()

Solver for x: f(x)=t.

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].

  • % x :: procedure, private Implementation of solver for x: f(x)=t.

  • % 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

[source]

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 reconstruction

  • n :: n [in] Number of cells in this column

  • h_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

[source]

subroutine recon1d_pcm/reconstruct(this, h, u)

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

Parameters:
  • this :: this [inout] This reconstruction

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

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

[source]

function  recon1d_pcm/f(this, k, x)

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

Parameters:
  • this :: this [in] This reconstruction

  • k :: k [in] Cell number

  • x :: x [in] Non-dimensional position within element [nondim]

[source]

function  recon1d_pcm/dfdx(this, k, x)

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

Parameters:
  • this :: this [in] This reconstruction

  • k :: k [in] Cell number

  • x :: x [in] Non-dimensional position within element [nondim]

[source]

function  recon1d_pcm/x(this, k, t)

Solver for x: f(x)=t.

Parameters:
  • this :: this [in] This reconstruction

  • k :: k [in] Cell number

  • t :: t [in] Value to solve for [A]

[source]

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 reconstruction

  • k :: k [in] Cell number

  • xa :: xa [in] Start of averaging interval on element (0 to 1)

  • xb :: xb [in] End of averaging interval on element (0 to 1)

[source]

subroutine recon1d_pcm/destroy(this)

Deallocate the PCM reconstruction.

Parameters:

this :: this [inout] This reconstruction

[source]

function  recon1d_pcm/check_reconstruction(this, h, u)

Checks the PCM reconstruction for consistency.

Parameters:
  • this :: this [in] This reconstruction

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

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

[source]

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 reconstruction

  • verbose :: verbose [in] True, if verbose

  • stdout :: stdout [in] I/O channel for stdout

  • stderr :: stderr [in] I/O channel for stderr

[source]

[source]