Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Private Types | Private Attributes | List of all members
AMP::ManufacturedSolution Class Referencefinal

#include <ManufacturedSolution.h>

Public Member Functions

std::array< double, 10 > evaluate (double x, double y, double z) const
 
const std::string & get_name () const
 
const auto & geta () const
 
const auto & getc () const
 
const auto & geth () const
 
const auto & geths () const
 
size_t getNumberOfInputs () const
 
size_t getNumberOfParameters () const
 
 ManufacturedSolution (std::shared_ptr< Database > db)
 
void setTricubicParams (const std::valarray< double > &cin, const std::valarray< double > &ain)
 

Private Types

enum class  BCType {
  NEUMANN , DIRICHLET1 , DIRICHLET2 , DIRICHLETZ2 ,
  NONE , LASTType
}
 
enum class  FunctionType { POLYNOMIAL , GENERALQUADRATIC }
 
enum class  Geometry {
  BRICK , CYLROD , CYLRODRZ , CYLSHELL ,
  QTRCYLSHELL , LASTGeometry
}
 
enum class  Order {
  QUADRATIC , CUBIC , FOURIER , GAUSSIAN ,
  LASTOrder
}
 

Private Attributes

std::valarray< double > d_a
 
BCType d_bcType
 
std::valarray< double > d_c
 
bool d_CylindricalCoords
 
std::function< std::array< double, 10 >(double, double, double, const ManufacturedSolution *)> d_functionPointer
 
FunctionType d_FunctionType
 
Geometry d_geom
 
std::array< std::array< double, 3 >, 3 > d_h
 
std::array< std::array< double, 3 >, 3 > d_hs
 
double d_MaximumTheta
 
double d_MaxR
 
double d_MaxTh
 
double d_MaxX
 
double d_MaxY
 
double d_MaxZ
 
double d_MinR
 
double d_MinTh
 
double d_MinX
 
double d_MinY
 
double d_MinZ
 
std::string d_Name
 
size_t d_NumberOfInputs
 
size_t d_NumberOfParameters
 
Order d_order
 
double d_ScaleR
 
double d_ScaleTh
 
double d_ScaleX
 
double d_ScaleY
 
double d_ScaleZ
 

Detailed Description

Manufactured solution functions. These are the most general 3d tri-quadratic and tri-cubic polynomials that satisfy the following general boundary conditions on domains of the unit cube, unit cylindrical shell, unit cylindrical quarter shell, and unit cylindrical rod, denoted by \(V\):

\begin{eqnarray*} u(x,y,z) = c_i, \quad (x,y,z)\in \partial V_i, i \in {0,\dots,N_D} \\ \nabla u \cdot n_i = d_i, \quad (x,y,z) \in \partial V_i, i \in {0,\dots,N_N} \end{eqnarray*}

where \(\bigcup_{i} \partial V_i = V\), \(\mathrm{int} \partial V_i \cap \mathrm{int} \partial V_j = \emptyset\), \(N_D + N_N = N_V\) is the number of surfaces in the boundary of \(V\). The volume \(V\) is defined as follows

\begin{eqnarray*} \mathrm{unit\:cube} \quad 0 \leq x \leq 1 \quad 0 \leq y \leq 1 \quad 0 \leq z \leq 1 \\ \mathrm{unit\:rod} \quad 0 \leq r \leq 1 \quad 0 \leq \theta \leq 2 \pi \quad 0 \leq z \leq 1 \\ \mathrm{unit\:shell} \quad 1/2 \leq r \leq 1 \quad 0 \leq \theta \leq 2 \pi \quad 0 \leq z \leq 1 \\ \mathrm{unit\:quarter\:shell} \quad 1/2 \leq r \leq 1 \quad 0 \leq \theta \leq \pi / 2 \quad 0 \leq z \leq 1 \end{eqnarray*}

These polynomials were derived via symbolic computation, and the code was automatically generated in efficient Horner form.

Not all possibilities are non-trivial. The constructor will tell you which ones are available.

