Advanced Multi-Physics (AMP)
On-Line Documentation
TrilinosThyraModelEvaluator.h
Go to the documentation of this file.
1#ifndef included_AMP_TrilinosThyraModelEvaluator
2#define included_AMP_TrilinosThyraModelEvaluator
3
4
5#include "AMP/discretization/DOF_Manager.h"
6#include "AMP/solvers/trilinos/thyra/TrilinosLinearOP.h"
7#include "AMP/solvers/trilinos/thyra/TrilinosThyraModelEvaluatorParameters.h"
8#include <memory>
9
10
11// Trilinos includes
13#include "Thyra_StateFuncModelEvaluatorBase.hpp"
15
16
17namespace AMP::Solver {
18
19
24class TrilinosThyraModelEvaluator : public ::Thyra::StateFuncModelEvaluatorBase<double>
25{
26public:
29 std::shared_ptr<TrilinosThyraModelEvaluatorParameters> params );
30
33
36
39
42
43 // Functions derived from Thyra::StateFuncModelEvaluatorBase<double>
46 virtual ::Thyra::ModelEvaluatorBase::InArgs<double> getNominalValues() const;
48 virtual void set_W_factory(
49 const Teuchos::RCP<const ::Thyra::LinearOpWithSolveFactoryBase<double>> &W_factory );
51 virtual ::Thyra::ModelEvaluatorBase::InArgs<double> createInArgs() const;
52
53 // Functions derived from Thyra::ModelEvaluator
55
56protected:
57 // Return TrilinosLinearOP from Thyra::LinearOpBase<double>
58 static std::shared_ptr<AMP::Solver::TrilinosLinearOP>
59 view( Teuchos::RCP<Thyra::LinearOpBase<double>> op );
60
61 // Functions derived from Thyra::StateFuncModelEvaluatorBase<double>
62 virtual ::Thyra::ModelEvaluatorBase::OutArgs<double> createOutArgsImpl() const;
63 virtual void evalModelImpl( const ::Thyra::ModelEvaluatorBase::InArgs<double> &inArgs,
64 const ::Thyra::ModelEvaluatorBase::OutArgs<double> &outArgs ) const;
65
66private:
69
70 // Data members
72 std::shared_ptr<AMP::LinearAlgebra::Vector> d_icVec;
73 std::shared_ptr<const AMP::LinearAlgebra::Vector> d_rhs;
74 std::shared_ptr<AMP::Operator::Operator> d_nonlinearOp;
75 std::shared_ptr<AMP::Operator::Operator> d_linearOp;
76 std::shared_ptr<AMP::Solver::SolverStrategy> d_preconditioner;
77 std::shared_ptr<AMP::Solver::PrePostOperator> d_prePostOperator;
78};
79} // namespace AMP::Solver
80
81#endif
std::shared_ptr< const Vector > const_shared_ptr
Definition Vector.h:65
virtual ::Thyra::ModelEvaluatorBase::InArgs< double > createInArgs() const
virtual void evalModelImpl(const ::Thyra::ModelEvaluatorBase::InArgs< double > &inArgs, const ::Thyra::ModelEvaluatorBase::OutArgs< double > &outArgs) const
virtual void set_W_factory(const Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< double > > &W_factory)
virtual ::Thyra::ModelEvaluatorBase::InArgs< double > getNominalValues() const
std::shared_ptr< const AMP::LinearAlgebra::Vector > d_rhs
virtual Teuchos::RCP< const ::Thyra::VectorSpaceBase< double > > get_x_space() const
std::shared_ptr< AMP::Operator::Operator > d_nonlinearOp
std::shared_ptr< AMP::LinearAlgebra::Vector > d_icVec
std::shared_ptr< AMP::Operator::Operator > d_linearOp
virtual ::Thyra::ModelEvaluatorBase::OutArgs< double > createOutArgsImpl() const
Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< double > > d_W_factory
TrilinosThyraModelEvaluator(std::shared_ptr< TrilinosThyraModelEvaluatorParameters > params)
Default constructor.
TrilinosThyraModelEvaluator & operator=(const TrilinosThyraModelEvaluator &)=delete
Assignment operator.
TrilinosThyraModelEvaluator(const TrilinosThyraModelEvaluator &)=delete
Copy constructor.
TrilinosThyraModelEvaluator()=default
Empty constructor.
virtual Teuchos::RCP<::Thyra::PreconditionerBase< double > > create_W_prec() const
virtual Teuchos::RCP< const ::Thyra::VectorSpaceBase< double > > get_f_space() const
virtual Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< double > > get_W_factory() const
virtual ~TrilinosThyraModelEvaluator()
Destructor.
static std::shared_ptr< AMP::Solver::TrilinosLinearOP > view(Teuchos::RCP< Thyra::LinearOpBase< double > > op)
std::shared_ptr< AMP::Solver::SolverStrategy > d_preconditioner
virtual Teuchos::RCP<::Thyra::LinearOpBase< double > > create_W_op() const
std::shared_ptr< AMP::Solver::PrePostOperator > d_prePostOperator
void setRhs(AMP::LinearAlgebra::Vector::const_shared_ptr rhs)
Function to set the rhs vector.
#define DISABLE_WARNINGS
Re-enable warnings.
#define ENABLE_WARNINGS
Suppress all warnings.



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