Teko Version of the Day
Loading...
Searching...
No Matches
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_BlockedTpetraOperator.hpp"
11#include "Teko_Utilities.hpp"
12#include "Teko_ConfigDefs.hpp"
13
14namespace Teko::NS {
15
80 public:
96 ALOperator(const std::vector<std::vector<GO> >& vars,
97 const Teuchos::RCP<Tpetra::Operator<ST, LO, GO, NT> >& content,
98 LinearOp pressureMassMatrix, double gamma = 0.05, const std::string& label = "<ANYM>");
99
113 ALOperator(const std::vector<std::vector<GO> >& vars,
114 const Teuchos::RCP<Tpetra::Operator<ST, LO, GO, NT> >& content, double gamma = 0.05,
115 const std::string& label = "<ANYM>");
116
117 virtual ~ALOperator() {}
118
120 void setPressureMassMatrix(LinearOp pressureMassMatrix);
121
123 const LinearOp& getPressureMassMatrix() const { return pressureMassMatrix_; }
124
126 void setGamma(double gamma);
127
129 const double& getGamma() const { return gamma_; }
130
138 void augmentRHS(const Tpetra::MultiVector<ST, LO, GO, NT>& b,
139 Tpetra::MultiVector<ST, LO, GO, NT>& bAugmented);
140
142 int getNumberOfBlockRows() const { return numBlockRows_; }
143
145 virtual void RebuildOps() { BuildALOperator(); }
146
148 const Teuchos::RCP<const Tpetra::Operator<ST, LO, GO, NT> > GetBlock(int i, int j) const;
149
150 protected:
152 Teuchos::RCP<Thyra::LinearOpBase<ST> > alOperator_;
153
155 Teuchos::RCP<Thyra::LinearOpBase<ST> > alOperatorRhs_;
156
159 LinearOp invPressureMassMatrix_;
160
162 double gamma_;
163
165 int dim_;
166
169
171 void checkDim(const std::vector<std::vector<GO> >& vars);
172
174 void BuildALOperator();
175};
176
177} // end namespace Teko::NS
178
179#endif /* __Teko_ALOperator_hpp__ */
Sparse matrix-vector multiplication for augmented Lagrangian-based preconditioners.
void augmentRHS(const Tpetra::MultiVector< ST, LO, GO, NT > &b, Tpetra::MultiVector< ST, LO, GO, NT > &bAugmented)
void setPressureMassMatrix(LinearOp pressureMassMatrix)
const double & getGamma() const
Teuchos::RCP< Thyra::LinearOpBase< ST > > alOperatorRhs_
void checkDim(const std::vector< std::vector< GO > > &vars)
Teuchos::RCP< Thyra::LinearOpBase< ST > > alOperator_
const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > GetBlock(int i, int j) const
void setGamma(double gamma)
const LinearOp & getPressureMassMatrix() const
Tear about a user specified Tpetra::Operator<ST,LO,GO,NT> (CrsMatrix) using a vector of vectors of GI...