Teko  Version of the Day
 All Classes Files Functions Variables Pages
Teko_LSCSIMPLECStrategy.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Teko: A package for block and physics based preconditioning
4 //
5 // Copyright 2010 NTESS and the Teko contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef __Teko_LSCSIMPLECStrategy_hpp__
11 #define __Teko_LSCSIMPLECStrategy_hpp__
12 
13 #include "Teko_LSCStrategy.hpp"
14 
15 namespace Teko {
16 namespace NS {
17 
18 class LSCPrecondState; // forward declration
19 
30  public:
32 
35 
36  virtual ~LSCSIMPLECStrategy() {}
37 
39 
40 
48  virtual void buildState(BlockedLinearOp &A, BlockPreconditionerState &state) const;
49 
58  virtual LinearOp getInvBQBt(const BlockedLinearOp &A, BlockPreconditionerState &state) const;
59 
68  virtual LinearOp getInvBHBt(const BlockedLinearOp &A, BlockPreconditionerState &state) const;
69 
78  virtual LinearOp getInvF(const BlockedLinearOp &A, BlockPreconditionerState &state) const;
79 
89  virtual LinearOp getOuterStabilization(const BlockedLinearOp & /* A */,
90  BlockPreconditionerState & /* state */) const {
91  return Teuchos::null;
92  }
93 
94  virtual LinearOp getInnerStabilization(const BlockedLinearOp &A,
95  BlockPreconditionerState &state) const;
96 
105  virtual LinearOp getInvMass(const BlockedLinearOp &A, BlockPreconditionerState &state) const;
106 
115  virtual LinearOp getHScaling(const BlockedLinearOp &A, BlockPreconditionerState &state) const;
116 
123  virtual bool useFullLDU() const { return useFullLDU_; }
124 
126  virtual void initializeFromParameterList(const Teuchos::ParameterList &pl,
127  const InverseLibrary &invLib);
128 
130  virtual void initializeState(const BlockedLinearOp &A, LSCPrecondState *state) const;
131 
137  void computeInverses(const BlockedLinearOp &A, LSCPrecondState *state) const;
138 
140  virtual void setUseFullLDU(bool val) { useFullLDU_ = val; }
141 
142  virtual void setSymmetric(bool /* isSymmetric */) {}
143 
144  protected:
145  // how to invert the matrices
146  Teuchos::RCP<InverseFactory> invFactoryF_;
147  Teuchos::RCP<InverseFactory> invFactoryS_;
148 
149  // flags for handling various options
150  bool useFullLDU_;
151  DiagonalType scaleType_;
152 
153  private:
155 };
156 
157 } // end namespace NS
158 } // end namespace Teko
159 
160 #endif
virtual LinearOp getOuterStabilization(const BlockedLinearOp &, BlockPreconditionerState &) const
void computeInverses(const BlockedLinearOp &A, LSCPrecondState *state) const
virtual LinearOp getInvMass(const BlockedLinearOp &A, BlockPreconditionerState &state) const
An implementation of a state object for block preconditioners.
virtual void setUseFullLDU(bool val)
Set to true to use the Full LDU decomposition, false otherwise.
virtual void initializeState(const BlockedLinearOp &A, LSCPrecondState *state) const
Initialize the state object using this blocked linear operator.
virtual LinearOp getHScaling(const BlockedLinearOp &A, BlockPreconditionerState &state) const
Preconditioner state for the LSC factory.
A strategy that takes a single inverse factory and uses that for all inverses. If no mass matrix is p...
Strategy for driving LSCPreconditionerFactory.
virtual void initializeFromParameterList(const Teuchos::ParameterList &pl, const InverseLibrary &invLib)
Initialize from a parameter list.
virtual LinearOp getInnerStabilization(const BlockedLinearOp &A, BlockPreconditionerState &state) const
virtual LinearOp getInvF(const BlockedLinearOp &A, BlockPreconditionerState &state) const
virtual LinearOp getInvBHBt(const BlockedLinearOp &A, BlockPreconditionerState &state) const
virtual LinearOp getInvBQBt(const BlockedLinearOp &A, BlockPreconditionerState &state) const
virtual void buildState(BlockedLinearOp &A, BlockPreconditionerState &state) const
Functions inherited from LSCStrategy.