Teko Version of the Day
Loading...
Searching...
No Matches
Teko_PCDStrategy.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_PCDStrategy_hpp__
11#define __Teko_PCDStrategy_hpp__
12
13#include "Teko_LU2x2Strategy.hpp"
14
15// Teuchos includes
16#include "Teuchos_Time.hpp"
17
18namespace Teko {
19namespace NS {
20
29class PCDStrategy : public LU2x2Strategy {
30 public:
33
35 PCDStrategy(const Teuchos::RCP<InverseFactory>& invFA, const Teuchos::RCP<InverseFactory>& invS);
36
38 virtual ~PCDStrategy() {}
39
41 virtual const Teko::LinearOp getHatInvA00(const Teko::BlockedLinearOp& A,
42 BlockPreconditionerState& state) const;
43
45 virtual const Teko::LinearOp getTildeInvA00(const Teko::BlockedLinearOp& A,
46 BlockPreconditionerState& state) const;
47
50 virtual const Teko::LinearOp getInvS(const Teko::BlockedLinearOp& A,
51 BlockPreconditionerState& state) const;
52
60 virtual void initializeFromParameterList(const Teuchos::ParameterList& settings,
61 const InverseLibrary& invLib);
62
86 virtual Teuchos::RCP<Teuchos::ParameterList> getRequestedParameters() const;
87
110 virtual bool updateRequestedParameters(const Teuchos::ParameterList& pl);
111
112 protected:
115 static void buildTimers();
116
123 void initializeState(const Teko::BlockedLinearOp& A, BlockPreconditionerState& state) const;
124
125 // how to invert the matrices
126 Teuchos::RCP<InverseFactory> invFactoryF_; // for \tilde{A_00}\f$
127 Teuchos::RCP<InverseFactory> invFactoryS_;
128
129 DiagonalType massInverseType_;
130
132 Teuchos::RCP<Teuchos::ParameterList> lapParams_;
133
135 Teuchos::RCP<Teuchos::ParameterList> pcdParams_;
136
137 bool schurCompOrdering_;
138
139 static Teuchos::RCP<Teuchos::Time> initTimer_;
140 static Teuchos::RCP<Teuchos::Time> invSTimer_;
141 static Teuchos::RCP<Teuchos::Time> invFTimer_;
142 static Teuchos::RCP<Teuchos::Time> opsTimer_;
143
144 public:
145 // some static functions for determining strings
146
147 static std::string getPCDString() { return "PCD Operator"; }
148 static std::string getPressureLaplaceString() { return "Pressure Laplace Operator"; }
149 static std::string getPressureMassString() { return "Pressure Mass Matrix"; }
150};
151
152} // end namespace NS
153} // end namespace Teko
154
155#endif
An implementation of a state object for block preconditioners.
Abstract strategy for computing inv(F) and inv(S) in the LU2x2PreconditionerFactory.
Teuchos::RCP< Teuchos::ParameterList > lapParams_
Passed to application for construction of laplace operator.
virtual const Teko::LinearOp getTildeInvA00(const Teko::BlockedLinearOp &A, BlockPreconditionerState &state) const
virtual void initializeFromParameterList(const Teuchos::ParameterList &settings, const InverseLibrary &invLib)
This function builds the internals of the state from a parameter list.
Teuchos::RCP< Teuchos::ParameterList > pcdParams_
Passed to application for construction of PCD operator.
virtual const Teko::LinearOp getInvS(const Teko::BlockedLinearOp &A, BlockPreconditionerState &state) const
virtual const Teko::LinearOp getHatInvA00(const Teko::BlockedLinearOp &A, BlockPreconditionerState &state) const
virtual ~PCDStrategy()
Destructor (does nothing).
virtual Teuchos::RCP< Teuchos::ParameterList > getRequestedParameters() const
Request the additional parameters this preconditioner factory needs.
virtual bool updateRequestedParameters(const Teuchos::ParameterList &pl)
Update this object with the fields from a parameter list.
void initializeState(const Teko::BlockedLinearOp &A, BlockPreconditionerState &state) const
PCDStrategy()
default Constructor