Advanced Multi-Physics (AMP)
On-Line Documentation
Public Types | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
AMP::Operator::FDBoundaryUtils Class Reference

#include <RadiationDiffusionFDDiscretization.h>

Public Types

enum class  BoundarySide { WEST , EAST }
 Defines a boundary in a given dimension (WEST is the first boundary, and EAST the second) More...
 

Public Member Functions

 FDBoundaryUtils ()=delete
 Prevent instantiation.
 

Static Public Member Functions

static void getBCConstantsFromDB (const AMP::Database &db, size_t boundaryID, double &ak, double &bk, double &rk, double &nk)
 
static size_t getBoundaryIDFromDim (size_t dim, BoundarySide side)
 
static size_t getDimFromBoundaryID (size_t boundaryID)
 
static double ghostValueSolveE (double a, double b, double r, double c, double h, double Eint)
 
static double ghostValueSolveT (double n, double h, double Tint)
 
static void ghostValuesSolve (double a, double b, const std::function< double(double T)> &cHandle, double r, double n, double h, double Eint, double Tint, double &Eg, double &Tg)
 

Static Private Attributes

static constexpr std::string_view a_keys [] = { "a1", "a2", "a3", "a4", "a5", "a6" }
 Keys used to access db constants.
 
static constexpr std::string_view b_keys [] = { "b1", "b2", "b3", "b4", "b5", "b6" }
 
static constexpr std::string_view n_keys [] = { "n1", "n2", "n3", "n4", "n5", "n6" }
 
static constexpr std::string_view r_keys [] = { "r1", "r2", "r3", "r4", "r5", "r6" }
 

Detailed Description

Static class bundling together boundary-related utility data structures and functionality

Definition at line 226 of file RadiationDiffusionFDDiscretization.h.

Member Enumeration Documentation

◆ BoundarySide

Defines a boundary in a given dimension (WEST is the first boundary, and EAST the second)

Enumerator
WEST 
EAST 

Definition at line 242 of file RadiationDiffusionFDDiscretization.h.

Constructor & Destructor Documentation

◆ FDBoundaryUtils()

AMP::Operator::FDBoundaryUtils::FDBoundaryUtils ( )
delete

Prevent instantiation.

Member Function Documentation

◆ getBCConstantsFromDB()

static void AMP::Operator::FDBoundaryUtils::getBCConstantsFromDB ( const AMP::Database db,
size_t  boundaryID,
double &  ak,
double &  bk,
double &  rk,
double &  nk 
)
static

Get the constants ak, bk, rk, nk from the database for the given boundaryID. Note that rk and nk need not exist in the db, and are returned with a default of 0

◆ getBoundaryIDFromDim()

static size_t AMP::Operator::FDBoundaryUtils::getBoundaryIDFromDim ( size_t  dim,
BoundarySide  side 
)
static

Return the boundaryID in {1,...,6} corresponding to a dim in {0,1,2}, given the corresponding side.

◆ getDimFromBoundaryID()

static size_t AMP::Operator::FDBoundaryUtils::getDimFromBoundaryID ( size_t  boundaryID)
static

Assuming a boundaryID in {1,...,6}, get the dimension of the boundary, i.e., boundaries 1 and 2 live in the first dimension, 3 and 4 the second, and 5 and 6 the third.

◆ ghostValueSolveE()

static double AMP::Operator::FDBoundaryUtils::ghostValueSolveE ( double  a,
double  b,
double  r,
double  c,
double  h,
double  Eint 
)
static

On boundary k we have the equation: ak*E + bk * hat{nk} dot ck grad E = rk, where ak, bk, rk, nk, and ck=+k11*D_E(T) are all known constants, and hat{nk} is the outward-facing normal vector at the boundary. This BC is discretized as ak*0.5*[Eg_k + Eint_k] + bk*ck*sign(hat{nk}) *[Eg_k - Eint_k]/h = rk. Here we solve for the ghost point Eg_k and return it.

Parameters
[in]a
[in]b
[in]r
[in]c
[in]h
[in]Eint
Returns
Eg ghost-point value that satisfies the discretized BC
Note
ck=+k11*D_E(T) and not -k11*D_E(T)

◆ ghostValueSolveT()

static double AMP::Operator::FDBoundaryUtils::ghostValueSolveT ( double  n,
double  h,
double  Tint 
)
static

On boundary k we have the equation: hat{nk} dot grad T = nk, where nk is a known constant and hat{nk} is the outward-facing normal vector at the boundary. This BC is discretized as sign(hat{nk}) * [Tg_k - Tint_k]/h = nk. Here we solve for the ghost point Tg_k and return it

Parameters
[in]n
[in]h
[in]Tint
Returns
Tg ghost-point value that satisfies the discretized BC

◆ ghostValuesSolve()

static void AMP::Operator::FDBoundaryUtils::ghostValuesSolve ( double  a,
double  b,
const std::function< double(double T)> &  cHandle,
double  r,
double  n,
double  h,
double  Eint,
double  Tint,
double &  Eg,
double &  Tg 
)
static

On boundary k we have the two equations: ak*E + bk * hat{nk} dot k11*D_E(T) grad E = rk, hat{nk} dot grad T = nK, where ak, bk, rk, and nk are all known constants and hat{nk} is the outward-facing normal vector at the boundary. The discretization of these conditions involves one ghost point for E and T (Eg and Tg), and one interior point (Eint and Tint). Here we solve for the ghost points and return them. Note that this system, although nonlinear, can be solved directly by forward substitution.

Parameters
[in]a
[in]b
[in]r
[in]n
[in]h
[in]Eint
[in]Tint
[in]cHandleis a function taking in T and returning k11*D_E(T)
[out]Egghost-point value for E that satisfies the discretized BCs
[out]Tgghost-point value for T that satisfies the discretized BCs

Member Data Documentation

◆ a_keys

constexpr std::string_view AMP::Operator::FDBoundaryUtils::a_keys[] = { "a1", "a2", "a3", "a4", "a5", "a6" }
staticconstexprprivate

Keys used to access db constants.

Definition at line 231 of file RadiationDiffusionFDDiscretization.h.

◆ b_keys

constexpr std::string_view AMP::Operator::FDBoundaryUtils::b_keys[] = { "b1", "b2", "b3", "b4", "b5", "b6" }
staticconstexprprivate

Definition at line 232 of file RadiationDiffusionFDDiscretization.h.

◆ n_keys

constexpr std::string_view AMP::Operator::FDBoundaryUtils::n_keys[] = { "n1", "n2", "n3", "n4", "n5", "n6" }
staticconstexprprivate

Definition at line 234 of file RadiationDiffusionFDDiscretization.h.

◆ r_keys

constexpr std::string_view AMP::Operator::FDBoundaryUtils::r_keys[] = { "r1", "r2", "r3", "r4", "r5", "r6" }
staticconstexprprivate

Definition at line 233 of file RadiationDiffusionFDDiscretization.h.


The documentation for this class was generated from the following file:



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:44.
Comments on this page