1#ifndef included_AMP_TimeOperator
2#define included_AMP_TimeOperator
4#include "AMP/operators/Operator.h"
5#include "AMP/operators/OperatorParameters.h"
6#include "AMP/utils/Utilities.h"
7#include "AMP/vectors/Vector.h"
74 explicit TimeOperator( std::shared_ptr<const AMP::Operator::OperatorParameters> params );
81 std::string
type()
const override {
return "TimeOperator"; }
88 void reset( std::shared_ptr<const AMP::Operator::OperatorParameters> params )
override;
146 virtual void applyRhs( std::shared_ptr<const AMP::LinearAlgebra::Vector> x,
147 std::shared_ptr<AMP::LinearAlgebra::Vector> f );
149 void residual( std::shared_ptr<const AMP::LinearAlgebra::Vector> f,
150 std::shared_ptr<const AMP::LinearAlgebra::Vector>
u,
151 std::shared_ptr<AMP::LinearAlgebra::Vector> r )
override;
162 std::shared_ptr<AMP::Operator::OperatorParameters>
165 std::shared_ptr<AMP::Operator::OperatorParameters> params =
nullptr )
override;
171 std::shared_ptr<AMP::LinearAlgebra::Vector> f )
190 bool isValidVector( std::shared_ptr<const AMP::LinearAlgebra::Vector>
u )
override
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
std::shared_ptr< const Vector > const_shared_ptr
std::shared_ptr< AMP::Operator::Operator > shared_ptr
base class for operator class associated with ImplicitTimeIntegrator
bool d_bLinearMassOperator
void getFromInput(std::shared_ptr< AMP::Database > db)
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pSolutionScaling
void residual(std::shared_ptr< const AMP::LinearAlgebra::Vector > f, std::shared_ptr< const AMP::LinearAlgebra::Vector > u, std::shared_ptr< AMP::LinearAlgebra::Vector > r) override
void registerMassOperator(std::shared_ptr< AMP::Operator::Operator > op)
bool d_bAlgebraicComponent
std::shared_ptr< AMP::Operator::Operator > getRhsOperator(void)
bool d_bLinearRhsOperator
std::shared_ptr< AMP::Operator::Operator > d_pRhsOperator
virtual void applyRhs(std::shared_ptr< const AMP::LinearAlgebra::Vector > x, std::shared_ptr< AMP::LinearAlgebra::Vector > f)
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr r) override
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pScratchSolVector
std::string type() const override
Return the name of the operator.
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pFunctionScaling
std::shared_ptr< AMP::LinearAlgebra::Variable > d_pAlgebraicVariable
void reset(std::shared_ptr< const AMP::Operator::OperatorParameters > params) override
std::shared_ptr< AMP::Operator::Operator > getMassOperator(void)
virtual double getGamma(void) const
std::shared_ptr< AMP::Operator::Operator > d_pMassOperator
bool isValidVector(std::shared_ptr< const AMP::LinearAlgebra::Vector > u) override
given a vector return whether it is valid or not
void setComponentScalings(std::shared_ptr< AMP::LinearAlgebra::Vector > s, std::shared_ptr< AMP::LinearAlgebra::Vector > f)
for multiphysics problems it may be necessary to scale the solution
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pScratchVector
std::shared_ptr< AMP::LinearAlgebra::Vector > d_pSourceTerm
void makeConsistent(std::shared_ptr< AMP::LinearAlgebra::Vector > vec) override
std::shared_ptr< AMP::Operator::OperatorParameters > getParameters(const std::string &type, AMP::LinearAlgebra::Vector::const_shared_ptr u, std::shared_ptr< AMP::Operator::OperatorParameters > params=nullptr) override
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
void registerRhsOperator(std::shared_ptr< AMP::Operator::Operator > op)
virtual void setTimeOperatorScaling(const double gamma)
void reInitializeVector(std::shared_ptr< AMP::LinearAlgebra::Vector > v) override
TimeOperator(std::shared_ptr< const AMP::Operator::OperatorParameters > params)
void registerAlgebraicVariable(std::shared_ptr< AMP::LinearAlgebra::Variable > var)
#define AMP_ASSERT(EXP)
Assert error.