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
00040 #ifndef LOCA_EPETRA_SHIFTINVERTOPERATOR_H
00041 #define LOCA_EPETRA_SHIFTINVERTOPERATOR_H
00042
00043 #include "Teuchos_RCP.hpp"
00044
00045 #include "Epetra_Operator.h"
00046 #include "NOX_Epetra_Interface_Jacobian.H"
00047
00048
00049 namespace LOCA {
00050 class GlobalData;
00051 namespace Epetra {
00052 class Group;
00053 }
00054 }
00055
00056 namespace LOCA {
00057
00058 namespace Epetra {
00059
00061 class ShiftInvertInterface : public NOX::Epetra::Interface::Jacobian {
00062
00063 public:
00064
00066 ShiftInvertInterface() {};
00067
00069 ~ShiftInvertInterface() {};
00070
00072 bool computeJacobian(const Epetra_Vector &x,
00073 Epetra_Operator& Jac) {return true;};
00074 };
00075
00077 class ShiftInvertOperator : public Epetra_Operator {
00078
00079 public:
00080
00082 ShiftInvertOperator(
00083 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00084 const Teuchos::RCP<LOCA::Epetra::Group>& grp,
00085 const Teuchos::RCP<const Epetra_Operator>& jac,
00086 double shift);
00087
00089 virtual ~ShiftInvertOperator();
00090
00092 virtual int SetUseTranspose(bool UseTranspose);
00093
00095 virtual int Apply(const Epetra_MultiVector& X,
00096 Epetra_MultiVector& Y) const;
00097
00099 virtual int ApplyInverse(const Epetra_MultiVector& X,
00100 Epetra_MultiVector& Y) const;
00101
00103 virtual double NormInf() const;
00104
00106 virtual const char * Label() const;
00107
00109 virtual bool UseTranspose() const;
00110
00112 virtual bool HasNormInf() const;
00113
00118 virtual const Epetra_Comm & Comm() const;
00119
00124 virtual const Epetra_Map & OperatorDomainMap() const;
00125
00130 virtual const Epetra_Map & OperatorRangeMap() const;
00131
00132 private:
00133
00135 ShiftInvertOperator(const ShiftInvertOperator&);
00136
00138 ShiftInvertOperator& operator=(const ShiftInvertOperator&);
00139
00140 protected:
00141
00143 Teuchos::RCP<LOCA::GlobalData> globalData;
00144
00146 Teuchos::RCP<const LOCA::Epetra::Group> locagrp;
00147
00149 Teuchos::RCP<const Epetra_Operator> jacOper;
00150
00152 double shift_;
00153
00155 const char * Label_;
00156 };
00157 }
00158 }
00159 #endif