Teko  Version of the Day
Teko_ModALPreconditionerFactory.hpp
1 /*
2  * Author: Zhen Wang
3  * Email: wangz@ornl.gov
4  * zhen.wang@alum.emory.edu
5  */
6 
7 #ifndef __Teko_ModALPreconditionerFactory_hpp__
8 #define __Teko_ModALPreconditionerFactory_hpp__
9 
10 #include "Teko_BlockPreconditionerFactory.hpp"
11 #include "Teko_InvModALStrategy.hpp"
12 
13 namespace Teko
14 {
15 
16 namespace NS
17 {
18 
23 {
24 public:
26 
27  LinearOp pressureMassMatrix_;
28  LinearOp invPressureMassMatrix_;
29  ModifiableLinearOp B1tMpB1_, B2tMpB2_, B3tMpB3_;
30  ModifiableLinearOp A11p_, A22p_, A33p_;
31  ModifiableLinearOp invA11p_, invA22p_, invA33p_, invS_;
32  ModifiableLinearOp S_;
33 
34  double gamma_;
35  bool isStabilized_;
36 };
37 
113 {
114 public:
115 
117 
118  ModALPreconditionerFactory(const Teuchos::RCP<InverseFactory> & factory);
119 
120  ModALPreconditionerFactory(const Teuchos::RCP<InverseFactory> & invFactoryA,
121  const Teuchos::RCP<InverseFactory> & invFactoryS);
122 
123  ModALPreconditionerFactory(const Teuchos::RCP<InverseFactory> & factory,
124  LinearOp & pressureMassMatrix);
125 
126  ModALPreconditionerFactory(const Teuchos::RCP<InverseFactory> & invFactoryA,
127  const Teuchos::RCP<InverseFactory> & invFactoryS,
128  LinearOp & pressureMassMatrix);
129 
130  ModALPreconditionerFactory(const Teuchos::RCP<InvModALStrategy> & strategy);
131 
137  void
138  setPressureMassMatrix(const LinearOp & pressureMassMatrix)
139  {
140  invOpsStrategy_->setPressureMassMatrix(pressureMassMatrix);
141  }
142 
148  void
149  setGamma(double gamma)
150  {
151  invOpsStrategy_->setGamma(gamma);
152  }
153 
162  virtual LinearOp
163  buildPreconditionerOperator(BlockedLinearOp & alOp,
164  BlockPreconditionerState & state) const;
165 
169  virtual Teuchos::RCP<PreconditionerState>
171  {
172  return Teuchos::rcp(new ModALPrecondState());
173  }
174 
175 protected:
176 
177  Teuchos::RCP<InvModALStrategy> invOpsStrategy_;
178 
179  bool isSymmetric_;
180 };
181 
182 } // end namespace NS
183 
184 } // end namespace Teko
185 
186 #endif /* __Teko_ModALPreconditionerFactory_hpp__ */
void setPressureMassMatrix(const LinearOp &pressureMassMatrix)
Modified augmented Lagrangian-based preconditioner for incompressible Navier-Stokes equations...
Abstract class which block preconditioner factories in Teko should be based on.
An implementation of a state object for block preconditioners.
virtual Teuchos::RCP< PreconditionerState > buildPreconditionerState() const
virtual LinearOp buildPreconditionerOperator(BlockedLinearOp &alOp, BlockPreconditionerState &state) const
Class for saving state variables for ModALPreconditionerFactory.