Note: some of these are mislabeled at the moment. The cubes and rods are all good. The quarter-shell are suspect.

Definition at line 47 of file ManufacturedSolution.h.

Member Enumeration Documentation

◆ BCType

enum class AMP::ManufacturedSolution::BCType
strongprivate
Enumerator
NEUMANN 
DIRICHLET1 
DIRICHLET2 
DIRICHLETZ2 
NONE 
LASTType 

Definition at line 82 of file ManufacturedSolution.h.

◆ FunctionType

enum class AMP::ManufacturedSolution::FunctionType
strongprivate
Enumerator
POLYNOMIAL 
GENERALQUADRATIC 

Definition at line 79 of file ManufacturedSolution.h.

◆ Geometry

enum class AMP::ManufacturedSolution::Geometry
strongprivate
Enumerator
BRICK 
CYLROD 
CYLRODRZ 
CYLSHELL 
QTRCYLSHELL 
LASTGeometry 

Definition at line 80 of file ManufacturedSolution.h.

◆ Order

enum class AMP::ManufacturedSolution::Order
strongprivate
Enumerator
QUADRATIC 
CUBIC 
FOURIER 
GAUSSIAN 
LASTOrder 

Definition at line 81 of file ManufacturedSolution.h.

Constructor & Destructor Documentation

◆ ManufacturedSolution()

AMP::ManufacturedSolution::ManufacturedSolution ( std::shared_ptr< Database db)
explicit

Member Function Documentation

◆ evaluate()

std::array< double, 10 > AMP::ManufacturedSolution::evaluate ( double  x,
double  y,
double  z 
) const

Evaluate the manufactured solution at a point.

Parameters
xx-coordinate
yy-coordinate
zz-coordinate

◆ get_name()

const std::string & AMP::ManufacturedSolution::get_name ( ) const
inline

Definition at line 70 of file ManufacturedSolution.h.

References d_Name.

◆ geta()

const auto & AMP::ManufacturedSolution::geta ( ) const
inline

Definition at line 74 of file ManufacturedSolution.h.

References d_a.

◆ getc()

const auto & AMP::ManufacturedSolution::getc ( ) const
inline

Definition at line 73 of file ManufacturedSolution.h.

References d_c.

◆ geth()

const auto & AMP::ManufacturedSolution::geth ( ) const
inline

Definition at line 75 of file ManufacturedSolution.h.

References d_h.

◆ geths()

const auto & AMP::ManufacturedSolution::geths ( ) const
inline

Definition at line 76 of file ManufacturedSolution.h.

References d_hs.

◆ getNumberOfInputs()

size_t AMP::ManufacturedSolution::getNumberOfInputs ( ) const
inline

Definition at line 62 of file ManufacturedSolution.h.

References d_NumberOfInputs.

◆ getNumberOfParameters()

size_t AMP::ManufacturedSolution::getNumberOfParameters ( ) const
inline

Definition at line 60 of file ManufacturedSolution.h.

References d_NumberOfParameters.

◆ setTricubicParams()

void AMP::ManufacturedSolution::setTricubicParams ( const std::valarray< double > &  cin,
const std::valarray< double > &  ain 
)
inline

Definition at line 64 of file ManufacturedSolution.h.

References d_a, and d_c.

Member Data Documentation

◆ d_a

std::valarray<double> AMP::ManufacturedSolution::d_a
private

Definition at line 96 of file ManufacturedSolution.h.

Referenced by geta(), and setTricubicParams().

◆ d_bcType

BCType AMP::ManufacturedSolution::d_bcType
private

Definition at line 88 of file ManufacturedSolution.h.

◆ d_c

std::valarray<double> AMP::ManufacturedSolution::d_c
private

Definition at line 95 of file ManufacturedSolution.h.

Referenced by getc(), and setTricubicParams().

◆ d_CylindricalCoords

bool AMP::ManufacturedSolution::d_CylindricalCoords
private

Definition at line 108 of file ManufacturedSolution.h.

