Teko
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Teko_LU2x2Strategy.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_LU2x2Strategy_hpp__
11
#define __Teko_LU2x2Strategy_hpp__
12
13
#include "Teuchos_RCP.hpp"
14
#include "Thyra_LinearOpBase.hpp"
15
16
#include "
Teko_Utilities.hpp
"
17
#include "Teko_InverseFactory.hpp"
18
#include "Teko_BlockPreconditionerFactory.hpp"
19
20
namespace
Teko {
21
65
class
LU2x2Strategy
{
66
public
:
67
virtual
~LU2x2Strategy
() {}
68
70
virtual
const
Teko::LinearOp
getHatInvA00
(
const
Teko::BlockedLinearOp& A,
71
BlockPreconditionerState
& state)
const
= 0;
72
74
virtual
const
Teko::LinearOp
getTildeInvA00
(
const
Teko::BlockedLinearOp& A,
75
BlockPreconditionerState
& state)
const
= 0;
76
78
virtual
const
Teko::LinearOp
getInvS
(
const
Teko::BlockedLinearOp& A,
79
BlockPreconditionerState
& state)
const
= 0;
80
92
virtual
void
initializeFromParameterList
(
const
Teuchos::ParameterList&
/* settings */
,
93
const
InverseLibrary&
/* invLib */
) {}
94
109
virtual
Teuchos::RCP<Teuchos::ParameterList>
getRequestedParameters
()
const
{
110
return
Teuchos::null;
111
}
112
126
virtual
bool
updateRequestedParameters
(
const
Teuchos::ParameterList&
/* pl */
) {
return
true
; }
127
129
void
setRequestHandler
(
const
Teuchos::RCP<RequestHandler>& rh) { requestHandler_ = rh; }
130
132
Teuchos::RCP<RequestHandler>
getRequestHandler
()
const
{
return
requestHandler_; }
133
134
private
:
135
Teuchos::RCP<RequestHandler> requestHandler_;
136
};
137
146
class
StaticLU2x2Strategy
:
public
LU2x2Strategy
{
147
public
:
156
StaticLU2x2Strategy
(
const
Teko::LinearOp& hInvA00,
const
Teko::LinearOp& tInvA00,
157
const
Teko::LinearOp& invS)
158
:
hatInvA00_
(hInvA00),
tildeInvA00_
(tInvA00),
invS_
(invS) {}
159
160
virtual
~StaticLU2x2Strategy
() {}
161
164
166
virtual
const
Teko::LinearOp
getHatInvA00
(
const
Teko::BlockedLinearOp&
/* A */
,
167
BlockPreconditionerState
&
/* state */
)
const
{
168
return
hatInvA00_
;
169
}
170
172
virtual
const
Teko::LinearOp
getTildeInvA00
(
const
Teko::BlockedLinearOp&
/* A */
,
173
BlockPreconditionerState
&
/* state */
)
const
{
174
return
tildeInvA00_
;
175
}
176
178
virtual
const
Teko::LinearOp
getInvS
(
const
Teko::BlockedLinearOp&
/* A */
,
179
BlockPreconditionerState
&
/* state */
)
const
{
180
return
invS_
;
181
}
182
184
185
protected
:
186
const
Teko::LinearOp
hatInvA00_
;
187
const
Teko::LinearOp
tildeInvA00_
;
188
const
Teko::LinearOp
invS_
;
189
190
private
:
191
// hide me!
192
StaticLU2x2Strategy
() {}
193
};
194
195
}
// end namespace Teko
196
197
#endif
Teko_Utilities.hpp
Teko::BlockPreconditionerState
An implementation of a state object for block preconditioners.
Definition
Teko_BlockPreconditionerFactory.hpp:43
Teko::LU2x2Strategy
Abstract strategy for computing inv(F) and inv(S) in the LU2x2PreconditionerFactory.
Definition
Teko_LU2x2Strategy.hpp:65
Teko::LU2x2Strategy::getRequestHandler
Teuchos::RCP< RequestHandler > getRequestHandler() const
This method gets the request handler uses by this object.
Definition
Teko_LU2x2Strategy.hpp:132
Teko::LU2x2Strategy::getInvS
virtual const Teko::LinearOp getInvS(const Teko::BlockedLinearOp &A, BlockPreconditionerState &state) const =0
Teko::LU2x2Strategy::initializeFromParameterList
virtual void initializeFromParameterList(const Teuchos::ParameterList &, const InverseLibrary &)
This function builds the internals of the state from a parameter list.
Definition
Teko_LU2x2Strategy.hpp:92
Teko::LU2x2Strategy::getTildeInvA00
virtual const Teko::LinearOp getTildeInvA00(const Teko::BlockedLinearOp &A, BlockPreconditionerState &state) const =0
Teko::LU2x2Strategy::setRequestHandler
void setRequestHandler(const Teuchos::RCP< RequestHandler > &rh)
This method sets the request handler for this object.
Definition
Teko_LU2x2Strategy.hpp:129
Teko::LU2x2Strategy::updateRequestedParameters
virtual bool updateRequestedParameters(const Teuchos::ParameterList &)
Update this object with the fields from a parameter list.
Definition
Teko_LU2x2Strategy.hpp:126
Teko::LU2x2Strategy::getRequestedParameters
virtual Teuchos::RCP< Teuchos::ParameterList > getRequestedParameters() const
Request the additional parameters this preconditioner factory needs.
Definition
Teko_LU2x2Strategy.hpp:109
Teko::LU2x2Strategy::getHatInvA00
virtual const Teko::LinearOp getHatInvA00(const Teko::BlockedLinearOp &A, BlockPreconditionerState &state) const =0
Teko::StaticLU2x2Strategy
A simple strategy for use with LU2x2PreconditionerFactory, that offers static objects for inv(F) and ...
Definition
Teko_LU2x2Strategy.hpp:146
Teko::StaticLU2x2Strategy::getInvS
virtual const Teko::LinearOp getInvS(const Teko::BlockedLinearOp &, BlockPreconditionerState &) const
Definition
Teko_LU2x2Strategy.hpp:178
Teko::StaticLU2x2Strategy::hatInvA00_
const Teko::LinearOp hatInvA00_
Definition
Teko_LU2x2Strategy.hpp:186
Teko::StaticLU2x2Strategy::getHatInvA00
virtual const Teko::LinearOp getHatInvA00(const Teko::BlockedLinearOp &, BlockPreconditionerState &) const
Definition
Teko_LU2x2Strategy.hpp:166
Teko::StaticLU2x2Strategy::tildeInvA00_
const Teko::LinearOp tildeInvA00_
Definition
Teko_LU2x2Strategy.hpp:187
Teko::StaticLU2x2Strategy::StaticLU2x2Strategy
StaticLU2x2Strategy(const Teko::LinearOp &hInvA00, const Teko::LinearOp &tInvA00, const Teko::LinearOp &invS)
Constructor that takes the static and objects.
Definition
Teko_LU2x2Strategy.hpp:156
Teko::StaticLU2x2Strategy::getTildeInvA00
virtual const Teko::LinearOp getTildeInvA00(const Teko::BlockedLinearOp &, BlockPreconditionerState &) const
Definition
Teko_LU2x2Strategy.hpp:172
Teko::StaticLU2x2Strategy::invS_
const Teko::LinearOp invS_
Definition
Teko_LU2x2Strategy.hpp:188
Generated by
1.17.0