recon1d_type module reference

A generic type for vertical 1D reconstructions.

More…

Data Types

recon1d

The base class for implementations of 1D reconstructions.

Functions/Subroutines

remap_to_sub_grid()

Remaps the column to subgrid h_sub.

a_set_debug()

Turns on debugging.

Detailed Description

Generic vertical reconstruction type

A class to describe generic reconstruction in 1-D. This module has no implementations but defines the interfaces for members that implement a reconstruction.

e.g. a chain of derived reconstructions might look like Recon1d_type <- Recond1d_XYZ <- Recon1d_XYZ_v2 where Recon1d_type - defines the interfaces (this module) Recon1d_XYZ - extends Recon1d_type, implements the XYZ reconstruction in reconstruct(), and reconstruc_parent() -> , and reconstruc_parent() -> reconstruct() of the same Recon1d_XYZ module Recon1d_XYZ_v2 - implements a slight variant of Recon1d_XYZ via of the same Recon1d_XYZ module Recon1d_XYZ_v2 - implements a slight variant of Recon1d_XYZ via reconstruct() but reconstruc_parent() is not redefined so that it still is defined by Recon1d_XYZbut reconstruc_parent() is not redefined so that it still is defined by Recon1d_XYZ

The schemes that use this structure are described in Vertical Reconstruction

Type Documentation

type recon1d_type/recon1d

The base class for implementations of 1D reconstructions.

Type fields:
  • % n [integer,private] :: Number of cells in column.

  • % u_mean [real(:),allocatable, private] :: Cell mean [A].

  • % h_neglect [real,private] :: A negligibly small width used in cell reconstructions [same as h, H].

  • % check [logical,private] :: If true, enable some consistency checking.

  • % debug [logical,private] :: If true, dump info as calculations are made (do not enable)

  • % init [procedure( i_init ),deferred, private] :: Deferred implementation of initialization.

  • % reconstruct [procedure( i_reconstruct ),deferred, private] :: Deferred implementation of reconstruction function.

  • % average [procedure( i_average ),deferred, private] :: Deferred implementation of the average over an interval.

  • % f [procedure( i_f ),deferred, private] :: Deferred implementation of evaluating the reconstruction at a point.

  • % dfdx [procedure( i_dfdx ),deferred, private] :: Deferred implementation of the derivative of the reconstruction at a point.

  • % check_reconstruction [procedure( i_check_reconstruction ),deferred, private] :: Deferred implementation of check_reconstruction.

  • % unit_tests [procedure( i_unit_tests ),deferred, private] :: Deferred implementation of unit tests for the reconstruction.

  • % destroy [procedure( i_destroy ),deferred, private] :: Deferred implementation of deallocation.

  • % remap_to_sub_grid [procedure,private] :: Remaps the column to subgrid h_sub.

  • % set_debug [procedure,private] :: Set debugging.

  • % init_parent [procedure( i_init_parent ),deferred, private] :: Second interface to

  • % reconstruct_parent [procedure( i_reconstruct_parent ),deferred, private] :: Second interface to

Function/Subroutine Documentation

subroutine recon1d_type/remap_to_sub_grid(this, h0, u0, n1, h_sub, isrc_start, isrc_end, isrc_max, isub_src, u_sub, uh_sub, u02_err)

Remaps the column to subgrid h_sub.

It is assumed that h_sub is a perfect sub-grid of h0, meaning each h0 cell can be constructed by joining a contiguous set of h_sub cells. The integer indices isrc_start, isrc_end, isub_src provide this mapping, and are calculated in MOM_remapping

Parameters:
  • this :: [in] 1-D reconstruction type

  • h0 :: [in] Source grid widths (size n0) [H]

  • u0 :: [in] Source grid widths (size n0) [H]

  • n1 :: [in] Number of cells in target grid

  • h_sub :: [in] Overlapping sub-cell thicknesses, h_sub [H]

  • isrc_start :: [in] Index of first sub-cell within each source cell

  • isrc_end :: [in] Index of last sub-cell within each source cell

  • isrc_max :: [in] Index of thickest sub-cell within each source cell

  • isub_src :: [in] Index of source cell for each sub-cell

  • u_sub :: [out] Sub-cell cell averages (size n1) [A]

  • uh_sub :: [out] Sub-cell cell integrals (size n1) [A H]

  • u02_err :: [out] Integrated reconstruction error estimates [A H]

subroutine recon1d_type/a_set_debug(this)

Turns on debugging.

Parameters:

this :: [inout] 1-D reconstruction type