Belos
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
BelosOperatorTraits.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Belos: Block Linear Solvers Package
4
//
5
// Copyright 2004-2016 NTESS and the Belos contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef BELOS_OPERATOR_TRAITS_HPP
11
#define BELOS_OPERATOR_TRAITS_HPP
12
16
#include "
BelosConfigDefs.hpp
"
17
#include "
BelosTypes.hpp
"
18
19
namespace
Belos
{
20
28
template
<
class
ScalarType,
class
MV,
class
OP>
29
class
UndefinedOperatorTraits
30
{
31
public
:
38
static
inline
void
notDefined
() {
39
OP::this_type_is_missing_a_specialization();
40
};
41
};
42
76
template
<
class
ScalarType,
class
MV,
class
OP>
77
class
OperatorTraits
78
{
79
public
:
80
90
static
void
91
Apply
(
const
OP& Op,
92
const
MV& x,
93
MV& y,
94
ETrans
trans =
NOTRANS
)
95
{
96
// This will result in a deliberate compile-time error, if a
97
// specialization of OperatorTraits has not been defined for the
98
// MV and OP types.
99
UndefinedOperatorTraits<ScalarType, MV, OP>::notDefined
();
100
};
101
119
static
bool
HasApplyTranspose
(
const
OP& Op) {
120
return
false
;
121
}
122
};
123
124
}
// end Belos namespace
125
126
#endif
// BELOS_OPERATOR_TRAITS_HPP
127
128
// end of file BelosOperatorTraits.hpp
BelosConfigDefs.hpp
Belos header file which uses auto-configuration information to include necessary C++ headers.
BelosTypes.hpp
Collection of types and exceptions used within the Belos solvers.
Belos::OperatorTraits
Class which defines basic traits for the operator type.
Definition
BelosOperatorTraits.hpp:78
Belos::OperatorTraits::HasApplyTranspose
static bool HasApplyTranspose(const OP &Op)
Whether this operator implements applying the transpose.
Definition
BelosOperatorTraits.hpp:119
Belos::OperatorTraits::Apply
static void Apply(const OP &Op, const MV &x, MV &y, ETrans trans=NOTRANS)
Apply Op to x, putting the result into y.
Definition
BelosOperatorTraits.hpp:91
Belos::UndefinedOperatorTraits
Class used to require specialization of OperatorTraits.
Definition
BelosOperatorTraits.hpp:30
Belos::UndefinedOperatorTraits::notDefined
static void notDefined()
Function that will not compile if instantiation is attempted.
Definition
BelosOperatorTraits.hpp:38
Belos
Definition
Belos_Details_EBelosSolverType.cpp:13
Belos::ETrans
ETrans
Whether to apply the (conjugate) transpose of an operator.
Definition
BelosTypes.hpp:49
Belos::NOTRANS
@ NOTRANS
Definition
BelosTypes.hpp:49
Generated for Belos by
1.17.0