Teko Version of the Day
Loading...
Searching...
No Matches
Teko_StaticLSCStrategy.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_StaticLSCStrategy_hpp__
11#define __Teko_StaticLSCStrategy_hpp__
12
13#include "Teko_LSCStrategy.hpp"
14
15namespace Teko {
16namespace NS {
17
18class LSCPrecondState; // forward declaration
19
20// constant, not very flexible strategy for driving LSCPreconditioenrFactory
21class StaticLSCStrategy : public LSCStrategy {
22 public:
23 // Staiblized constructor
24 StaticLSCStrategy(const LinearOp& invF, const LinearOp& invBQBtmC, const LinearOp& invD,
25 const LinearOp& invMass);
26
27 // Stable constructor
28 StaticLSCStrategy(const LinearOp& invF, const LinearOp& invBQBtmC, const LinearOp& invMass);
29
37 virtual void buildState(BlockedLinearOp& /* A */, BlockPreconditionerState& /* state */) const {}
38
47 virtual LinearOp getInvF(const BlockedLinearOp& /* A */,
48 BlockPreconditionerState& /* state */) const {
49 return invF_;
50 }
51
60 virtual LinearOp getInvBQBt(const BlockedLinearOp& /* A */,
61 BlockPreconditionerState& /* state */) const {
62 return invBQBtmC_;
63 }
64
73 virtual LinearOp getInvBHBt(const BlockedLinearOp& /* A */,
74 BlockPreconditionerState& /* state */) const {
75 return invBQBtmC_;
76 }
77
86 virtual LinearOp getOuterStabilization(const BlockedLinearOp& /* A */,
87 BlockPreconditionerState& /* state */) const {
88 return invD_;
89 }
90
91 virtual LinearOp getInnerStabilization(const BlockedLinearOp& /* A */,
92 BlockPreconditionerState& /* state */) const {
93 return Teuchos::null;
94 }
95
104 virtual LinearOp getInvMass(const BlockedLinearOp& /* A */,
105 BlockPreconditionerState& /* state */) const {
106 return invMass_;
107 }
108
117 virtual LinearOp getHScaling(const BlockedLinearOp& /* A */,
118 BlockPreconditionerState& /* state */) const {
119 return invMass_;
120 }
121
128 virtual bool useFullLDU() const { return false; }
129
135 virtual void setSymmetric(bool /* isSymmetric */) {}
136
137 protected:
138 // protected memebers
139 LinearOp invF_;
140 LinearOp invBQBtmC_;
141 LinearOp invD_;
142 LinearOp invMass_;
143};
144
145} // end namespace NS
146} // end namespace Teko
147
148#endif
Preconditioner state for the LSC factory.
Strategy for driving LSCPreconditionerFactory.
virtual bool useFullLDU() const =0