Epetra Package Browser (Single Doxygen Collection)
Development
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Epetra_RowMatrixTransposer.h
Go to the documentation of this file.
1
/*
2
//@HEADER
3
// ************************************************************************
4
//
5
// Epetra: Linear Algebra Services Package
6
// Copyright 2011 Sandia Corporation
7
//
8
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9
// the U.S. Government retains certain rights in this software.
10
//
11
// Redistribution and use in source and binary forms, with or without
12
// modification, are permitted provided that the following conditions are
13
// met:
14
//
15
// 1. Redistributions of source code must retain the above copyright
16
// notice, this list of conditions and the following disclaimer.
17
//
18
// 2. Redistributions in binary form must reproduce the above copyright
19
// notice, this list of conditions and the following disclaimer in the
20
// documentation and/or other materials provided with the distribution.
21
//
22
// 3. Neither the name of the Corporation nor the names of the
23
// contributors may be used to endorse or promote products derived from
24
// this software without specific prior written permission.
25
//
26
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
//
38
// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39
//
40
// ************************************************************************
41
//@HEADER
42
*/
43
44
#ifndef EPETRA_ROWMATRIXTRANSPOSER_H
45
#define EPETRA_ROWMATRIXTRANSPOSER_H
46
#include <
Epetra_Object.h
>
47
class
Epetra_RowMatrix
;
48
class
Epetra_CrsMatrix
;
49
class
Epetra_Map
;
50
class
Epetra_Export
;
51
53
57
58
class
EPETRA_LIB_DLL_EXPORT
Epetra_RowMatrixTransposer
{
59
60
public
:
61
63
64
72
Epetra_RowMatrixTransposer
(
Epetra_RowMatrix
* OrigMatrix);
73
75
76
Epetra_RowMatrixTransposer
(
const
Epetra_RowMatrixTransposer
& Source);
77
79
80
virtual
~Epetra_RowMatrixTransposer
();
82
84
85
87
100
int
CreateTranspose
(
const
bool
MakeDataContiguous,
101
Epetra_CrsMatrix
*& TransposeMatrix,
102
Epetra_Map
*
TransposeRowMap
= 0);
103
104
106
117
int
UpdateTransposeValues
(
Epetra_RowMatrix
* MatrixWithNewValues);
119
121
122
123
int
UpdateOriginalMatrixValues
();
125
127
128
130
134
const
Epetra_Map
&
TransposeRowMap
()
const
{
return
(*
TransposeRowMap_
);};
136
140
const
Epetra_Export
&
TransposeExporter
()
const
{
return
(*
TransposeExporter_
);};
142
143
private
:
144
void
DeleteData();
145
Epetra_RowMatrixTransposer
& operator=(
const
Epetra_RowMatrixTransposer
& src);
146
147
Epetra_RowMatrix
*
OrigMatrix_
;
148
Epetra_CrsMatrix
*
TransposeMatrix_
;
149
Epetra_Export
*
TransposeExporter_
;
150
Epetra_Map
*
TransposeRowMap_
;
151
bool
TransposeCreated_
;
152
bool
MakeDataContiguous_
;
153
int
NumMyRows_
;
154
int
NumMyCols_
;
155
int
MaxNumEntries_
;
156
int
*
Indices_
;
157
double
*
Values_
;
158
int
*
TransNumNz_
;
159
int
**
TransIndices_
;
// FIXME long long
160
double
**
TransValues_
;
161
int
*
TransMyGlobalEquations_
;
162
bool
OrigMatrixIsCrsMatrix_
;
163
164
};
165
166
#endif
/* EPETRA_ROWMATRIXTRANSPOSER_H */
Epetra_Object.h
Epetra_CrsMatrix
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
Definition
Epetra_CrsMatrix.h:173
Epetra_Export
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements.
Definition
Epetra_Export.h:62
Epetra_Map
Epetra_Map: A class for partitioning vectors and matrices.
Definition
Epetra_Map.h:119
Epetra_RowMatrixTransposer
Epetra_RowMatrixTransposer: A class for transposing an Epetra_RowMatrix object.
Definition
Epetra_RowMatrixTransposer.h:58
Epetra_RowMatrixTransposer::UpdateOriginalMatrixValues
int UpdateOriginalMatrixValues()
Update values of original matrix (Not implemented and not sure if we will implement this).
Epetra_RowMatrixTransposer::TransValues_
double ** TransValues_
Definition
Epetra_RowMatrixTransposer.h:160
Epetra_RowMatrixTransposer::UpdateTransposeValues
int UpdateTransposeValues(Epetra_RowMatrix *MatrixWithNewValues)
Update the values of an already-redistributed problem.
Definition
Epetra_RowMatrixTransposer.cpp:279
Epetra_RowMatrixTransposer::MaxNumEntries_
int MaxNumEntries_
Definition
Epetra_RowMatrixTransposer.h:155
Epetra_RowMatrixTransposer::OrigMatrixIsCrsMatrix_
bool OrigMatrixIsCrsMatrix_
Definition
Epetra_RowMatrixTransposer.h:162
Epetra_RowMatrixTransposer::TransNumNz_
int * TransNumNz_
Definition
Epetra_RowMatrixTransposer.h:158
Epetra_RowMatrixTransposer::MakeDataContiguous_
bool MakeDataContiguous_
Definition
Epetra_RowMatrixTransposer.h:152
Epetra_RowMatrixTransposer::TransposeRowMap
const Epetra_Map & TransposeRowMap() const
Returns const reference to the Epetra_Map object describing the row distribution of the transpose mat...
Definition
Epetra_RowMatrixTransposer.h:134
Epetra_RowMatrixTransposer::Indices_
int * Indices_
Definition
Epetra_RowMatrixTransposer.h:156
Epetra_RowMatrixTransposer::TransposeExporter_
Epetra_Export * TransposeExporter_
Definition
Epetra_RowMatrixTransposer.h:149
Epetra_RowMatrixTransposer::CreateTranspose
int CreateTranspose(const bool MakeDataContiguous, Epetra_CrsMatrix *&TransposeMatrix, Epetra_Map *TransposeRowMap=0)
Generate a new Epetra_CrsMatrix as the transpose of an Epetra_RowMatrix passed into the constructor.
Definition
Epetra_RowMatrixTransposer.cpp:133
Epetra_RowMatrixTransposer::TransIndices_
int ** TransIndices_
Definition
Epetra_RowMatrixTransposer.h:159
Epetra_RowMatrixTransposer::OrigMatrix_
Epetra_RowMatrix * OrigMatrix_
Definition
Epetra_RowMatrixTransposer.h:147
Epetra_RowMatrixTransposer::TransposeMatrix_
Epetra_CrsMatrix * TransposeMatrix_
Definition
Epetra_RowMatrixTransposer.h:148
Epetra_RowMatrixTransposer::Epetra_RowMatrixTransposer
Epetra_RowMatrixTransposer(Epetra_RowMatrix *OrigMatrix)
Primary Epetra_RowMatrixTransposer constructor.
Definition
Epetra_RowMatrixTransposer.cpp:55
Epetra_RowMatrixTransposer::TransposeRowMap_
Epetra_Map * TransposeRowMap_
Definition
Epetra_RowMatrixTransposer.h:150
Epetra_RowMatrixTransposer::TransMyGlobalEquations_
int * TransMyGlobalEquations_
Definition
Epetra_RowMatrixTransposer.h:161
Epetra_RowMatrixTransposer::TransposeCreated_
bool TransposeCreated_
Definition
Epetra_RowMatrixTransposer.h:151
Epetra_RowMatrixTransposer::NumMyCols_
int NumMyCols_
Definition
Epetra_RowMatrixTransposer.h:154
Epetra_RowMatrixTransposer::Values_
double * Values_
Definition
Epetra_RowMatrixTransposer.h:157
Epetra_RowMatrixTransposer::NumMyRows_
int NumMyRows_
Definition
Epetra_RowMatrixTransposer.h:153
Epetra_RowMatrixTransposer::TransposeExporter
const Epetra_Export & TransposeExporter() const
Returns const reference to the Epetra_Export object used to redistribute the original matrix.
Definition
Epetra_RowMatrixTransposer.h:140
Epetra_RowMatrix
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices.
Definition
Epetra_RowMatrix.h:68
Generated by
1.17.0