10#ifndef BELOS_TYPES_HPP
11#define BELOS_TYPES_HPP
19#include "Teuchos_Assert.hpp"
20#ifdef HAVE_BELOS_DENSEMATRIXKOKKOSDEFAULT
21#include "Kokkos_DualView.hpp"
22#include "KokkosKernels_ArithTraits.hpp"
24#include "Teuchos_SerialDenseMatrix.hpp"
27#ifdef HAVE_BELOS_TPETRA
28#include "Tpetra_MultiVector.hpp"
40 BelosError (
const std::string& what_arg) : std::logic_error(what_arg) {}
147 inline constexpr bool compare(
int lhs_int,
int rhs_int) {
149 return (rhs_int >= 1);
151 else if (rhs_int == 1) {
152 return (lhs_int >= 1);
155 return (lhs_int == rhs_int);
160 int lhs_int =
static_cast<int>(lhs);
161 int rhs_int =
static_cast<int>(rhs);
162 return compare(lhs_int, rhs_int);
166 int lhs_int =
static_cast<int>(lhs);
167 return compare(lhs_int, rhs_int);
171 int rhs_int =
static_cast<int>(rhs);
172 return compare(lhs_int, rhs_int);
176 int lhs_int =
static_cast<int>(lhs);
177 int rhs_int =
static_cast<int>(rhs);
178 return !
compare(lhs_int, rhs_int);
182 int lhs_int =
static_cast<int>(lhs);
183 return !
compare(lhs_int, rhs_int);
187 int rhs_int =
static_cast<int>(rhs);
188 return !
compare(lhs_int, rhs_int);
344#ifdef HAVE_BELOS_DENSEMATRIXKOKKOSDEFAULT
346#ifdef HAVE_BELOS_TPETRA
348 template <
class Ordinal,
class Scalar>
349 using DefaultDenseMatrix = typename ::Tpetra::MultiVector<Scalar>::wrapped_dual_view_type::DVT;
353 template <
class Ordinal,
class Scalar>
354 using DefaultDenseMatrix = Kokkos::DualView<typename KokkosKernels::ArithTraits<Scalar>::val_type **, Kokkos::LayoutLeft>;
362 template <
class Ordinal,
class Scalar>
Belos header file which uses auto-configuration information to include necessary C++ headers.
BelosError(const std::string &what_arg)
std::string convertMsgTypeToString(const MsgType msgType)
Show MsgType as a comma-delimited list of names.
ScaleType convertStringToScaleType(const std::string &scaleType)
Convert the given string to its ScaleType enum value.
NormType
The type of vector norm to compute.
MsgType
Available message types recognized by the linear solvers.
ReturnType
Whether the Belos solve converged for all linear systems.
StatusType
Whether the StatusTest wants iteration to stop.
constexpr bool operator==(ReturnType lhs, ReturnType rhs)
NormType convertStringToNormType(const std::string &normType)
Convert the given string to its NormType enum value.
std::string convertScaleTypeToString(const ScaleType scaleType)
Convert the given ScaleType enum value to its corresponding string.
@ TeuchosSerialDenseMatrix
constexpr bool compare(int lhs_int, int rhs_int)
constexpr const DenseMatrixType defaultDenseMatrixType
OutputType
Style of output used to display status test information.
ConjType
Whether or not to conjugate the transpose for block inner products.
std::string convertStatusTypeToString(const StatusType status)
The string name corresponding to the given StatusType enum value.
ScaleType
The type of scaling to use on the residual norm value.
@ NormOfFullScaledPrecInitRes
@ NormOfFullScaledInitRes
ETrans
Whether to apply the (conjugate) transpose of an operator.
ResetType
How to reset the solver.
std::string convertReturnTypeToString(const ReturnType result)
Convert the given ReturnType enum value to its corresponding string.
StatusType convertStringToStatusType(const std::string &status)
The StatusType enum value corresponding to the given string name.
Teuchos::SerialDenseMatrix< Ordinal, Scalar > DefaultDenseMatrix
constexpr bool operator!=(ReturnType lhs, ReturnType rhs)
Default parameters common to most Belos solvers.
static const double resScaleFactor
User-defined residual scaling factor.
static const double impTolScale
"Implicit Tolerance Scale Factor"
static const double convTol
Default convergence tolerance.
static const double orthoKappa
DGKS orthogonalization constant.
static const double polyTol
Relative residual tolerance for matrix polynomial construction.