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
33 public:
34 // Staiblized constructor
35 StaticLSCStrategy(const LinearOp& invF, const LinearOp& invBQBtmC, const LinearOp& invD,
36 const LinearOp& invMass);
37
38 // Stable constructor
39 StaticLSCStrategy(const LinearOp& invF, const LinearOp& invBQBtmC, const LinearOp& invMass);
40
48 virtual void buildState(BlockedLinearOp& /* A */, BlockPreconditionerState& /* state */) const {}
49
58 virtual LinearOp getInvF(const BlockedLinearOp& /* A */,
59 BlockPreconditionerState& /* state */) const {
60 return invF_;
61 }
62
71 virtual LinearOp getInvBQBt(const BlockedLinearOp& /* A */,
72 BlockPreconditionerState& /* state */) const {
73 return invBQBtmC_;
74 }
75
84 virtual LinearOp getInvBHBt(const BlockedLinearOp& /* A */,
85 BlockPreconditionerState& /* state */) const {
86 return invBQBtmC_;
87 }
88
97 virtual LinearOp getOuterStabilization(const BlockedLinearOp& /* A */,
98 BlockPreconditionerState& /* state */) const {
99 return invD_;
100 }
101
102 virtual LinearOp getInnerStabilization(const BlockedLinearOp& /* A */,
103 BlockPreconditionerState& /* state */) const {
104 return Teuchos::null;
105 }
106
115 virtual LinearOp getInvMass(const BlockedLinearOp& /* A */,
116 BlockPreconditionerState& /* state */) const {
117 return invMass_;
118 }
119
128 virtual LinearOp getHScaling(const BlockedLinearOp& /* A */,
129 BlockPreconditionerState& /* state */) const {
130 return invMass_;
131 }
132
139 virtual bool useFullLDU() const { return false; }
140
146 virtual void setSymmetric(bool /* isSymmetric */) {}
147
148 protected:
149 // protected memebers
150 LinearOp invF_;
151 LinearOp invBQBtmC_;
152 LinearOp invD_;
153 LinearOp invMass_;
154};
155
156} // end namespace NS
157} // end namespace Teko
158
159#endif
An implementation of a state object for block preconditioners.
Strategy for driving LSCPreconditionerFactory.
A fixed LSCStrategy built from operators the caller supplies directly.
virtual LinearOp getInnerStabilization(const BlockedLinearOp &, BlockPreconditionerState &) const
virtual LinearOp getInvBQBt(const BlockedLinearOp &, BlockPreconditionerState &) const
virtual void buildState(BlockedLinearOp &, BlockPreconditionerState &) const
virtual LinearOp getInvBHBt(const BlockedLinearOp &, BlockPreconditionerState &) const
virtual LinearOp getHScaling(const BlockedLinearOp &, BlockPreconditionerState &) const
virtual LinearOp getInvMass(const BlockedLinearOp &, BlockPreconditionerState &) const
virtual LinearOp getInvF(const BlockedLinearOp &, BlockPreconditionerState &) const
virtual LinearOp getOuterStabilization(const BlockedLinearOp &, BlockPreconditionerState &) const