Belos
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
BelosStubTsqrAdapter.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_StubTsqrAdapter_hpp
11
#define __Belos_StubTsqrAdapter_hpp
12
13
#include <
BelosConfigDefs.hpp
>
14
#include <Teuchos_ParameterListAcceptorDefaultBase.hpp>
15
#include <Teuchos_ScalarTraits.hpp>
16
#include <Teuchos_SerialDenseMatrix.hpp>
17
#include <Teuchos_TypeNameTraits.hpp>
18
#include <stdexcept>
19
22
23
namespace
Belos
{
24
namespace
details
{
25
51
template
<
class
MultiVectorType>
52
class
StubTsqrAdapter
:
public
Teuchos::ParameterListAcceptorDefaultBase {
53
public
:
54
typedef
MultiVectorType
MV
;
55
typedef
double
scalar_type
;
// This doesn't really matter
56
typedef
int
ordinal_type
;
// This doesn't matter either
57
typedef
int
node_type
;
// Nor does this
58
typedef
Teuchos::SerialDenseMatrix<ordinal_type, scalar_type>
dense_matrix_type
;
59
typedef
typename
Teuchos::ScalarTraits<scalar_type>::magnitudeType
magnitude_type
;
60
67
StubTsqrAdapter
(
const
Teuchos::RCP<Teuchos::ParameterList>& plist)
68
{
69
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
70
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
71
<<
" is not yet implemented."
);
72
}
73
75
StubTsqrAdapter
()
76
{
77
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
78
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
79
<<
" is not yet implemented."
);
80
}
81
83
StubTsqrAdapter
(
const
StubTsqrAdapter
& rhs)
84
{
85
(void) rhs;
86
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
87
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
88
<<
" is not yet implemented."
);
89
}
90
92
Teuchos::RCP<const Teuchos::ParameterList>
93
getValidParameters
()
const
94
{
95
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
96
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
97
<<
" is not yet implemented."
);
98
}
99
101
void
102
setParameterList
(
const
Teuchos::RCP<Teuchos::ParameterList>& plist)
103
{
104
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
105
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
106
<<
" is not yet implemented."
);
107
}
108
110
void
111
factorExplicit
(
MV
& A,
112
MV
& Q,
113
dense_matrix_type
& R,
114
const
bool
forceNonnegativeDiagonal=
false
)
115
{
116
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
117
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
118
<<
" is not yet implemented."
);
119
}
120
122
int
123
revealRank
(
MV
& Q,
124
dense_matrix_type
& R,
125
const
magnitude_type
& tol)
126
{
127
// mfh 07 Sep 2012: In order to prevent compiler warnings on
128
// some platforms, we simply return some value. This code can
129
// never execute anyway, since it is in an instance method and
130
// all of the constructors throw exceptions. (We've overridden
131
// the default and copy constructors to throw exceptions.)
132
return
0;
133
}
134
};
135
136
}
// namespace details
137
}
// namespace Belos
138
139
#endif
// __Belos_StubTsqrAdapter_hpp
140
BelosConfigDefs.hpp
Belos header file which uses auto-configuration information to include necessary C++ headers.
Belos::details::StubTsqrAdapter::scalar_type
double scalar_type
Definition
BelosStubTsqrAdapter.hpp:55
Belos::details::StubTsqrAdapter::dense_matrix_type
Teuchos::SerialDenseMatrix< ordinal_type, scalar_type > dense_matrix_type
Definition
BelosStubTsqrAdapter.hpp:58
Belos::details::StubTsqrAdapter::revealRank
int revealRank(MV &Q, dense_matrix_type &R, const magnitude_type &tol)
Rank-revealing decomposition (stub; does nothing).
Definition
BelosStubTsqrAdapter.hpp:123
Belos::details::StubTsqrAdapter::MV
MultiVectorType MV
Definition
BelosStubTsqrAdapter.hpp:54
Belos::details::StubTsqrAdapter::ordinal_type
int ordinal_type
Definition
BelosStubTsqrAdapter.hpp:56
Belos::details::StubTsqrAdapter::StubTsqrAdapter
StubTsqrAdapter(const StubTsqrAdapter &rhs)
Copy constructor (throws std::logic_error).
Definition
BelosStubTsqrAdapter.hpp:83
Belos::details::StubTsqrAdapter::StubTsqrAdapter
StubTsqrAdapter()
Default constructor (stub; throws std::logic_error).
Definition
BelosStubTsqrAdapter.hpp:75
Belos::details::StubTsqrAdapter::factorExplicit
void factorExplicit(MV &A, MV &Q, dense_matrix_type &R, const bool forceNonnegativeDiagonal=false)
Compute QR factorization [Q,R] = qr(A,0) (stub; throws std::logic_error).
Definition
BelosStubTsqrAdapter.hpp:111
Belos::details::StubTsqrAdapter::StubTsqrAdapter
StubTsqrAdapter(const Teuchos::RCP< Teuchos::ParameterList > &plist)
Constructor (that accepts a parameter list).
Definition
BelosStubTsqrAdapter.hpp:67
Belos::details::StubTsqrAdapter::magnitude_type
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
Definition
BelosStubTsqrAdapter.hpp:59
Belos::details::StubTsqrAdapter::getValidParameters
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Get list of valid default parameters (stub; throws std::logic_error).
Definition
BelosStubTsqrAdapter.hpp:93
Belos::details::StubTsqrAdapter::node_type
int node_type
Definition
BelosStubTsqrAdapter.hpp:57
Belos::details::StubTsqrAdapter::setParameterList
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &plist)
Set parameters (stub; throws std::logic_error).
Definition
BelosStubTsqrAdapter.hpp:102
Belos::details
Definition
BelosMultiVec.hpp:265
Belos
Definition
Belos_Details_EBelosSolverType.cpp:13
Generated for Belos by
1.17.0