1#ifndef RAD_DIF_OP_SPLIT_PREC
2#define RAD_DIF_OP_SPLIT_PREC
4#include "AMP/IO/AsciiWriter.h"
6#include "AMP/operators/LinearOperator.h"
7#include "AMP/operators/Operator.h"
8#include "AMP/operators/OperatorParameters.h"
9#include "AMP/operators/radiationDiffusionFD/RadiationDiffusionFDBDFWrappers.h"
10#include "AMP/operators/radiationDiffusionFD/RadiationDiffusionFDDiscretization.h"
11#include "AMP/solvers/SolverFactory.h"
12#include "AMP/solvers/SolverStrategy.h"
13#include "AMP/solvers/SolverStrategyParameters.h"
14#include "AMP/utils/AMPManager.h"
15#include "AMP/vectors/MultiVector.h"
16#include "AMP/vectors/Vector.h"
55 static std::unique_ptr<AMP::Solver::SolverStrategy>
56 create( std::shared_ptr<AMP::Solver::SolverStrategyParameters> params )
58 return std::make_unique<BDFRadDifOpPJacOpSplitPrec>( params );
61 std::string
type()
const override {
return "BDFRadDifOpPJacOpSplitPrec"; };
64 void apply( std::shared_ptr<const AMP::LinearAlgebra::Vector>
bET_,
65 std::shared_ptr<AMP::LinearAlgebra::Vector>
ET_ )
override;
71 void reset( std::shared_ptr<AMP::Solver::SolverStrategyParameters> params )
override;
80 std::unique_ptr<AMP::Solver::SolverStrategy>
d_difSolverE =
nullptr;
81 std::unique_ptr<AMP::Solver::SolverStrategy>
d_difSolverT =
nullptr;
87 std::shared_ptr<const AMP::LinearAlgebra::Vector>
bT,
88 std::shared_ptr<AMP::LinearAlgebra::Vector> E,
89 std::shared_ptr<AMP::LinearAlgebra::Vector>
T )
const;
98 std::shared_ptr<const AMP::LinearAlgebra::Vector>
bT,
99 std::shared_ptr<AMP::LinearAlgebra::Vector> E,
100 std::shared_ptr<AMP::LinearAlgebra::Vector>
T );
108 double a,
double b,
double c,
double d,
double e,
double f,
double &x,
double &y )
const;
std::unique_ptr< AMP::Solver::SolverStrategy > d_difSolverE
Solvers for approximately inverting diagonal diffusion blocks.
void scalar2x2Solve(double a, double b, double c, double d, double e, double f, double &x, double &y) const
std::unique_ptr< AMP::Solver::SolverStrategy > d_difSolverT
std::string type() const override
Return the name of the solver.
void reset(std::shared_ptr< AMP::Solver::SolverStrategyParameters > params) override
void setDiffusionSolvers()
Set d_difSolverE and d_difSolverT based on current state of operator.
static constexpr double SINGULAR_TOL
Tolerance for determining if 2x2 system is singular.
void apply(std::shared_ptr< const AMP::LinearAlgebra::Vector > bET_, std::shared_ptr< AMP::LinearAlgebra::Vector > ET_) override
void reactionSolve(std::shared_ptr< const AMP::LinearAlgebra::Vector > bE, std::shared_ptr< const AMP::LinearAlgebra::Vector > bT, std::shared_ptr< AMP::LinearAlgebra::Vector > E, std::shared_ptr< AMP::LinearAlgebra::Vector > T)
static std::unique_ptr< AMP::Solver::SolverStrategy > create(std::shared_ptr< AMP::Solver::SolverStrategyParameters > params)
void diffusionSolve(std::shared_ptr< const AMP::LinearAlgebra::Vector > bE, std::shared_ptr< const AMP::LinearAlgebra::Vector > bT, std::shared_ptr< AMP::LinearAlgebra::Vector > E, std::shared_ptr< AMP::LinearAlgebra::Vector > T) const
BDFRadDifOpPJacOpSplitPrec(std::shared_ptr< AMP::Solver::SolverStrategyParameters > params)
std::shared_ptr< AMP::Solver::SolverStrategy > shared_ptr