1#ifndef RAD_DIF_FD_BDF_WRAPPERS
2#define RAD_DIF_FD_BDF_WRAPPERS
4#include "AMP/IO/AsciiWriter.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"
20#include "AMP/operators/radiationDiffusionFD/RadiationDiffusionFDDiscretization.h"
27struct BDFRadDifOpPJacData;
65 std::string
type()
const override {
return "BDFRadDifOp"; }
68 bool isValidVector( std::shared_ptr<const AMP::LinearAlgebra::Vector>
ET )
override
79 std::shared_ptr<AMP::LinearAlgebra::Vector> f );
93 std::shared_ptr<AMP::Operator::OperatorParameters>
114 std::shared_ptr<BDFRadDifOpPJacData>
d_data =
nullptr;
124 static std::unique_ptr<AMP::Operator::Operator>
125 create( std::shared_ptr<AMP::Operator::OperatorParameters> params )
127 return std::make_unique<BDFRadDifOpPJac>( params );
135 void reset( std::shared_ptr<const AMP::Operator::OperatorParameters> params )
override;
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;
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
std::shared_ptr< const Vector > const_shared_ptr
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.
virtual ~BDFRadDifOpPJac()
Destructor.
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.
virtual ~BDFRadDifOp()
Destructor.
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
Scalar is a class used to store a scalar variable that may be different types/precision.
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