9 #ifndef TEMPUS_CDR_MODEL_DECL_HPP
10 #define TEMPUS_CDR_MODEL_DECL_HPP
12 #include "Thyra_StateFuncModelEvaluatorBase.hpp"
17 class Epetra_CrsGraph;
20 namespace Tempus_Test {
44 template<
class Scalar>
46 :
public ::Thyra::StateFuncModelEvaluatorBase<Scalar>
50 CDR_Model(
const Teuchos::RCP<const Epetra_Comm>& comm,
51 const int num_global_elements,
60 void set_x0(
const Teuchos::ArrayView<const Scalar> &x0);
64 void set_W_factory(
const Teuchos::RCP<const ::Thyra::LinearOpWithSolveFactoryBase<Scalar> >& W_factory);
71 Teuchos::RCP<const ::Thyra::VectorSpaceBase<Scalar> >
get_x_space()
const;
72 Teuchos::RCP<const ::Thyra::VectorSpaceBase<Scalar> >
get_f_space()
const;
74 Teuchos::RCP<Thyra::LinearOpWithSolveBase<double> >
create_W()
const;
75 Teuchos::RCP< ::Thyra::LinearOpBase<Scalar> >
create_W_op()
const;
76 Teuchos::RCP<const ::Thyra::LinearOpWithSolveFactoryBase<Scalar> >
get_W_factory()
const;
77 ::Thyra::ModelEvaluatorBase::InArgs<Scalar>
createInArgs()
const;
78 Teuchos::RCP< ::Thyra::PreconditionerBase< Scalar > >
create_W_prec()
const;
84 virtual Teuchos::RCP<Epetra_CrsGraph>
createGraph();
91 const ::Thyra::ModelEvaluatorBase::InArgs<Scalar> &inArgs,
92 const ::Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs
99 const Teuchos::RCP<const Epetra_Comm>
comm_;
106 Teuchos::RCP<const ::Thyra::VectorSpaceBase<Scalar> >
x_space_;
111 Teuchos::RCP<const ::Thyra::VectorSpaceBase<Scalar> >
f_space_;
116 Teuchos::RCP<const ::Thyra::LinearOpWithSolveFactoryBase<Scalar> >
W_factory_;
121 mutable Teuchos::RCP<Epetra_Vector>
u_ptr;
123 mutable Teuchos::RCP<Epetra_Vector>
x_ptr;
128 Teuchos::RCP< ::Thyra::VectorBase<Scalar> >
x0_;
129 Teuchos::Array<Scalar>
p_;
148 void computeBasis(
int gp,
double *z,
double *u,
double *u_dot =
nullptr);
::Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
void evalModelImpl(const ::Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const ::Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
Teuchos::RCP< const Epetra_Map > x_ghosted_map_
Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
CDR_Model(const Teuchos::RCP< const Epetra_Comm > &comm, const int num_global_elements, const Scalar z_min, const Scalar z_max, const Scalar a, const Scalar k)
::Thyra::ModelEvaluatorBase::OutArgs< Scalar > prototypeOutArgs_
virtual Teuchos::RCP< Epetra_CrsGraph > createGraph()
Teuchos::RCP< Epetra_Vector > u_dot_ptr
Teuchos::RCP< Epetra_CrsGraph > W_graph_
Teuchos::RCP< Epetra_Vector > node_coordinates_
Teuchos::RCP< const Epetra_Map > f_owned_map_
Teuchos::RCP< Epetra_Vector > J_diagonal_
const int num_global_elements_
Teuchos::RCP< ::Thyra::VectorBase< Scalar > > x0_
Teuchos::RCP< ::Thyra::PreconditionerBase< Scalar > > create_W_prec() const
Teuchos::RCP< Epetra_Vector > x_ptr
Teuchos::RCP< Epetra_Vector > ghosted_node_coordinates_
void setShowGetInvalidArgs(bool showGetInvalidArg)
Teuchos::RCP< const Epetra_Map > x_owned_map_
::Thyra::ModelEvaluatorBase::InArgs< Scalar > nominalValues_
void set_W_factory(const Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< Scalar > > &W_factory)
void set_x0(const Teuchos::ArrayView< const Scalar > &x0)
void computeBasis(int gp, double *z, double *u, double *u_dot=nullptr)
Teuchos::RCP< const ::Thyra::VectorSpaceBase< Scalar > > x_space_
Teuchos::RCP< ::Thyra::LinearOpBase< Scalar > > create_W_op() const
Teuchos::RCP< Thyra::LinearOpWithSolveBase< double > > create_W() const
::Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
Teuchos::RCP< const ::Thyra::VectorSpaceBase< Scalar > > get_f_space() const
Teuchos::Array< Scalar > p_
Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< Scalar > > W_factory_
Teuchos::RCP< Epetra_Vector > u_ptr
::Thyra::ModelEvaluatorBase::InArgs< Scalar > prototypeInArgs_
Teuchos::RCP< const ::Thyra::VectorSpaceBase< Scalar > > get_x_space() const
const Teuchos::RCP< const Epetra_Comm > comm_
Teuchos::RCP< const ::Thyra::VectorSpaceBase< Scalar > > f_space_
::Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
1D CGFEM model for convection/diffusion/reaction
Teuchos::RCP< const Epetra_Import > importer_