recon1d_ppm_cw module reference

Piecewise Parabolic Method 1D reconstruction following Colella and Woodward, 1984.

More…

Data Types

ppm_cw

PPM reconstruction following Colella and Woordward, 1984.

Functions/Subroutines

init()

Initialize a 1D PPM_CW reconstruction for n cells.

reconstruct()

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

f()

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

dfdx()

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

average()

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

destroy()

Deallocate the PPM_CW reconstruction.

check_reconstruction()

Checks the PPM_CW reconstruction for consistency.

unit_tests()

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

Detailed Description

This is a near faithful implementation of PPM following Colella and Woodward, 1984, with cells resorting to PCM for extrema including first and last cells in column. The only exception is that the PLM slopes used for edge interpolation are not set to zero for the first and last cells, but are side-differenced. This improves accuracy of edge values near boundaries and reduces the adverse influence of the boundaries on the interior reconstructions. The final PPM reconstruction in the first and last cells are set to PCM. The reconstructions are grid-spacing dependent, and so quasi-forth order in h.

Type Documentation

type  recon1d_ppm_cw/ppm_cw

PPM reconstruction following Colella and Woordward, 1984.

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

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

  • % plm :: type(plm_cw), private The PLM reconstruction used to estimate edge values.

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

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

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

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

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

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

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

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

  • % init_parent :: procedure, private Duplicate interface to

  • % reconstruct_parent :: procedure, private Duplicate interface to

[source]

Function/Subroutine Documentation

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

Initialize a 1D PPM_CW 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_ppm_cw/reconstruct(this, h, u)

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

Value of PPM_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_ppm_cw/dfdx(this, k, x)

Derivative of PPM_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_ppm_cw/average(this, k, xa, xb)

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

Deallocate the PPM_CW reconstruction.

Parameters:

this :: this [inout] This reconstruction

[source]

function  recon1d_ppm_cw/check_reconstruction(this, h, u)

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

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