◆ d_functionPointer

std::function<std::array<double, 10>( double, double, double, const ManufacturedSolution * )> AMP::ManufacturedSolution::d_functionPointer
private

Definition at line 93 of file ManufacturedSolution.h.

◆ d_FunctionType

FunctionType AMP::ManufacturedSolution::d_FunctionType
private

Definition at line 84 of file ManufacturedSolution.h.

◆ d_geom

Geometry AMP::ManufacturedSolution::d_geom
private

Definition at line 86 of file ManufacturedSolution.h.

◆ d_h

std::array<std::array<double, 3>, 3> AMP::ManufacturedSolution::d_h
private

Definition at line 104 of file ManufacturedSolution.h.

Referenced by geth().

◆ d_hs

std::array<std::array<double, 3>, 3> AMP::ManufacturedSolution::d_hs
private

Definition at line 105 of file ManufacturedSolution.h.

Referenced by geths().

◆ d_MaximumTheta

double AMP::ManufacturedSolution::d_MaximumTheta
private

Definition at line 107 of file ManufacturedSolution.h.

◆ d_MaxR

double AMP::ManufacturedSolution::d_MaxR
private

Definition at line 101 of file ManufacturedSolution.h.

◆ d_MaxTh

double AMP::ManufacturedSolution::d_MaxTh
private

Definition at line 102 of file ManufacturedSolution.h.

◆ d_MaxX

double AMP::ManufacturedSolution::d_MaxX
private

Definition at line 98 of file ManufacturedSolution.h.

◆ d_MaxY

double AMP::ManufacturedSolution::d_MaxY
private

Definition at line 99 of file ManufacturedSolution.h.

◆ d_MaxZ

double AMP::ManufacturedSolution::d_MaxZ
private

Definition at line 100 of file ManufacturedSolution.h.

◆ d_MinR

double AMP::ManufacturedSolution::d_MinR
private

Definition at line 101 of file ManufacturedSolution.h.

◆ d_MinTh

double AMP::ManufacturedSolution::d_MinTh
private

Definition at line 102 of file ManufacturedSolution.h.

◆ d_MinX

double AMP::ManufacturedSolution::d_MinX
private

Definition at line 98 of file ManufacturedSolution.h.

◆ d_MinY

double AMP::ManufacturedSolution::d_MinY
private

Definition at line 99 of file ManufacturedSolution.h.

◆ d_MinZ

double AMP::ManufacturedSolution::d_MinZ
private

Definition at line 100 of file ManufacturedSolution.h.

◆ d_Name

std::string AMP::ManufacturedSolution::d_Name
private

Definition at line 110 of file ManufacturedSolution.h.

Referenced by get_name().

◆ d_NumberOfInputs

size_t AMP::ManufacturedSolution::d_NumberOfInputs
private

Definition at line 90 of file ManufacturedSolution.h.

Referenced by getNumberOfInputs().

◆ d_NumberOfParameters

size_t AMP::ManufacturedSolution::d_NumberOfParameters
private

Definition at line 89 of file ManufacturedSolution.h.

Referenced by getNumberOfParameters().

◆ d_order

Order AMP::ManufacturedSolution::d_order
private

Definition at line 87 of file ManufacturedSolution.h.

◆ d_ScaleR

double AMP::ManufacturedSolution::d_ScaleR
private

Definition at line 101 of file ManufacturedSolution.h.

◆ d_ScaleTh

double AMP::ManufacturedSolution::d_ScaleTh
private

Definition at line 102 of file ManufacturedSolution.h.

◆ d_ScaleX

double AMP::ManufacturedSolution::d_ScaleX
private

Definition at line 98 of file ManufacturedSolution.h.

◆ d_ScaleY

double AMP::ManufacturedSolution::d_ScaleY
private

Definition at line 99 of file ManufacturedSolution.h.

◆ d_ScaleZ

double AMP::ManufacturedSolution::d_ScaleZ
private

Definition at line 100 of file ManufacturedSolution.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:42.
Comments on this page