Thyra Package Browser (Single Doxygen Collection) Version of the Day
Simple2DTpetraModelEvaluator_decl.hpp
Go to the documentation of this file.
00001 
00002 #ifndef SIMPLE_2D_TPETRA_MODEL_EVALUATOR_DECL_HPP
00003 #define SIMPLE_2D_TPETRA_MODEL_EVALUATOR_DECL_HPP
00004 
00005 
00006 #include "Thyra_StateFuncModelEvaluatorBase.hpp"
00007 #include "Tpetra_CrsGraph.hpp"
00008 #include "Tpetra_Vector.hpp"
00009 
00010 
00027 template<class Scalar>
00028 class Simple2DTpetraModelEvaluator
00029   : public Thyra::StateFuncModelEvaluatorBase<Scalar>
00030 {
00031 public:
00032 
00035 
00037   Simple2DTpetraModelEvaluator();
00038 
00040   void set_d(const Scalar &d);
00041 
00043   void set_p(const Teuchos::ArrayView<const Scalar> &p);
00044 
00046   void set_x0(const Teuchos::ArrayView<const Scalar> &x0);
00047 
00049 
00052 
00054   Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > get_x_space() const;
00056   Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > get_f_space() const;
00058   Thyra::ModelEvaluatorBase::InArgs<Scalar> getNominalValues() const;
00060   Teuchos::RCP<Thyra::LinearOpBase<Scalar> > create_W_op() const;
00062   Thyra::ModelEvaluatorBase::InArgs<Scalar> createInArgs() const;
00063 
00065 
00066 private:
00067 
00070 
00072   Thyra::ModelEvaluatorBase::OutArgs<Scalar> createOutArgsImpl() const;
00074   void evalModelImpl(
00075     const Thyra::ModelEvaluatorBase::InArgs<Scalar> &inArgs,
00076     const Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs
00077     ) const;
00078 
00080 
00081 private: // data members
00082 
00083   Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > x_space_;
00084   Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > f_space_;
00085   Thyra::ModelEvaluatorBase::InArgs<Scalar> nominalValues_;
00086   Scalar d_;
00087   Teuchos::RCP<Tpetra::Vector<Scalar,int> > x0_;
00088   Teuchos::Array<Scalar> p_;
00089   Teuchos::RCP<Tpetra::CrsGraph<int> > W_op_graph_;
00090   Thyra::ModelEvaluatorBase::InArgs<Scalar> prototypeInArgs_;
00091   Thyra::ModelEvaluatorBase::OutArgs<Scalar> prototypeOutArgs_;
00092 
00093 };
00094 
00095 
00100 template<class Scalar>
00101 Teuchos::RCP<Simple2DTpetraModelEvaluator<Scalar> >
00102 simple2DTpetraModelEvaluator()
00103 {
00104   return Teuchos::rcp(new Simple2DTpetraModelEvaluator<Scalar>);
00105 }
00106 
00107 
00108 #endif // SIMPLE_2D_TPETRA_MODEL_EVALUATOR_DECL_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines