Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_ALOperator.hpp
1 /*
2  * Author: Zhen Wang
3  * Email: wangz@ornl.gov
4  * zhen.wang@alum.emory.edu
5  */
6 
7 #ifndef __Teko_ALOperator_hpp__
8 #define __Teko_ALOperator_hpp__
9 
10 #include "Teko_BlockedEpetraOperator.hpp"
11 #include "Teko_Utilities.hpp"
12 
13 namespace Teko {
14 
15 namespace NS {
16 
82  public:
98  ALOperator(const std::vector<std::vector<int> >& vars,
99  const Teuchos::RCP<Epetra_Operator>& content, LinearOp pressureMassMatrix,
100  double gamma = 0.05, const std::string& label = "<ANYM>");
101 
115  ALOperator(const std::vector<std::vector<int> >& vars,
116  const Teuchos::RCP<Epetra_Operator>& content, double gamma = 0.05,
117  const std::string& label = "<ANYM>");
118 
119  // Destructor
120  virtual ~ALOperator() {}
121 
128  void setPressureMassMatrix(LinearOp pressureMassMatrix);
129 
133  const LinearOp& getPressureMassMatrix() const { return pressureMassMatrix_; }
134 
140  void setGamma(double gamma);
141 
146  const double& getGamma() const { return gamma_; }
147 
154  void augmentRHS(const Epetra_MultiVector& b, Epetra_MultiVector& bAugmented);
155 
159  int getNumberOfBlockRows() const { return numBlockRows_; }
160 
165  virtual void RebuildOps() { BuildALOperator(); }
166 
174  const Teuchos::RCP<const Epetra_Operator> GetBlock(int i, int j) const;
175 
176  protected:
180  Teuchos::RCP<Thyra::LinearOpBase<double> > alOperator_;
181 
185  Teuchos::RCP<Thyra::LinearOpBase<double> > alOperatorRhs_;
186 
191 
196 
200  double gamma_;
201 
205  int dim_;
206 
211 
215  void checkDim(const std::vector<std::vector<int> >& vars);
216 
220  void BuildALOperator();
221 };
222 
223 } // end namespace NS
224 
225 } // end namespace Teko
226 
227 #endif /* __Teko_ALOperator_hpp__ */
Teuchos::RCP< Thyra::LinearOpBase< double > > alOperatorRhs_
void augmentRHS(const Epetra_MultiVector &b, Epetra_MultiVector &bAugmented)
const double & getGamma() const
void checkDim(const std::vector< std::vector< int > > &vars)
void setPressureMassMatrix(LinearOp pressureMassMatrix)
virtual void RebuildOps()
Sparse matrix vector multiplication for augmented Lagrangian-based preconditioners.
int getNumberOfBlockRows() const
Tear about a user specified Epetra_Operator (CrsMatrix) using a vector of vectors of GIDs for each bl...
const Teuchos::RCP< const Epetra_Operator > GetBlock(int i, int j) const
ALOperator(const std::vector< std::vector< int > > &vars, const Teuchos::RCP< Epetra_Operator > &content, LinearOp pressureMassMatrix, double gamma=0.05, const std::string &label="<ANYM>")
void setGamma(double gamma)
const LinearOp & getPressureMassMatrix() const
Teuchos::RCP< Thyra::LinearOpBase< double > > alOperator_