57 : OrigProblem_(OrigProblem),
63 ConstructTranspose_(false),
64 MakeDataContiguous_(false),
66 RedistProblemCreated_(false),
74 : OrigProblem_(OrigProblem),
79 Replicate_(Replicate),
80 ConstructTranspose_(false),
81 MakeDataContiguous_(false),
83 RedistProblemCreated_(false),
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_),
137 int NumMyRedistElements = 0;
142 if (NumMyRedistElements>0) ContigIDs =
new int[NumMyRedistElements];
143 for (
int i=0; i<NumMyRedistElements; i++) ContigIDs[i] = IndexBase + i;
154 Epetra_Map GIDsTargetMap(-1, NumMyRedistElements, ContigIDs, IndexBase, Comm);
155 if (NumMyRedistElements>0)
delete [] ContigIDs;
179 const bool MakeDataContiguous,
201 if (ConstructTranspose) {
214 RedistProblem_->SetOperator(RedistMatrix);
235 RedistProblem_->SetLHS(RedistLHS);
236 RedistProblem_->SetRHS(RedistRHS);
289 int * & ind,
double * & val,
int & Nrhs,
290 double * & rhs,
int & ldrhs,
291 double * & lhs,
int & ldlhs)
const {
303 val = (*RedistMatrix)[0];
306 ind = RedistGraph[0];
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
Epetra_LinearProblem * RedistProblem_
Epetra_Map: A class for partitioning vectors and matrices.
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...
virtual const Epetra_Map & RowMatrixRowMap() const =0
Returns the Epetra_Map object associated with the rows of this matrix.
Epetra_MultiVector * GetLHS() const
Get a pointer to the left-hand-side X.
Epetra_MultiVector * GetRHS() const
Get a pointer to the right-hand-side B.
Epetra_IntVector: A class for constructing and using dense integer vectors on a parallel computer...
int MyGlobalElements(int *MyGlobalElementList) const
Puts list of global elements on this processor into the user-provided array.
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...
virtual ~Epetra_LinearProblemRedistor()
Epetra_LinearProblemRedistor destructor.
long long NumGlobalElements64() const
bool RedistProblemCreated_
Epetra_RowMatrixTransposer * Transposer_
#define EPETRA_CHK_ERR(a)
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...
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements...
Epetra_LinearProblemRedistor: A class for redistributing an Epetra_LinearProblem object.
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
int * Values() const
Returns a pointer to an array containing the values of this vector.
Epetra_LinearProblem * OrigProblem_
int NumVectors() const
Returns the number of vectors in the multi-vector.
virtual int MyPID() const =0
Return my process ID.
int FillComplete(bool OptimizeDataStorage=true)
Signal that data entry is complete. Perform transformations to local index space. ...
int IndexBase() const
Index base for this map.
int PutScalar(double ScalarConstant)
Initialize all values in the matrix with constant value.
int NumMyElements() const
Number of elements on the calling processor.
int NumMyCols() const
Returns the number of entries in the set of column-indices that appear on this processor.
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.
int UpdateTransposeValues(Epetra_RowMatrix *MatrixWithNewValues)
Update the values of an already-redistributed problem.
Epetra_Comm: The Epetra Communication Abstract Base Class.
Epetra_Export * RedistExporter_
int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
bool IndicesAreContiguous() const
If matrix indices are packed into single array (done in OptimizeStorage()) return true...
int UpdateRedistRHS(Epetra_MultiVector *RHSWithNewValues)
Update the values of an already-redistributed RHS.
Epetra_LinearProblemRedistor(Epetra_LinearProblem *OrigProblem, const Epetra_Map &RedistMap)
Epetra_LinearProblemRedistor constructor using pre-defined layout.
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
bool LinearMap() const
Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across al...
int UpdateRedistProblemValues(Epetra_LinearProblem *ProblemWithNewValues)
Update the values of an already-redistributed problem.
int Stride() const
Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true)...
bool ConstantStride() const
Returns true if this multi-vector has constant stride between vectors.
int NumMyIndices(int Row) const
Returns the current number of nonzero entries in specified local row on this processor.
Epetra_RowMatrix * GetMatrix() const
Get a pointer to the matrix A.
virtual int NumProc() const =0
Returns total number of processes.
Epetra_RowMatrixTransposer: A class for transposing an Epetra_RowMatrix object.
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
Epetra_LinearProblem: The Epetra Linear Problem Class.
int UpdateOriginalLHS(Epetra_MultiVector *LHS)
Update LHS of original Linear Problem object.
const Epetra_CrsGraph & Graph() const
Returns a reference to the Epetra_CrsGraph object associated with this matrix.
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices...
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.
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs. ...
int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.