Advanced Multi-Physics (AMP)
On-Line Documentation
RadiationDiffusionFDBDFWrappers.h
Go to the documentation of this file.
1#ifndef RAD_DIF_FD_BDF_WRAPPERS
2#define RAD_DIF_FD_BDF_WRAPPERS
3
4#include "AMP/IO/AsciiWriter.h"
5#include "AMP/IO/PIO.h"
6#include "AMP/discretization/MultiDOF_Manager.h"
7#include "AMP/discretization/boxMeshDOFManager.h"
8#include "AMP/geometry/shapes/Box.h"
9#include "AMP/matrices/MatrixBuilder.h"
10#include "AMP/mesh/structured/BoxMesh.h"
11#include "AMP/mesh/structured/structuredMeshElement.h"
12#include "AMP/operators/LinearOperator.h"
13#include "AMP/operators/Operator.h"
14#include "AMP/operators/OperatorParameters.h"
15#include "AMP/utils/AMPManager.h"
16#include "AMP/vectors/MultiVector.h"
17#include "AMP/vectors/Vector.h"
18#include "AMP/vectors/VectorBuilder.h"
19
20#include "AMP/operators/radiationDiffusionFD/RadiationDiffusionFDDiscretization.h"
21
22namespace AMP::Operator {
23
24// Classes declared here
25class BDFRadDifOpPJac;
26class BDFRadDifOp;
27struct BDFRadDifOpPJacData;
28
29
46{
47
48public:
50 double d_gamma = -1.0;
52 std::shared_ptr<RadDifOp> d_RadDifOp = nullptr;
53
55 BDFRadDifOp( std::shared_ptr<const AMP::Operator::OperatorParameters> params_ );
56
58 virtual ~BDFRadDifOp(){};
59
63
65 std::string type() const override { return "BDFRadDifOp"; }
66
68 bool isValidVector( std::shared_ptr<const AMP::LinearAlgebra::Vector> ET ) override
69 {
70 return d_RadDifOp->isValidVector( ET );
71 }
72
75
76
78 void setComponentScalings( std::shared_ptr<AMP::LinearAlgebra::Vector> s,
79 std::shared_ptr<AMP::LinearAlgebra::Vector> f );
80
81
82protected:
84 std::shared_ptr<AMP::LinearAlgebra::Vector> d_pSolutionScaling;
85 std::shared_ptr<AMP::LinearAlgebra::Vector> d_pFunctionScaling;
86 std::shared_ptr<AMP::LinearAlgebra::Vector> d_pScratchSolVector;
87
93 std::shared_ptr<AMP::Operator::OperatorParameters>
95};
96
97
106{
107
108public:
110 double d_gamma = -1.0;
112 std::shared_ptr<RadDifOpPJac> d_RadDifOpPJac;
114 std::shared_ptr<BDFRadDifOpPJacData> d_data = nullptr;
115
116
118 BDFRadDifOpPJac( std::shared_ptr<AMP::Operator::OperatorParameters> params );
119
121 virtual ~BDFRadDifOpPJac(){};
122
124 static std::unique_ptr<AMP::Operator::Operator>
125 create( std::shared_ptr<AMP::Operator::OperatorParameters> params )
126 {
127 return std::make_unique<BDFRadDifOpPJac>( params );
128 };
129
133
135 void reset( std::shared_ptr<const AMP::Operator::OperatorParameters> params ) override;
136
137 std::shared_ptr<AMP::LinearAlgebra::Vector> createInputVector() const override;
138
139
140private:
142 void setData();
143};
144
145
168 std::shared_ptr<AMP::LinearAlgebra::Matrix> d_E_BDF = nullptr;
169 std::shared_ptr<AMP::LinearAlgebra::Matrix> d_T_BDF = nullptr;
170 std::shared_ptr<AMP::LinearAlgebra::Vector> r_EE_BDF = nullptr;
171 std::shared_ptr<AMP::LinearAlgebra::Vector> r_ET_BDF = nullptr;
172 std::shared_ptr<AMP::LinearAlgebra::Vector> r_TE_BDF = nullptr;
173 std::shared_ptr<AMP::LinearAlgebra::Vector> r_TT_BDF = nullptr;
174
176 BDFRadDifOpPJacData( std::shared_ptr<RadDifOpPJacData> data, double gamma );
177};
178
179} // namespace AMP::Operator
180
181
182#endif
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
Definition Vector.h:60
std::shared_ptr< const Vector > const_shared_ptr
Definition Vector.h:65
void reset(std::shared_ptr< const AMP::Operator::OperatorParameters > params) override
Reset the operator based on the incoming parameters.
void setData()
Create new d_data based on my RadDifOpPJac's d_data.
static std::unique_ptr< AMP::Operator::Operator > create(std::shared_ptr< AMP::Operator::OperatorParameters > params)
Used by OperatorFactory to create a BDFRadDifOpPJac.
BDFRadDifOpPJac(std::shared_ptr< AMP::Operator::OperatorParameters > params)
Constructor.
std::shared_ptr< AMP::LinearAlgebra::Vector > createInputVector() const override
Get a input vector ( For , is a input vector )
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u_in, AMP::LinearAlgebra::Vector::shared_ptr r) override
Compute r <- (I + gamma*hat{L})*u.
std::shared_ptr< RadDifOpPJac > d_RadDifOpPJac
The underlying linearized radiation diffusion spatial operator.
double d_gamma
Time-step size (up to scaling by BDF constants)
std::shared_ptr< BDFRadDifOpPJacData > d_data
Data structure for storing block 2x2 matrix.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pScratchSolVector
void setComponentScalings(std::shared_ptr< AMP::LinearAlgebra::Vector > s, std::shared_ptr< AMP::LinearAlgebra::Vector > f)
Set multiphysics scalings.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pSolutionScaling
Vectors for multiphysics scaling.
double d_gamma
Time-step size (up to scaling by BDF constants)
bool isValidVector(std::shared_ptr< const AMP::LinearAlgebra::Vector > ET) override
Returns RadDifOp's isValidVector.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pFunctionScaling
std::shared_ptr< RadDifOp > d_RadDifOp
The underlying radiation diffusion spatial operator.
std::string type() const override
Used to register this operator in a factory.
void setGamma(AMP::Scalar gamma_)
Set the scaled time-step size of the operator.
std::shared_ptr< AMP::Operator::OperatorParameters > getJacobianParameters(AMP::LinearAlgebra::Vector::const_shared_ptr u_in) override
Returns a parameter object that may be used to reset the associated RadDifPJacOp operator.
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u_in, AMP::LinearAlgebra::Vector::shared_ptr r) override
Compute r <- u + gamma*L(u)
BDFRadDifOp(std::shared_ptr< const AMP::Operator::OperatorParameters > params_)
Constructor.
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29
Scalar is a class used to store a scalar variable that may be different types/precision.
Definition Scalar.h:21
std::shared_ptr< AMP::LinearAlgebra::Vector > r_TE_BDF
BDFRadDifOpPJacData(std::shared_ptr< RadDifOpPJacData > data, double gamma)
std::shared_ptr< AMP::LinearAlgebra::Vector > r_ET_BDF
std::shared_ptr< AMP::LinearAlgebra::Matrix > d_T_BDF
std::shared_ptr< AMP::LinearAlgebra::Matrix > d_E_BDF
std::shared_ptr< AMP::LinearAlgebra::Vector > r_EE_BDF
std::shared_ptr< AMP::LinearAlgebra::Vector > r_TT_BDF



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:41.
Comments on this page