Xpetra
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
Xpetra_MatrixView.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Xpetra: A linear algebra interface package
4
//
5
// Copyright 2012 NTESS and the Xpetra contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
// WARNING: This code is experimental. Backwards compatibility should not be expected.
11
12
#ifndef XPETRA_MATRIXVIEW_HPP
13
#define XPETRA_MATRIXVIEW_HPP
14
15
#include <Teuchos_Describable.hpp>
16
#include <Tpetra_KokkosCompat_DefaultNode.hpp>
17
18
#include "
Xpetra_ConfigDefs.hpp
"
19
#include "Xpetra_Map.hpp"
20
25
namespace
Xpetra
{
26
27
template
<
class
Scalar,
28
class
LocalOrdinal,
29
class
GlobalOrdinal,
30
class
Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
31
class
MatrixView
{
// TODO : virtual public Teuchos::Describable {
32
typedef
Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>
Map
;
33
34
public
:
36
37
39
MatrixView
(
const
RCP<const Map>
&rowMap,
const
RCP<const Map>
&colMap)
40
:
rowMap_
(rowMap)
41
,
colMap_
(colMap)
42
,
maxEigValueEstimate_
(-
Teuchos
::
ScalarTraits
<Scalar>::one()) {}
43
45
virtual
~MatrixView
() {}
46
48
50
51
52
const
RCP<const Map>
&
GetRowMap
()
const
{
return
rowMap_
; }
53
55
const
RCP<const Map>
&
GetColMap
()
const
{
return
colMap_
; }
56
58
void
SetRowMap
(
const
RCP<const Map>
&rowMap) {
rowMap_
= rowMap; }
59
61
void
SetColMap
(
const
RCP<const Map>
&colMap) {
colMap_
= colMap; }
63
65
void
SetMaxEigenvalueEstimate
(Scalar
const
&sigma) {
maxEigValueEstimate_
= sigma; }
66
68
Scalar
GetMaxEigenvalueEstimate
()
const
{
return
maxEigValueEstimate_
; }
69
70
private
:
71
RCP<const Map>
rowMap_
;
72
RCP<const Map>
colMap_
;
73
74
Scalar
maxEigValueEstimate_
;
75
76
};
// class MatrixView
77
78
}
// namespace Xpetra
79
80
#define XPETRA_MATRIXVIEW_SHORT
81
#endif
// XPETRA_MATRIX_VIEW_DECL_HPP
Xpetra_ConfigDefs.hpp
Teuchos::RCP
Xpetra::Map
Definition
Xpetra_Map_decl.hpp:35
Xpetra::MatrixView::SetColMap
void SetColMap(const RCP< const Map > &colMap)
Set the Map that describes the column distribution in this matrix.
Definition
Xpetra_MatrixView.hpp:61
Xpetra::MatrixView< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Map
Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > Map
Definition
Xpetra_MatrixView.hpp:32
Xpetra::MatrixView< Scalar, LocalOrdinal, GlobalOrdinal, Node >::maxEigValueEstimate_
Scalar maxEigValueEstimate_
Definition
Xpetra_MatrixView.hpp:74
Xpetra::MatrixView::GetColMap
const RCP< const Map > & GetColMap() const
Returns the Map that describes the column distribution in this matrix.
Definition
Xpetra_MatrixView.hpp:55
Xpetra::MatrixView::SetMaxEigenvalueEstimate
void SetMaxEigenvalueEstimate(Scalar const &sigma)
Set an maximum eigenvalue estimate for this matrix.
Definition
Xpetra_MatrixView.hpp:65
Xpetra::MatrixView< Scalar, LocalOrdinal, GlobalOrdinal, Node >::colMap_
RCP< const Map > colMap_
Definition
Xpetra_MatrixView.hpp:72
Xpetra::MatrixView::MatrixView
MatrixView(const RCP< const Map > &rowMap, const RCP< const Map > &colMap)
Constructor.
Definition
Xpetra_MatrixView.hpp:39
Xpetra::MatrixView::GetMaxEigenvalueEstimate
Scalar GetMaxEigenvalueEstimate() const
Return the maximum eigenvalue estimate for this matrix.
Definition
Xpetra_MatrixView.hpp:68
Xpetra::MatrixView::~MatrixView
virtual ~MatrixView()
Destructor.
Definition
Xpetra_MatrixView.hpp:45
Xpetra::MatrixView::GetRowMap
const RCP< const Map > & GetRowMap() const
Returns the Map that describes the row distribution in this matrix.
Definition
Xpetra_MatrixView.hpp:52
Xpetra::MatrixView< Scalar, LocalOrdinal, GlobalOrdinal, Node >::rowMap_
RCP< const Map > rowMap_
Definition
Xpetra_MatrixView.hpp:71
Xpetra::MatrixView::SetRowMap
void SetRowMap(const RCP< const Map > &rowMap)
Returns the Map that describes the row distribution in this matrix.
Definition
Xpetra_MatrixView.hpp:58
Teuchos
Xpetra
Xpetra namespace
Definition
Xpetra_BlockedCrsMatrix_decl.hpp:52
Teuchos::ScalarTraits
src
Matrix
Xpetra_MatrixView.hpp
Generated by
1.17.0