Teko  Version of the Day
 All Classes Files Functions Variables Pages
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 namespace NS {
16 
21  public:
23 
24  LinearOp pressureMassMatrix_;
25  LinearOp invPressureMassMatrix_;
26  ModifiableLinearOp B1tMpB1_, B2tMpB2_, B3tMpB3_;
27  ModifiableLinearOp A11p_, A22p_, A33p_;
28  ModifiableLinearOp invA11p_, invA22p_, invA33p_, invS_;
29  ModifiableLinearOp S_;
30 
31  double gamma_;
32  bool isStabilized_;
33 };
34 
111  public:
113 
114  ModALPreconditionerFactory(const Teuchos::RCP<InverseFactory>& factory);
115 
116  ModALPreconditionerFactory(const Teuchos::RCP<InverseFactory>& invFactoryA,
117  const Teuchos::RCP<InverseFactory>& invFactoryS);
118 
119  ModALPreconditionerFactory(const Teuchos::RCP<InverseFactory>& factory,
120  LinearOp& pressureMassMatrix);
121 
122  ModALPreconditionerFactory(const Teuchos::RCP<InverseFactory>& invFactoryA,
123  const Teuchos::RCP<InverseFactory>& invFactoryS,
124  LinearOp& pressureMassMatrix);
125 
126  ModALPreconditionerFactory(const Teuchos::RCP<InvModALStrategy>& strategy);
127 
133  void setPressureMassMatrix(const LinearOp& pressureMassMatrix) {
134  invOpsStrategy_->setPressureMassMatrix(pressureMassMatrix);
135  }
136 
142  void setGamma(double gamma) { invOpsStrategy_->setGamma(gamma); }
143 
152  virtual LinearOp buildPreconditionerOperator(BlockedLinearOp& alOp,
153  BlockPreconditionerState& state) const;
154 
158  virtual Teuchos::RCP<PreconditionerState> buildPreconditionerState() const {
159  return Teuchos::rcp(new ModALPrecondState());
160  }
161 
162  protected:
164 
165  Teuchos::RCP<InvModALStrategy> invOpsStrategy_;
166 
167  bool isSymmetric_;
168 };
169 
170 } // end namespace NS
171 
172 } // end namespace Teko
173 
174 #endif /* __Teko_ModALPreconditionerFactory_hpp__ */
void setPressureMassMatrix(const LinearOp &pressureMassMatrix)
virtual LinearOp buildPreconditionerOperator(BlockedLinearOp &blo, BlockPreconditionerState &state) const =0
Function that is called to build the preconditioner for the linear operator that is passed in...
Modified augmented Lagrangian-based preconditioner for incompressible Navier-Stokes equations...
Abstract class which block preconditioner factories in Teko should be based on.
virtual Teuchos::RCP< PreconditionerState > buildPreconditionerState() const
virtual LinearOp buildPreconditionerOperator(BlockedLinearOp &alOp, BlockPreconditionerState &state) const
An implementation of a state object for block preconditioners.
Class for saving state variables for ModALPreconditionerFactory.