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) {
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_
int MyGlobalElements(int *MyGlobalElementList) const
Puts list of global elements on this processor into the user-provided array.
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...
void SetLHS(Epetra_MultiVector *X)
Set left-hand-side X of linear problem AX = B.
void SetOperator(Epetra_RowMatrix *A)
Set Operator A of linear problem AX = B using an Epetra_RowMatrix.
bool ConstantStride() const
Returns true if this multi-vector has constant stride between vectors.
virtual const Epetra_Map & RowMatrixRowMap() const =0
Returns the Epetra_Map object associated with the rows of this matrix.
const Epetra_CrsGraph & Graph() const
Returns a reference to the Epetra_CrsGraph object associated with this matrix.
int NumMyRows() const
Returns the number of matrix rows owned by the calling processor.
Epetra_IntVector: A class for constructing and using dense integer vectors on a parallel computer...
virtual ~Epetra_LinearProblemRedistor()
Epetra_LinearProblemRedistor destructor.
bool RedistProblemCreated_
int NumMyCols() const
Returns the number of entries in the set of column-indices that appear on this processor.
Epetra_RowMatrixTransposer * Transposer_
#define EPETRA_CHK_ERR(a)
int Stride() const
Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true)...
int IndexBase() const
Index base for this map.
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.
long long NumGlobalElements64() const
Epetra_Import: This class builds an import object for efficient importing of off-processor elements...
Epetra_LinearProblem * OrigProblem_
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 PutScalar(double ScalarConstant)
Initialize all values in the matrix with constant value.
bool IndicesAreContiguous() const
If matrix indices are packed into single array (done in OptimizeStorage()) return true...
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...
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 NumVectors() const
Returns the number of vectors in the multi-vector.
int NumMyElements() const
Number of elements on the calling processor.
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
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.
int UpdateRedistProblemValues(Epetra_LinearProblem *ProblemWithNewValues)
Update the values of an already-redistributed problem.
int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the matrix.
void SetRHS(Epetra_MultiVector *B)
Set right-hand-side B of linear problem AX = B.
Epetra_MultiVector * GetRHS() const
Get a pointer to the right-hand-side B.
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...
int NumMyIndices(int Row) const
Returns the current number of nonzero entries in specified local row on this processor.
Epetra_MultiVector * GetLHS() const
Get a pointer to the left-hand-side X.
Epetra_RowMatrix * GetMatrix() const
Get a pointer to the matrix A.
Epetra_LinearProblem: The Epetra Linear Problem Class.
int UpdateOriginalLHS(Epetra_MultiVector *LHS)
Update LHS of original Linear Problem object.
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices...
bool LinearMap() const
Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across al...
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 * Values() const
Returns a pointer to an array containing the values of this vector.