Belos Package Browser (Single Doxygen Collection)
Development
Toggle main menu visibility
Loading...
Searching...
No Matches
src
BelosStubTsqrAdapter.hpp
Go to the documentation of this file.
1
// @HEADER
2
// ***********************************************************************
3
//
4
// Belos: Block Linear Solvers Package
5
// Copyright (2010) Sandia Corporation
6
//
7
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8
// license for use of this work by or on behalf of the U.S. Government.
9
//
10
// This library is free software; you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as
12
// published by the Free Software Foundation; either version 2.1 of the
13
// License, or (at your option) any later version.
14
//
15
// This library is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
// Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public
21
// License along with this library; if not, write to the Free Software
22
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23
// USA
24
// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25
//
26
// ***********************************************************************
27
// @HEADER
28
29
#ifndef __Belos_StubTsqrAdapter_hpp
30
#define __Belos_StubTsqrAdapter_hpp
31
32
#include <
BelosConfigDefs.hpp
>
33
#include <Teuchos_ParameterListAcceptorDefaultBase.hpp>
34
#include <Teuchos_ScalarTraits.hpp>
35
#include <Teuchos_SerialDenseMatrix.hpp>
36
#include <Teuchos_TypeNameTraits.hpp>
37
#include <stdexcept>
38
41
42
namespace
Belos
{
43
namespace
details
{
44
70
template
<
class
MultiVectorType>
71
class
StubTsqrAdapter
:
public
Teuchos::ParameterListAcceptorDefaultBase {
72
public
:
73
typedef
MultiVectorType
MV
;
74
typedef
double
scalar_type
;
// This doesn't really matter
75
typedef
int
ordinal_type
;
// This doesn't matter either
76
typedef
int
node_type
;
// Nor does this
77
typedef
Teuchos::SerialDenseMatrix<ordinal_type, scalar_type>
dense_matrix_type
;
78
typedef
typename
Teuchos::ScalarTraits<scalar_type>::magnitudeType
magnitude_type
;
79
86
StubTsqrAdapter
(
const
Teuchos::RCP<Teuchos::ParameterList>& plist)
87
{
88
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
89
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
90
<<
" is not yet implemented."
);
91
}
92
94
StubTsqrAdapter
()
95
{
96
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
97
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
98
<<
" is not yet implemented."
);
99
}
100
102
StubTsqrAdapter
(
const
StubTsqrAdapter
& rhs)
103
{
104
(void) rhs;
105
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
106
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
107
<<
" is not yet implemented."
);
108
}
109
111
Teuchos::RCP<const Teuchos::ParameterList>
112
getValidParameters
()
const
113
{
114
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
115
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
116
<<
" is not yet implemented."
);
117
}
118
120
void
121
setParameterList
(
const
Teuchos::RCP<Teuchos::ParameterList>& plist)
122
{
123
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
124
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
125
<<
" is not yet implemented."
);
126
}
127
129
void
130
factorExplicit
(
MV
& A,
131
MV
& Q,
132
dense_matrix_type
& R,
133
const
bool
forceNonnegativeDiagonal=
false
)
134
{
135
TEUCHOS_TEST_FOR_EXCEPTION(
true
, std::logic_error,
"TSQR adapter for "
136
"multivector type \""
<< Teuchos::TypeNameTraits<MV>::name()
137
<<
" is not yet implemented."
);
138
}
139
141
int
142
revealRank
(
MV
& Q,
143
dense_matrix_type
& R,
144
const
magnitude_type
& tol)
145
{
146
// mfh 07 Sep 2012: In order to prevent compiler warnings on
147
// some platforms, we simply return some value. This code can
148
// never execute anyway, since it is in an instance method and
149
// all of the constructors throw exceptions. (We've overridden
150
// the default and copy constructors to throw exceptions.)
151
return
0;
152
}
153
};
154
155
}
// namespace details
156
}
// namespace Belos
157
158
#endif
// __Belos_StubTsqrAdapter_hpp
159
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:74
Belos::details::StubTsqrAdapter::dense_matrix_type
Teuchos::SerialDenseMatrix< ordinal_type, scalar_type > dense_matrix_type
Definition
BelosStubTsqrAdapter.hpp:77
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:142
Belos::details::StubTsqrAdapter::MV
MultiVectorType MV
Definition
BelosStubTsqrAdapter.hpp:73
Belos::details::StubTsqrAdapter::ordinal_type
int ordinal_type
Definition
BelosStubTsqrAdapter.hpp:75
Belos::details::StubTsqrAdapter::StubTsqrAdapter
StubTsqrAdapter(const StubTsqrAdapter &rhs)
Copy constructor (throws std::logic_error).
Definition
BelosStubTsqrAdapter.hpp:102
Belos::details::StubTsqrAdapter::StubTsqrAdapter
StubTsqrAdapter()
Default constructor (stub; throws std::logic_error).
Definition
BelosStubTsqrAdapter.hpp:94
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:130
Belos::details::StubTsqrAdapter::StubTsqrAdapter
StubTsqrAdapter(const Teuchos::RCP< Teuchos::ParameterList > &plist)
Constructor (that accepts a parameter list).
Definition
BelosStubTsqrAdapter.hpp:86
Belos::details::StubTsqrAdapter::magnitude_type
Teuchos::ScalarTraits< scalar_type >::magnitudeType magnitude_type
Definition
BelosStubTsqrAdapter.hpp:78
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:112
Belos::details::StubTsqrAdapter::node_type
int node_type
Definition
BelosStubTsqrAdapter.hpp:76
Belos::details::StubTsqrAdapter::setParameterList
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &plist)
Set parameters (stub; throws std::logic_error).
Definition
BelosStubTsqrAdapter.hpp:121
Belos::details
Definition
BelosMultiVec.hpp:297
Belos
Definition
Belos_Details_EBelosSolverType.cpp:45
Generated by
1.17.0