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 
16 namespace NS
17 {
18 
84 {
85 public:
86 
102  ALOperator(const std::vector<std::vector<int> > & vars,
103  const Teuchos::RCP<Epetra_Operator> & content,
104  LinearOp pressureMassMatrix,
105  double gamma = 0.05, const std::string & label = "<ANYM>");
106 
120  ALOperator(const std::vector<std::vector<int> > & vars,
121  const Teuchos::RCP<Epetra_Operator> & content,
122  double gamma = 0.05, const std::string & label = "<ANYM>");
123 
124  // Destructor
125  virtual
126  ~ALOperator()
127  {
128  }
129 
136  void
137  setPressureMassMatrix(LinearOp pressureMassMatrix);
138 
142  const LinearOp &
144  {
145  return pressureMassMatrix_;
146  }
147 
153  void
154  setGamma(double gamma);
155 
160  const double &
161  getGamma() const
162  {
163  return gamma_;
164  }
165 
172  void
173  augmentRHS(const Epetra_MultiVector & b, Epetra_MultiVector & bAugmented);
174 
178  int
180  {
181  return numBlockRows_;
182  }
183 
188  virtual void
190  {
191  BuildALOperator();
192  }
193 
201  const Teuchos::RCP<const Epetra_Operator>
202  GetBlock(int i, int j) const;
203 
204 protected:
205 
209  Teuchos::RCP<Thyra::LinearOpBase<double> > alOperator_;
210 
214  Teuchos::RCP<Thyra::LinearOpBase<double> > alOperatorRhs_;
215 
220 
225 
229  double gamma_;
230 
234  int dim_;
235 
240 
244  void
245  checkDim(const std::vector<std::vector<int> > & vars);
246 
250  void
251  BuildALOperator();
252 };
253 
254 } // end namespace NS
255 
256 } // end namespace Teko
257 
258 #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_