Epetra Package Browser (Single Doxygen Collection)  Development
Epetra_LinearProblemRedistor.cpp
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 #include "Epetra_Comm.h"
44 #include "Epetra_Map.h"
46 #include "Epetra_CrsMatrix.h"
47 #include "Epetra_LinearProblem.h"
49 #include "Epetra_Util.h"
50 #include "Epetra_MultiVector.h"
51 #include "Epetra_IntVector.h"
52 #include "Epetra_Export.h"
53 #include "Epetra_Import.h"
54 //=============================================================================
56  const Epetra_Map & RedistMap)
57  : OrigProblem_(OrigProblem),
58  NumProc_(0),
59  RedistProblem_(0),
60  RedistMap_((Epetra_Map *) &RedistMap),
61  Transposer_(0),
62  Replicate_(false),
63  ConstructTranspose_(false),
64  MakeDataContiguous_(false),
65  MapGenerated_(false),
66  RedistProblemCreated_(false),
67  ptr_(0)
68 {
69 }
70 //=============================================================================
72  int NumProc,
73  bool Replicate)
74  : OrigProblem_(OrigProblem),
75  NumProc_(NumProc),
76  RedistProblem_(0),
77  RedistMap_(0),
78  Transposer_(0),
79  Replicate_(Replicate),
80  ConstructTranspose_(false),
81  MakeDataContiguous_(false),
82  MapGenerated_(false),
83  RedistProblemCreated_(false),
84  ptr_(0)
85 {
86 }
87 //=============================================================================
89  : OrigProblem_(Source.OrigProblem_),
90  NumProc_(Source.NumProc_),
91  RedistProblem_(Source.RedistProblem_),
92  RedistMap_(Source.RedistMap_),
93  Transposer_(Source.Transposer_),
94  Replicate_(Source.Replicate_),
95  ConstructTranspose_(Source.ConstructTranspose_),
96  MakeDataContiguous_(Source.MakeDataContiguous_),
97  RedistProblemCreated_(Source.RedistProblemCreated_),
98  ptr_(0)
99 {
100 
103 }
104 //=========================================================================
106 
107  if (ptr_!=0) {delete [] ptr_; ptr_=0;}
108  if (MapGenerated_ && RedistMap_!=0) {delete RedistMap_; RedistMap_=0;}
109  if (RedistProblem_!=0) {
110  // If no tranpose, then we must delete matrix (otherwise the transposer must).
112  delete RedistProblem_->GetMatrix();
113  if (RedistProblem_->GetLHS()!=0) delete RedistProblem_->GetLHS();
114  if (RedistProblem_->GetRHS()!=0) delete RedistProblem_->GetRHS();
115  delete RedistProblem_; RedistProblem_=0;
116  }
117  if (RedistExporter_!=0) {delete RedistExporter_; RedistExporter_=0;}
118  if (Transposer_!=0) {delete Transposer_; Transposer_ = 0;}
119 
120 }
121 
122 //=========================================================================
124 
125 
126  if (MapGenerated_) return(0);
127 
128  const Epetra_Map & SourceMap = OrigProblem_->GetMatrix()->RowMatrixRowMap();
129  const Epetra_Comm & Comm = SourceMap.Comm();
130  int IndexBase = SourceMap.IndexBase();
131 
132  int NumProc = Comm.NumProc();
133 
134  if (NumProc_!=NumProc) return(-1); // Right now we are only supporting redistribution to all processors.
135 
136  // Build a list of contiguous GIDs that will be used in either case below.
137  int NumMyRedistElements = 0;
138  if ((Comm.MyPID()==0) || Replicate_) NumMyRedistElements = SourceMap.NumGlobalElements64();
139 
140  // Now build the GID list to broadcast SourceMapGIDs to all processors that need it (or just to PE 0).
141  int * ContigIDs = 0;
142  if (NumMyRedistElements>0) ContigIDs = new int[NumMyRedistElements];
143  for (int i=0; i<NumMyRedistElements; i++) ContigIDs[i] = IndexBase + i;
144 
145  // Case 1: If the map for the input matrix is not a linear contiguous map, then we have to collect
146  // the map indices in order to construct a compatible map containing all GIDs.
147  if (!SourceMap.LinearMap()) {
148 
149  // First generate a linear map of the same distribution as RowMatrixRowMap
150  Epetra_Map SourceLinearMap(-1, SourceMap.NumMyElements(), IndexBase, Comm);
151  // Generate Int vector containing GIDs of SourceMap
152  Epetra_IntVector SourceMapGIDs(View, SourceLinearMap, SourceMap.MyGlobalElements());
153  // Now Build target map for SourceMapGIDs and Importer to get IDs
154  Epetra_Map GIDsTargetMap(-1, NumMyRedistElements, ContigIDs, IndexBase, Comm);
155  if (NumMyRedistElements>0) delete [] ContigIDs;
156 
157  Epetra_Import GIDsImporter(GIDsTargetMap, SourceMap);
158  Epetra_IntVector TargetMapGIDs(GIDsTargetMap);
159 
160  // Now Send SourceMap GIDs to PE 0, and all processors if Replicate is true
161  EPETRA_CHK_ERR(TargetMapGIDs.Import(SourceMapGIDs, GIDsImporter, Insert));
162 
163  // Finally, create RedistMap containing all GIDs of SourceMap on PE 0, or all PEs of Replicate is true
164  RedistMap_ = new Epetra_Map(-1, NumMyRedistElements, TargetMapGIDs.Values(), IndexBase, Comm);// FIXME long long
165 
166  }
167  // Case 2: If the map has contiguous IDs then we can simply build the map right away using the list
168  // of contiguous GIDs directly
169  else
170  RedistMap_ = new Epetra_Map(-1, NumMyRedistElements, ContigIDs, IndexBase, Comm);// FIXME long long
171 
172  MapGenerated_ = true;
173 
174  return(0);
175 }
176 
177 //=========================================================================
178 int Epetra_LinearProblemRedistor::CreateRedistProblem(const bool ConstructTranspose,
179  const bool MakeDataContiguous,
180  Epetra_LinearProblem *& RedistProblem) {
181 
182  if (RedistProblemCreated_) EPETRA_CHK_ERR(-1); // This method can only be called once
183 
184  Epetra_RowMatrix * OrigMatrix = OrigProblem_->GetMatrix();
185  Epetra_MultiVector * OrigLHS = OrigProblem_->GetLHS();
186  Epetra_MultiVector * OrigRHS = OrigProblem_->GetRHS();
187 
188  if (OrigMatrix==0) EPETRA_CHK_ERR(-2); // There is no matrix associated with this Problem
189 
190 
191  if (RedistMap_==0) {
193  }
194 
196 
198  Epetra_CrsMatrix * RedistMatrix;
199 
200  // Check if the tranpose should be create or not
201  if (ConstructTranspose) {
202  Transposer_ = new Epetra_RowMatrixTransposer(OrigMatrix);
203  EPETRA_CHK_ERR(Transposer_->CreateTranspose(MakeDataContiguous, RedistMatrix, RedistMap_));
204  }
205  else {
206  // If not, then just do the redistribution based on the the RedistMap
207  RedistMatrix = new Epetra_CrsMatrix(Copy, *RedistMap_, 0);
208  // need to do this next step until we generalize the Import/Export ops for CrsMatrix
209  Epetra_CrsMatrix * OrigCrsMatrix = dynamic_cast<Epetra_CrsMatrix *>(OrigMatrix);
210  EPETRA_CHK_ERR(RedistMatrix->Export(*OrigCrsMatrix, *RedistExporter_, Add));
211  EPETRA_CHK_ERR(RedistMatrix->FillComplete());
212  }
213 
214  RedistProblem_->SetOperator(RedistMatrix);
215 
216  // Now redistribute the RHS and LHS if non-zero
217 
218  Epetra_MultiVector * RedistLHS = 0;
219  Epetra_MultiVector * RedistRHS = 0;
220 
221  int ierr = 0;
222 
223  if (OrigLHS!=0) {
224  RedistLHS = new Epetra_MultiVector(*RedistMap_, OrigLHS->NumVectors());
225  EPETRA_CHK_ERR(RedistLHS->Export(*OrigLHS, *RedistExporter_, Add));
226  }
227  else ierr = 1;
228 
229  if (OrigRHS!=0) {
230  RedistRHS = new Epetra_MultiVector(*RedistMap_, OrigLHS->NumVectors());
231  EPETRA_CHK_ERR(RedistRHS->Export(*OrigRHS, *RedistExporter_, Add));
232  }
233  else ierr ++;
234 
235  RedistProblem_->SetLHS(RedistLHS);
236  RedistProblem_->SetRHS(RedistRHS);
237 
238  RedistProblemCreated_ = true;
239 
240  return(ierr);
241 }
242 
243 //=========================================================================
245 
246  if (!RedistProblemCreated_) EPETRA_CHK_ERR(-1); // This method can only be called after CreateRedistProblem()
247 
248  Epetra_RowMatrix * OrigMatrix = ProblemWithNewValues->GetMatrix();
249  Epetra_MultiVector * OrigLHS = ProblemWithNewValues->GetLHS();
250  Epetra_MultiVector * OrigRHS = ProblemWithNewValues->GetRHS();
251 
252  if (OrigMatrix==0) EPETRA_CHK_ERR(-2); // There is no matrix associated with this Problem
253 
254 
255  Epetra_CrsMatrix * RedistMatrix = dynamic_cast<Epetra_CrsMatrix *>(RedistProblem_->GetMatrix());
256 
257  // Check if the tranpose should be create or not
258  if (ConstructTranspose_) {
260  }
261  else {
262  // If not, then just do the redistribution based on the the RedistMap
263 
264  EPETRA_CHK_ERR(RedistMatrix->PutScalar(0.0));
265  // need to do this next step until we generalize the Import/Export ops for CrsMatrix
266  Epetra_CrsMatrix * OrigCrsMatrix = dynamic_cast<Epetra_CrsMatrix *>(OrigMatrix);
267 
268  if (OrigCrsMatrix==0) EPETRA_CHK_ERR(-3); // Broken for a RowMatrix at this point
269  EPETRA_CHK_ERR(RedistMatrix->Export(*OrigCrsMatrix, *RedistExporter_, Add));
270  }
271 
272  // Now redistribute the RHS and LHS if non-zero
273 
274 
275  if (OrigLHS!=0) {
277  }
278 
279  if (OrigRHS!=0) {
281  }
282 
283  return(0);
284 }
285 
286 //=========================================================================
287 // NOTE: This method should be removed and replaced with calls to Epetra_Util_ExtractHbData()
288 int Epetra_LinearProblemRedistor::ExtractHbData(int & M, int & N, int & nz, int * & ptr,
289  int * & ind, double * & val, int & Nrhs,
290  double * & rhs, int & ldrhs,
291  double * & lhs, int & ldlhs) const {
292 
293  Epetra_CrsMatrix * RedistMatrix = dynamic_cast<Epetra_CrsMatrix *>(RedistProblem_->GetMatrix());
294 
295  if (RedistMatrix==0) EPETRA_CHK_ERR(-1); // This matrix is zero or not an Epetra_CrsMatrix
296  if (!RedistMatrix->IndicesAreContiguous()) { // Data must be contiguous for this to work
297  EPETRA_CHK_ERR(-2);
298  }
299 
300  M = RedistMatrix->NumMyRows();
301  N = RedistMatrix->NumMyCols();
302  nz = RedistMatrix->NumMyNonzeros();
303  val = (*RedistMatrix)[0]; // Dangerous, but cheap and effective way to access first element in
304 
305  const Epetra_CrsGraph & RedistGraph = RedistMatrix->Graph();
306  ind = RedistGraph[0]; // list of values and indices
307 
310  Nrhs = RHS->NumVectors();
311  if (Nrhs>1) {
312  if (!RHS->ConstantStride()) {EPETRA_CHK_ERR(-3)}; // Must have strided vectors
313  if (!LHS->ConstantStride()) {EPETRA_CHK_ERR(-4)}; // Must have strided vectors
314  }
315  ldrhs = RHS->Stride();
316  rhs = (*RHS)[0]; // Dangerous but effective (again)
317  ldlhs = LHS->Stride();
318  lhs = (*LHS)[0];
319 
320  // Finally build ptr vector
321 
322  if (ptr_==0) {
323  ptr_ = new int[M+1];
324  ptr_[0] = 0;
325  for (int i=0; i<M; i++) ptr_[i+1] = ptr_[i] + RedistGraph.NumMyIndices(i);
326  }
327  ptr = ptr_;
328 
329  return(0);
330 }
331 
332 //=========================================================================
334 
335  if (LHS==0) {EPETRA_CHK_ERR(-1);}
337 
339 
340  return(0);
341 }
342 
343 //=========================================================================
345 
346  if (RHS==0) {EPETRA_CHK_ERR(-1);}
348 
350 
351  return(0);
352 }
353 
354 
355 
Epetra_RowMatrixTransposer::UpdateTransposeValues
int UpdateTransposeValues(Epetra_RowMatrix *MatrixWithNewValues)
Update the values of an already-redistributed problem.
Definition: Epetra_RowMatrixTransposer.cpp:279
Epetra_CrsGraph::NumMyIndices
int NumMyIndices(int Row) const
Returns the current number of nonzero entries in specified local row on this processor.
Definition: Epetra_CrsGraph.h:759
Epetra_BlockMap::Comm
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
Definition: Epetra_BlockMap.h:770
Epetra_BlockMap::NumMyElements
int NumMyElements() const
Number of elements on the calling processor.
Definition: Epetra_BlockMap.h:555
Epetra_Comm::NumProc
virtual int NumProc() const =0
Returns total number of processes.
Epetra_LinearProblem::GetMatrix
Epetra_RowMatrix * GetMatrix() const
Get a pointer to the matrix A.
Definition: Epetra_LinearProblem.h:175
Epetra_CrsMatrix::PutScalar
int PutScalar(double ScalarConstant)
Initialize all values in the matrix with constant value.
Definition: Epetra_CrsMatrix.cpp:487
Add
Definition: Epetra_CombineMode.h:64
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.h
View
Definition: Epetra_DataAccess.h:57
Epetra_LinearProblemRedistor::OrigProblem_
Epetra_LinearProblem * OrigProblem_
Definition: Epetra_LinearProblemRedistor.h:230
EPETRA_CHK_ERR
#define EPETRA_CHK_ERR(a)
Definition: Epetra_ConfigDefs.h:307
Epetra_LinearProblemRedistor::CreateRedistProblem
int CreateRedistProblem(const bool ConstructTranspose, const bool MakeDataContiguous, Epetra_LinearProblem *&RedistProblem)
Generate a new Epetra_LinearProblem as a redistribution of the one passed into the constructor.
Definition: Epetra_LinearProblemRedistor.cpp:178
Epetra_CrsMatrix.h
Epetra_IntVector
Epetra_IntVector: A class for constructing and using dense integer vectors on a parallel computer.
Definition: Epetra_IntVector.h:124
Epetra_LinearProblemRedistor::Transposer_
Epetra_RowMatrixTransposer * Transposer_
Definition: Epetra_LinearProblemRedistor.h:234
Copy
Definition: Epetra_DataAccess.h:55
Epetra_LinearProblemRedistor::UpdateRedistProblemValues
int UpdateRedistProblemValues(Epetra_LinearProblem *ProblemWithNewValues)
Update the values of an already-redistributed problem.
Definition: Epetra_LinearProblemRedistor.cpp:244
Epetra_LinearProblemRedistor::GenerateRedistMap
int GenerateRedistMap()
Definition: Epetra_LinearProblemRedistor.cpp:123
Epetra_BlockMap::LinearMap
bool LinearMap() const
Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across al...
Definition: Epetra_BlockMap.h:691
Epetra_LinearProblemRedistor::UpdateRedistRHS
int UpdateRedistRHS(Epetra_MultiVector *RHSWithNewValues)
Update the values of an already-redistributed RHS.
Definition: Epetra_LinearProblemRedistor.cpp:344
Epetra_Comm
Epetra_Comm: The Epetra Communication Abstract Base Class.
Definition: Epetra_Comm.h:73
Epetra_LinearProblemRedistor::ExtractHbData
int ExtractHbData(int &M, int &N, int &nz, int *&ptr, int *&ind, double *&val, int &Nrhs, double *&rhs, int &ldrhs, double *&lhs, int &ldlhs) const
Extract the redistributed problem data in a form usable for other codes that require Harwell-Boeing f...
Definition: Epetra_LinearProblemRedistor.cpp:288
Epetra_CrsMatrix::NumMyRows
int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
Definition: Epetra_CrsMatrix.h:1108
Epetra_RowMatrix::RowMatrixRowMap
virtual const Epetra_Map & RowMatrixRowMap() const =0
Returns the Epetra_Map object associated with the rows of this matrix.
Epetra_CrsMatrix::Graph
const Epetra_CrsGraph & Graph() const
Returns a reference to the Epetra_CrsGraph object associated with this matrix.
Definition: Epetra_CrsMatrix.h:1163
Epetra_MultiVector::ConstantStride
bool ConstantStride() const
Returns true if this multi-vector has constant stride between vectors.
Definition: Epetra_MultiVector.h:944
Insert
Definition: Epetra_CombineMode.h:68
Epetra_LinearProblem.h
Epetra_LinearProblemRedistor::RedistProblem_
Epetra_LinearProblem * RedistProblem_
Definition: Epetra_LinearProblemRedistor.h:232
Epetra_LinearProblemRedistor::NumProc_
int NumProc_
Definition: Epetra_LinearProblemRedistor.h:231
Epetra_CrsMatrix
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
Definition: Epetra_CrsMatrix.h:173
Epetra_DistObject::Export
int Export(const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
Exports an Epetra_DistObject using the Epetra_Import object.
Definition: Epetra_DistObject.cpp:198
Epetra_Util.h
Epetra_LinearProblemRedistor::~Epetra_LinearProblemRedistor
virtual ~Epetra_LinearProblemRedistor()
Epetra_LinearProblemRedistor destructor.
Definition: Epetra_LinearProblemRedistor.cpp:105
Epetra_LinearProblem::SetOperator
void SetOperator(Epetra_RowMatrix *A)
Set Operator A of linear problem AX = B using an Epetra_RowMatrix.
Definition: Epetra_LinearProblem.h:124
Epetra_LinearProblemRedistor::Epetra_LinearProblemRedistor
Epetra_LinearProblemRedistor(Epetra_LinearProblem *OrigProblem, const Epetra_Map &RedistMap)
Epetra_LinearProblemRedistor constructor using pre-defined layout.
Definition: Epetra_LinearProblemRedistor.cpp:55
Epetra_LinearProblemRedistor::RedistProblemCreated_
bool RedistProblemCreated_
Definition: Epetra_LinearProblemRedistor.h:241
Epetra_LinearProblemRedistor::Replicate_
bool Replicate_
Definition: Epetra_LinearProblemRedistor.h:237
Epetra_CrsMatrix::NumMyCols
int NumMyCols() const
Returns the number of entries in the set of column-indices that appear on this processor.
Definition: Epetra_CrsMatrix.h:1115
Epetra_RowMatrix
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices.
Definition: Epetra_RowMatrix.h:68
Epetra_CrsMatrix::IndicesAreContiguous
bool IndicesAreContiguous() const
If matrix indices are packed into single array (done in OptimizeStorage()) return true,...
Definition: Epetra_CrsMatrix.h:1019
Epetra_LinearProblem::SetRHS
void SetRHS(Epetra_MultiVector *B)
Set right-hand-side B of linear problem AX = B.
Definition: Epetra_LinearProblem.h:141
Epetra_LinearProblem
Epetra_LinearProblem: The Epetra Linear Problem Class.
Definition: Epetra_LinearProblem.h:62
Epetra_Export.h
Epetra_BlockMap::MyGlobalElements
int MyGlobalElements(int *MyGlobalElementList) const
Puts list of global elements on this processor into the user-provided array.
Definition: Epetra_BlockMap.cpp:848
Epetra_IntVector.h
Epetra_LinearProblemRedistor::UpdateOriginalLHS
int UpdateOriginalLHS(Epetra_MultiVector *LHS)
Update LHS of original Linear Problem object.
Definition: Epetra_LinearProblemRedistor.cpp:333
Epetra_LinearProblemRedistor::MapGenerated_
bool MapGenerated_
Definition: Epetra_LinearProblemRedistor.h:240
Epetra_LinearProblemRedistor::RedistExporter_
Epetra_Export * RedistExporter_
Definition: Epetra_LinearProblemRedistor.h:235
Epetra_CrsMatrix::FillComplete
int FillComplete(bool OptimizeDataStorage=true)
Signal that data entry is complete. Perform transformations to local index space.
Definition: Epetra_CrsMatrix.cpp:1140
Epetra_Import.h
Epetra_LinearProblemRedistor::ConstructTranspose_
bool ConstructTranspose_
Definition: Epetra_LinearProblemRedistor.h:238
Epetra_LinearProblemRedistor.h
Average
Definition: Epetra_CombineMode.h:74
Epetra_Comm.h
Epetra_IntVector::Values
int * Values() const
Returns a pointer to an array containing the values of this vector.
Definition: Epetra_IntVector.h:247
Epetra_CrsGraph
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs.
Definition: Epetra_CrsGraph.h:213
Epetra_LinearProblem::SetLHS
void SetLHS(Epetra_MultiVector *X)
Set left-hand-side X of linear problem AX = B.
Definition: Epetra_LinearProblem.h:136
Epetra_MultiVector
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
Definition: Epetra_MultiVector.h:184
Epetra_BlockMap::NumGlobalElements64
long long NumGlobalElements64() const
Definition: Epetra_BlockMap.h:552
Epetra_LinearProblemRedistor::ptr_
int * ptr_
Definition: Epetra_LinearProblemRedistor.h:243
Epetra_LinearProblem::GetLHS
Epetra_MultiVector * GetLHS() const
Get a pointer to the left-hand-side X.
Definition: Epetra_LinearProblem.h:177
Epetra_LinearProblemRedistor
Epetra_LinearProblemRedistor: A class for redistributing an Epetra_LinearProblem object.
Definition: Epetra_LinearProblemRedistor.h:66
Epetra_LinearProblem::GetRHS
Epetra_MultiVector * GetRHS() const
Get a pointer to the right-hand-side B.
Definition: Epetra_LinearProblem.h:179
Epetra_BlockMap::IndexBase
int IndexBase() const
Index base for this map.
Definition: Epetra_BlockMap.h:586
Epetra_LinearProblemRedistor::RedistMap_
Epetra_Map * RedistMap_
Definition: Epetra_LinearProblemRedistor.h:233
Epetra_Map.h
Epetra_DistObject::Import
int Import(const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
Imports an Epetra_DistObject using the Epetra_Import object.
Definition: Epetra_DistObject.cpp:113
Epetra_CrsMatrix::NumMyNonzeros
int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
Definition: Epetra_CrsMatrix.h:1105
Epetra_Export
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements.
Definition: Epetra_Export.h:62
Epetra_RowMatrixTransposer
Epetra_RowMatrixTransposer: A class for transposing an Epetra_RowMatrix object.
Definition: Epetra_RowMatrixTransposer.h:58
Epetra_Map
Epetra_Map: A class for partitioning vectors and matrices.
Definition: Epetra_Map.h:119
Epetra_MultiVector.h
Epetra_Comm::MyPID
virtual int MyPID() const =0
Return my process ID.
Epetra_MultiVector::Stride
int Stride() const
Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true).
Definition: Epetra_MultiVector.h:941
Epetra_Import
Epetra_Import: This class builds an import object for efficient importing of off-processor elements.
Definition: Epetra_Import.h:63
Epetra_MultiVector::NumVectors
int NumVectors() const
Returns the number of vectors in the multi-vector.
Definition: Epetra_MultiVector.h:925