00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef LOCA_EPETRA_INTERFACE_MULTIPOINT_H
00040 #define LOCA_EPETRA_INTERFACE_MULTIPOINT_H
00041
00042 #include "LOCA.H"
00043 #include "NOX_Common.H"
00044 #include "LOCA_Epetra_Interface_Required.H"
00045 #include "NOX_Epetra_Interface_Jacobian.H"
00046
00047 #ifdef HAVE_NOX_EPETRAEXT
00048
00049 #include <iostream>
00050 #include "Epetra_Map.h"
00051 #include "Epetra_Vector.h"
00052 #include "Epetra_Operator.h"
00053 #include "Epetra_RowMatrix.h"
00054 #include "Epetra_CrsMatrix.h"
00055 #include "Epetra_DistObject.h"
00056 #include "Epetra_Import.h"
00057 #ifdef HAVE_MPI
00058 #include "Epetra_MpiComm.h"
00059 #include "EpetraExt_MultiMpiComm.h"
00060 #else
00061 #include "Epetra_SerialComm.h"
00062 #include "EpetraExt_MultiSerialComm.h"
00063 #endif
00064
00065 #include "EpetraExt_BlockVector.h"
00066 #include "EpetraExt_BlockCrsMatrix.h"
00067
00068
00069 namespace LOCA {
00070 namespace Epetra {
00071 namespace Interface {
00072 class Required;
00073 }
00074 }
00075 }
00076 namespace NOX {
00077 namespace Epetra {
00078 namespace Interface {
00079 class Jacobian;
00080 }
00081 }
00082 }
00083
00084
00085 namespace LOCA {
00086 namespace Epetra {
00087 namespace Interface {
00088
00104 class MultiPoint :
00105 public LOCA::Epetra::Interface::Required,
00106 public NOX::Epetra::Interface::Jacobian {
00107
00108 public:
00109
00117 MultiPoint(
00118 const Teuchos::RCP<LOCA::Epetra::Interface::Required> &iReq,
00119 const Teuchos::RCP<NOX::Epetra::Interface::Jacobian> &iJac,
00120 const Epetra_MultiVector &splitMultiVec,
00121 const Teuchos::RCP<Epetra_RowMatrix> &splitJac,
00122 const Teuchos::RCP<EpetraExt::MultiComm> &globalComm);
00123
00125 virtual ~MultiPoint();
00126
00133 virtual bool computeF(const Epetra_Vector& x, Epetra_Vector& F,
00134 const FillType fillFlag);
00135
00142 virtual bool computeJacobian(const Epetra_Vector& x,
00143 Epetra_Operator& Jac);
00144
00146 virtual void setParameters(const LOCA::ParameterVector& param);
00147
00149 virtual void printSolution(const Epetra_Vector& x_, double conParam);
00150
00152 virtual EpetraExt::BlockVector& getSolution();
00153
00155 virtual EpetraExt::BlockCrsMatrix& getJacobian();
00156
00158 virtual void throwError(const string& functionName,
00159 const string& errorMsg) const;
00160
00161 private:
00162
00164 Teuchos::RCP<LOCA::Epetra::Interface::Required> iReq;
00165 Teuchos::RCP< NOX::Epetra::Interface::Jacobian> iJac;
00166
00168 Teuchos::RCP<Epetra_RowMatrix> splitJac;
00169
00171 Teuchos::RCP<EpetraExt::MultiComm> globalComm;
00172
00174 Epetra_Vector splitVec;
00175
00177 Epetra_Vector splitRes;
00178
00180 EpetraExt::BlockCrsMatrix* jacobian;
00181
00183 EpetraExt::BlockVector* solution;
00184
00186 EpetraExt::BlockVector* solutionOverlap;
00187
00189 Epetra_Import* overlapImporter;
00190
00192 int timeStepsOnTimeDomain;
00193
00195 int numTimeDomains;
00196
00198 int timeDomain;
00199
00201 int conStep;
00202
00209 std::vector< std::vector<int> >* rowStencil;
00210
00212 std::vector<int>* rowIndex;
00213
00215 Epetra_CrsMatrix* splitJacCrs;
00216
00217 };
00218
00219 }
00220 }
00221 }
00222
00223 #endif // HAVE_NOX_EPETRAEXT
00224 #endif // LOCA_EPETRA_INTERFACE_MULTIPOINT_H