recon1d_plm_cw module reference

Piecewise Linear Method 1D reconstruction.

More…

Data Types

plm_cw

PLM reconstruction following Colella and Woodward, 1984.

Functions/Subroutines

init()

Initialize a 1D PLM reconstruction for n cells.

reconstruct()

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

f()

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

dfdx()

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

x()

Solver for x such that f(x)=t.

average()

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

destroy()

Deallocate the PLM reconstruction.

check_reconstruction()

Checks the PLM_CW reconstruction for consistency.

unit_tests()

Runs PLM reconstruction unit tests and returns True for any fails, False otherwise.

Detailed Description

This implementation of PLM follows Colella and Woodward, 1984 [17], with cells resorting to PCM for extrema including the 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 neighboring cell means. This does not yield monotonic profiles for the general remapping problem.

Type Documentation

type  recon1d_plm_cw/plm_cw

PLM reconstruction following Colella and Woodward, 1984.

Type fields:
  • % ul :: real, dimension(:), allocatable, private Left edge value [A].

  • % ur :: real, dimension(:), allocatable, private Right edge value [A].

  • % init :: procedure, private Implementation of the PLM_CW initialization.

  • % reconstruct :: procedure, private Implementation of the PLM_CW reconstruction.

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

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

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

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

  • % destroy :: procedure, private Implementation of deallocation for PLM_CW.

  • % check_reconstruction :: procedure, private Implementation of check reconstruction for the PLM_CW reconstruction.

  • % unit_tests :: procedure, private Implementation of unit tests for the PLM_CW reconstruction.

  • % init_parent :: procedure, private Duplicate interface to

  • % reconstruct_parent :: procedure, private Duplicate interface to

[source]

Function/Subroutine Documentation

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

Initialize a 1D PLM 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]

  • check :: check [in] If true, enable some consistency checking

[source]

subroutine recon1d_plm_cw/reconstruct(this, h, u)

Calculate a 1D PLM 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_plm_cw/f(this, k, x)

Value of PLM_CW 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]

Call to:

x

[source]

function  recon1d_plm_cw/dfdx(this, k, x)

Derivative of PLM_CW 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_plm_cw/x(this, k, t)

Solver for x such that f(x)=t.

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

  • k :: k [in] Cell number

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

Called from:

f

[source]

function  recon1d_plm_cw/average(this, k, xa, xb)

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

Deallocate the PLM reconstruction.

Parameters:

this :: this [inout] This reconstruction

[source]

function  recon1d_plm_cw/check_reconstruction(this, h, u)

Checks the PLM_CW 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_plm_cw/unit_tests(this, verbose, stdout, stderr)

Runs PLM 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]