Teko
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Teko_BlockLowerTriInverseOp.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_BlockLowerTriInverseOp_hpp__
11
#define __Teko_BlockLowerTriInverseOp_hpp__
12
13
#include "
Teko_Utilities.hpp
"
14
#include "Teko_BlockImplicitLinearOp.hpp"
15
16
namespace
Teko {
17
26
class
BlockLowerTriInverseOp
:
public
BlockImplicitLinearOp
{
27
public
:
28
using
BlockImplicitLinearOp::implicitApply
;
29
39
BlockLowerTriInverseOp
(BlockedLinearOp &L,
const
std::vector<LinearOp> &invDiag);
40
42
43
45
virtual
VectorSpace
range
()
const
{
return
productRange_
; }
46
48
virtual
VectorSpace
domain
()
const
{
return
productDomain_
; }
49
62
virtual
void
implicitApply
(
const
BlockedMultiVector &x, BlockedMultiVector &y,
63
const
double
alpha = 1.0,
const
double
beta = 0.0)
const
;
65
66
virtual
void
describe(Teuchos::FancyOStream &out_arg,
67
const
Teuchos::EVerbosityLevel verbLevel)
const
;
68
69
protected
:
70
// fundamental operators to use
71
const
BlockedLinearOp
L_
;
72
std::vector<LinearOp>
invDiag_
;
73
74
Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> >
75
productRange_
;
76
Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> >
77
productDomain_
;
78
79
// scratch space...so we don't have to reallocate
80
mutable
BlockedMultiVector srcScrap_;
81
mutable
BlockedMultiVector dstScrap_;
82
mutable
bool
allocated =
false
;
83
84
private
:
85
// hide me!
86
BlockLowerTriInverseOp
();
87
BlockLowerTriInverseOp
(
const
BlockLowerTriInverseOp
&);
88
};
89
90
inline
LinearOp createBlockLowerTriInverseOp(BlockedLinearOp &U,
91
const
std::vector<LinearOp> &invDiag) {
92
return
Teuchos::rcp(
new
BlockLowerTriInverseOp
(U, invDiag));
93
}
94
95
inline
LinearOp createBlockLowerTriInverseOp(BlockedLinearOp &L,
96
const
std::vector<LinearOp> &invDiag,
97
const
std::string &str) {
98
Teuchos::RCP<Thyra::LinearOpBase<double> > result =
99
Teuchos::rcp(
new
BlockLowerTriInverseOp(L, invDiag));
100
result->setObjectLabel(str);
101
102
return
result;
103
}
104
105
}
// end namespace Teko
106
107
#endif
Teko_Utilities.hpp
Teko::BlockImplicitLinearOp
A virtual class that simplifies the construction of custom operators.
Definition
Teko_BlockImplicitLinearOp.hpp:24
Teko::BlockImplicitLinearOp::implicitApply
virtual void implicitApply(const BlockedMultiVector &x, BlockedMultiVector &y, const double alpha=1.0, const double beta=0.0) const =0
Perform a matrix vector multiply with this implicitly defined blocked operator.
Teko::BlockLowerTriInverseOp
This linear operator computes the inverse of a lower triangular matrix.
Definition
Teko_BlockLowerTriInverseOp.hpp:26
Teko::BlockLowerTriInverseOp::range
virtual VectorSpace range() const
Range space of this operator.
Definition
Teko_BlockLowerTriInverseOp.hpp:45
Teko::BlockLowerTriInverseOp::domain
virtual VectorSpace domain() const
Domain space of this operator.
Definition
Teko_BlockLowerTriInverseOp.hpp:48
Teko::BlockLowerTriInverseOp::implicitApply
virtual void implicitApply(const BlockedMultiVector &x, BlockedMultiVector &y, const double alpha=1.0, const double beta=0.0) const
Perform a matrix vector multiply with this operator.
Definition
Teko_BlockLowerTriInverseOp.cpp:49
Teko::BlockLowerTriInverseOp::productRange_
Teuchos::RCP< const Thyra::ProductVectorSpaceBase< double > > productRange_
Range vector space.
Definition
Teko_BlockLowerTriInverseOp.hpp:75
Teko::BlockLowerTriInverseOp::L_
const BlockedLinearOp L_
operator
Definition
Teko_BlockLowerTriInverseOp.hpp:71
Teko::BlockLowerTriInverseOp::BlockLowerTriInverseOp
BlockLowerTriInverseOp(BlockedLinearOp &L, const std::vector< LinearOp > &invDiag)
This constructor explicitly takes a lower triangular matrix and inverse diagonal operators and builds...
Definition
Teko_BlockLowerTriInverseOp.cpp:18
Teko::BlockLowerTriInverseOp::invDiag_
std::vector< LinearOp > invDiag_
(Approximate) Inverses of the diagonal operators
Definition
Teko_BlockLowerTriInverseOp.hpp:72
Teko::BlockLowerTriInverseOp::productDomain_
Teuchos::RCP< const Thyra::ProductVectorSpaceBase< double > > productDomain_
Domain vector space.
Definition
Teko_BlockLowerTriInverseOp.hpp:77
Generated by
1.17.0