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 
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:
177 
178  Teuchos::RCP<InvModALStrategy> invOpsStrategy_;
179 
180  bool isSymmetric_;
181 };
182 
183 } // end namespace NS
184 
185 } // end namespace Teko
186 
187 #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.