EpetraExt Development
EpetraExt_DiagonalQuadraticResponseOnlyModelEvaluator.hpp
Go to the documentation of this file.
00001 #ifndef EPETRA_EXT_DIAGONAL_RESPONSE_ONLY_MODEL_EVALUATOR_HPP
00002 #define EPETRA_EXT_DIAGONAL_RESPONSE_ONLY_MODEL_EVALUATOR_HPP
00003 
00004 
00005 #include "EpetraExt_ModelEvaluator.h"
00006 #include "Epetra_Map.h"
00007 #include "Epetra_Vector.h"
00008 #include "Epetra_Comm.h"
00009 #include "Epetra_CrsGraph.h"
00010 
00011 
00012 namespace EpetraExt {
00013 
00014 
00027 class DiagonalQuadraticResponseOnlyModelEvaluator : public EpetraExt::ModelEvaluator {
00028 public:
00029 
00031   DiagonalQuadraticResponseOnlyModelEvaluator(
00032     const Teuchos::RCP<Epetra_Comm> &comm,
00033     const int localDim, const double &pt, const double &p0, const double &scale );
00034 
00037 
00039   Teuchos::RefCountPtr<const Epetra_Map> get_x_map() const;
00041   Teuchos::RefCountPtr<const Epetra_Map> get_f_map() const;
00043   Teuchos::RefCountPtr<const Epetra_Map> get_p_map(int l) const;
00045   Teuchos::RefCountPtr<const Epetra_Map> get_g_map(int j) const;
00047   Teuchos::RefCountPtr<const Epetra_Vector> get_p_init(int l) const;
00049   InArgs createInArgs() const;
00051   OutArgs createOutArgs() const;
00053   void evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const;
00054 
00056 
00057 private:
00058 
00059   // /////////////////////////////////////
00060   // Private member data
00061 
00062   Teuchos::RefCountPtr<const Epetra_Comm> epetra_comm_;
00063   Teuchos::RefCountPtr<const Epetra_Map> map_p_;
00064   Teuchos::RefCountPtr<const Epetra_Map> map_g_;
00065 
00066   double scale_;
00067 
00068   Teuchos::RefCountPtr<Epetra_Vector> pt_;
00069   Teuchos::RefCountPtr<Epetra_Vector> p0_;
00070 
00071   // Note defined and not to be called
00072   DiagonalQuadraticResponseOnlyModelEvaluator();
00073 
00074 };
00075 
00076 
00081 inline
00082 Teuchos::RCP<DiagonalQuadraticResponseOnlyModelEvaluator>
00083 diagonalQuadraticResponseOnlyModelEvaluator(
00084   const Teuchos::RCP<Epetra_Comm> &comm,
00085   const int localDim, const double &pt, const double &p0, const double &scale
00086   )
00087 {
00088   return Teuchos::rcp(
00089     new DiagonalQuadraticResponseOnlyModelEvaluator(
00090       comm, localDim, pt, p0, scale
00091       )
00092     );
00093 }
00094 
00095 
00096 } // namespace EpetraExt
00097 
00098 
00099 #endif // EPETRA_EXT_DIAGONAL_RESPONSE_ONLY_MODEL_EVALUATOR_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines