GLpApp_AdvDiffReactOptModel.hpp

Go to the documentation of this file.
00001 #ifndef GLP_APP_ADV_DIFF_REACT_OPT_MODEL_HPP
00002 #define GLP_APP_ADV_DIFF_REACT_OPT_MODEL_HPP
00003 
00004 #include "EpetraExt_ModelEvaluator.h"
00005 #include "GLpApp_GLpYUEpetraDataPool.hpp"
00006 #include "Epetra_Map.h"
00007 #include "Epetra_Vector.h"
00008 #include "Epetra_Comm.h"
00009 #include "Epetra_CrsGraph.h"
00010 #include "Teuchos_VerboseObject.hpp"
00011 #include "Teuchos_Array.hpp"
00012 
00013 namespace GLpApp {
00014 
00119 class AdvDiffReactOptModel
00120   : public EpetraExt::ModelEvaluator
00121   , public Teuchos::VerboseObject<AdvDiffReactOptModel>
00122 {
00123 public:
00124 
00126   AdvDiffReactOptModel(
00127     const Teuchos::RefCountPtr<const Epetra_Comm>  &comm
00128     ,const double                                  beta
00129     ,const double                                  len_x     // Ignored if meshFile is *not* empty
00130     ,const double                                  len_y     // Ignored if meshFile is *not* empty
00131     ,const int                                     local_nx  // Ignored if meshFile is *not* empty
00132     ,const int                                     local_ny  // Ignored if meshFile is *not* empty
00133     ,const char                                    meshFile[]
00134     ,const int                                     np
00135     ,const double                                  x0
00136     ,const double                                  p0
00137     ,const double                                  reactionRate
00138     ,const bool                                    normalizeBasis
00139     );
00140 
00142   void set_q( Teuchos::RefCountPtr<const Epetra_Vector> const& q );
00143 
00146 
00148   Teuchos::RefCountPtr<const Epetra_Map> get_x_map() const;
00150   Teuchos::RefCountPtr<const Epetra_Map> get_f_map() const;
00152   Teuchos::RefCountPtr<const Epetra_Map> get_p_map(int l) const;
00154   Teuchos::RefCountPtr<const Epetra_Map> get_g_map(int j) const;
00156   Teuchos::RefCountPtr<const Epetra_Vector> get_x_init() const;
00158   Teuchos::RefCountPtr<const Epetra_Vector> get_p_init(int l) const;
00160   Teuchos::RefCountPtr<const Epetra_Vector> get_x_lower_bounds() const;
00162   Teuchos::RefCountPtr<const Epetra_Vector> get_x_upper_bounds() const;
00164   Teuchos::RefCountPtr<const Epetra_Vector> get_p_lower_bounds(int l) const;
00166   Teuchos::RefCountPtr<const Epetra_Vector> get_p_upper_bounds(int l) const;
00168   Teuchos::RefCountPtr<Epetra_Operator> create_W() const;
00170   Teuchos::RefCountPtr<Epetra_Operator> create_DfDp_op(int l) const;
00172   InArgs createInArgs() const;
00174   OutArgs createOutArgs() const;
00176   void evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const;
00177 
00179 
00180 private:
00181 
00182   // /////////////////////////////////////
00183   // Private types
00184 
00185   typedef Teuchos::Array<Teuchos::RefCountPtr<const Epetra_Map> >  RCP_Eptra_Map_Array_t;
00186   typedef Teuchos::Array<Teuchos::RefCountPtr<Epetra_Vector> >     RCP_Eptra_Vector_Array_t;
00187 
00188   // /////////////////////////////////////
00189   // Private member data
00190 
00191   static const int Np_         = 2; // Number of axiliary parameters
00192   static const int p_bndy_idx  = 0; // index for boundary flux parameters
00193   static const int p_rx_idx    = 1; // index for reaction rate parameter
00194 
00195   bool      isInitialized_;
00196 
00197   Teuchos::RefCountPtr<GLpApp::GLpYUEpetraDataPool>   dat_;
00198   int                                                 np_;
00199   Teuchos::RefCountPtr<const Epetra_Vector>           q_;
00200 
00201   Teuchos::RefCountPtr<const Epetra_Map>              map_p_bar_;
00202   Teuchos::RefCountPtr<Epetra_MultiVector>            B_bar_;
00203 
00204   Teuchos::RefCountPtr<const Epetra_Comm>  epetra_comm_;
00205   Teuchos::RefCountPtr<const Epetra_Map>   map_x_;
00206   RCP_Eptra_Map_Array_t                    map_p_;
00207   Teuchos::RefCountPtr<const Epetra_Map>   map_f_;
00208   Teuchos::RefCountPtr<const Epetra_Map>   map_g_;
00209 
00210   Teuchos::RefCountPtr<Epetra_Vector> x0_;
00211   Teuchos::RefCountPtr<Epetra_Vector> xL_;
00212   Teuchos::RefCountPtr<Epetra_Vector> xU_;
00213   RCP_Eptra_Vector_Array_t            p0_;
00214   RCP_Eptra_Vector_Array_t            pL_;
00215   RCP_Eptra_Vector_Array_t            pU_;
00216   Teuchos::RefCountPtr<Epetra_Vector> gL_;
00217   Teuchos::RefCountPtr<Epetra_Vector> gU_;
00218 
00219   Teuchos::RefCountPtr<Epetra_CrsGraph>  W_graph_;
00220 
00221 };
00222 
00223 } // namespace GLpApp
00224 
00225 #endif // GLP_APP_ADV_DIFF_REACT_OPT_MODEL_HPP

Generated on Thu Sep 18 12:31:44 2008 for EpetraExt by doxygen 1.3.9.1