recon1d_type module reference
A generic type for vertical 1D reconstructions.
Data Types
The base class for implementations of 1D reconstructions. |
Functions/Subroutines
Solve for x such that f(x)=t. |
|
Remaps the column to subgrid h_sub. |
|
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, privateNumber of cells in column.% u_mean ::
real, dimension(:), allocatable, privateCell mean [A].% h_neglect ::
real, privateA negligibly small width used in cell reconstructions in the same units as h [H].% x_tolerance ::
real, privateSolver tolerance for x in element (0,1) [nondim].% check ::
logical, privateIf true, enable some consistency checking.% debug ::
logical, privateIf true, dump info as calculations are made (do not enable)% init ::
procedure(i_init), deferred, privateDeferred implementation of initialization.% reconstruct ::
procedure(i_reconstruct), deferred, privateDeferred implementation of reconstruction function.% average ::
procedure(i_average), deferred, privateDeferred implementation of the average over an interval.% f ::
procedure(i_f), deferred, privateDeferred implementation of evaluating the reconstruction at a point.% dfdx ::
procedure(i_dfdx), deferred, privateDeferred implementation of the derivative of the reconstruction at a point.% check_reconstruction ::
procedure(i_check_reconstruction), deferred, privateDeferred implementation of check_reconstruction.% unit_tests ::
procedure(i_unit_tests), deferred, privateDeferred implementation of unit tests for the reconstruction.% destroy ::
procedure(i_destroy), deferred, privateDeferred implementation of deallocation.% x ::
procedure, privateSolves for x such that f(x)=t.% remap_to_sub_grid ::
procedure, privateRemaps the column to subgrid h_sub.% set_debug ::
procedure, privateSet debugging.% init_parent ::
procedure(i_init_parent), deferred, privateSecond interface to% reconstruct_parent ::
procedure(i_reconstruct_parent), deferred, privateSecond interface to
Function/Subroutine Documentation
- function recon1d_type/x(this, k, t)
Solve for x such that f(x)=t.
This solver uses bounded Newton-Raphson method with a fixed number of iterations
- Parameters:
this ::
this[in] This reconstructionk ::
k[in] Cell numbert ::
t[in] Value to solve for [A]
- 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 ::
this[in] 1-D reconstruction typeh0 ::
h0[in] Source grid widths (size n0) [H]u0 ::
u0[in] Source grid widths (size n0) [H]n1 ::
n1[in] Number of cells in target gridh_sub ::
h_sub[in] Overlapping sub-cell thicknesses, h_sub [H]isrc_start ::
isrc_start[in] Index of first sub-cell within each source cellisrc_end ::
isrc_end[in] Index of last sub-cell within each source cellisrc_max ::
isrc_max[in] Index of thickest sub-cell within each source cellisub_src ::
isub_src[in] Index of source cell for each sub-cellu_sub ::
u_sub[out] Sub-cell cell averages (size n1) [A]uh_sub ::
uh_sub[out] Sub-cell cell integrals (size n1) [A H]u02_err ::
u02_err[out] Integrated reconstruction error estimates [A H]
- subroutine recon1d_type/a_set_debug(this)
Turns on debugging.
- Parameters:
this ::
this[inout] 1-D reconstruction type