EpetraExt_MultiPointModelEvaluator.h

Go to the documentation of this file.
00001 #ifndef EPETRAEXT_MULTIPOINTMODELEVALUATOR_H
00002 #define EPETRAEXT_MULTIPOINTMODELEVALUATOR_H
00003 
00004 #include "EpetraExt_ModelEvaluator.h"
00005 #include "EpetraExt_BlockCrsMatrix.h"
00006 #include "EpetraExt_BlockVector.h"
00007 #include "EpetraExt_BlockMultiVector.h"
00008 #ifdef HAVE_MPI
00009 #include "EpetraExt_MultiMpiComm.h"
00010 #else
00011 #include "EpetraExt_MultiSerialComm.h"
00012 #endif
00013 
00023 namespace EpetraExt {
00024   class MultiPointModelEvaluator
00025     : public ModelEvaluator
00026   {
00027   public:
00028 
00031 
00033   MultiPointModelEvaluator(
00034     Teuchos::RefCountPtr<EpetraExt::ModelEvaluator> underlyingME_,
00035     const Teuchos::RefCountPtr<EpetraExt::MultiComm> &globalComm_,
00036     const std::vector<Epetra_Vector*> initGuessVec,
00037     Teuchos::RefCountPtr<std::vector< Teuchos::RefCountPtr<Epetra_Vector> > >  q_vec,
00038     Teuchos::RefCountPtr<std::vector< Teuchos::RefCountPtr<Epetra_Vector> > >  matching_vec = Teuchos::null
00039     );
00040 
00042 
00043   ~MultiPointModelEvaluator();
00044 
00045 
00048 
00050   Teuchos::RefCountPtr<const Epetra_Map> get_x_map() const;
00052   Teuchos::RefCountPtr<const Epetra_Map> get_f_map() const;
00054   Teuchos::RefCountPtr<const Epetra_Map> get_p_map(int l) const;
00056   Teuchos::RefCountPtr<const Epetra_Map> get_g_map(int j) const;
00058   Teuchos::RefCountPtr<const Epetra_Vector> get_x_init() const;
00060   Teuchos::RefCountPtr<const Epetra_Vector> get_p_init(int l) const;
00062   Teuchos::RefCountPtr<Epetra_Operator> create_W() const;
00064   InArgs createInArgs() const;
00066   OutArgs createOutArgs() const;
00068   void evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const;
00069 
00071 
00072   private:
00073 
00074    Teuchos::RefCountPtr<EpetraExt::ModelEvaluator> underlyingME;
00075 
00077    Teuchos::RefCountPtr<EpetraExt::MultiComm> globalComm;
00078 
00080    Teuchos::RefCountPtr<std::vector< Teuchos::RefCountPtr<Epetra_Vector> > > q_vec;
00081 
00083    Teuchos::RefCountPtr<Epetra_RowMatrix> split_W;
00084 
00086    Teuchos::RefCountPtr<Epetra_Vector> split_x;
00087 
00089    Teuchos::RefCountPtr<Epetra_Vector> split_f;
00090 
00092    Teuchos::RefCountPtr<Epetra_Vector> split_g;
00093 
00095    Teuchos::RefCountPtr<Epetra_MultiVector> split_DfDp;
00096 
00098    Teuchos::RefCountPtr<Epetra_MultiVector> split_DgDx;
00099    Teuchos::RefCountPtr<Epetra_MultiVector> split_DgDp;
00100 
00101    EpetraExt::ModelEvaluator::DerivativeMultiVector* derivMV_DfDp;
00102    EpetraExt::ModelEvaluator::Derivative* deriv_DfDp;
00103    EpetraExt::ModelEvaluator::DerivativeMultiVector* derivMV_DgDx;
00104    EpetraExt::ModelEvaluator::Derivative* deriv_DgDx;
00105    EpetraExt::ModelEvaluator::DerivativeMultiVector* derivMV_DgDp;
00106    EpetraExt::ModelEvaluator::Derivative* deriv_DgDp;
00107 
00109    Teuchos::RefCountPtr<EpetraExt::BlockCrsMatrix> block_W;
00110 
00112    EpetraExt::BlockVector* block_x;
00113 
00115    EpetraExt::BlockVector* block_f;
00116 
00118    EpetraExt::BlockMultiVector* block_DfDp;
00119 
00121    EpetraExt::BlockMultiVector* block_DgDx;
00122 
00124    Teuchos::RefCountPtr<EpetraExt::BlockVector> solution_init;
00125 
00127    int underlyingNg;
00128 
00130    int timeStepsOnTimeDomain;
00131 
00133    int numTimeDomains;
00134 
00136    int timeDomain;
00137 
00144    std::vector< std::vector<int> >* rowStencil;
00145 
00147    std::vector<int>* rowIndex;
00148 
00150    EDerivativeMultiVectorOrientation orientation_DgDp;
00151    int num_dg0dp0;
00152    int num_g0;
00153    int num_p0;
00154 
00156    Teuchos::RefCountPtr<std::vector< Teuchos::RefCountPtr<Epetra_Vector> > > matching_vec;
00157    bool matchingProblem;
00158 
00159   };
00160 }
00161 #endif

Generated on Wed May 12 21:40:37 2010 for EpetraExt by  doxygen 1.4.7