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];
#define EPETRA_CHK_ERR(a)
int MyGlobalElements(int *MyGlobalElementList) const
Puts list of global elements on this processor into the user-provided array.
bool LinearMap() const
Returns true if the global ID space is contiguously divided (but not necessarily uniformly) across al...
int IndexBase() const
Index base for this map.
long long NumGlobalElements64() const
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
int NumMyElements() const
Number of elements on the calling processor.
Epetra_Comm: The Epetra Communication Abstract Base Class.
virtual int NumProc() const =0
Returns total number of processes.
virtual int MyPID() const =0
Return my process ID.
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs.
int NumMyIndices(int Row) const
Returns the current number of nonzero entries in specified local row on this processor.
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
int NumMyCols() const
Returns the number of entries in the set of column-indices that appear on this processor.
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.
int NumMyNonzeros() const
Returns the number of nonzero entries in the calling processor's portion of the 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.
bool IndicesAreContiguous() const
If matrix indices are packed into single array (done in OptimizeStorage()) return true,...
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.
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.
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements.
Epetra_Import: This class builds an import object for efficient importing of off-processor elements.
Epetra_IntVector: A class for constructing and using dense integer vectors on a parallel computer.
int * Values() const
Returns a pointer to an array containing the values of this vector.
Epetra_LinearProblemRedistor: A class for redistributing an Epetra_LinearProblem object.
int UpdateRedistRHS(Epetra_MultiVector *RHSWithNewValues)
Update the values of an already-redistributed RHS.
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_LinearProblem * RedistProblem_
virtual ~Epetra_LinearProblemRedistor()
Epetra_LinearProblemRedistor destructor.
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.
Epetra_RowMatrixTransposer * Transposer_
int UpdateOriginalLHS(Epetra_MultiVector *LHS)
Update LHS of original Linear Problem object.
Epetra_Export * RedistExporter_
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...
bool RedistProblemCreated_
Epetra_LinearProblem * OrigProblem_
Epetra_LinearProblem: The Epetra Linear Problem Class.
Epetra_MultiVector * GetRHS() const
Get a pointer to the right-hand-side B.
void SetOperator(Epetra_RowMatrix *A)
Set Operator A of linear problem AX = B using an Epetra_RowMatrix.
void SetRHS(Epetra_MultiVector *B)
Set right-hand-side B of linear problem AX = B.
Epetra_RowMatrix * GetMatrix() const
Get a pointer to the matrix A.
void SetLHS(Epetra_MultiVector *X)
Set left-hand-side X of linear problem AX = B.
Epetra_MultiVector * GetLHS() const
Get a pointer to the left-hand-side X.
Epetra_Map: A class for partitioning vectors and matrices.
Epetra_MultiVector: A class for constructing and using dense multi-vectors, vectors and matrices in p...
int NumVectors() const
Returns the number of vectors in the multi-vector.
bool ConstantStride() const
Returns true if this multi-vector has constant stride between vectors.
int Stride() const
Returns the stride between vectors in the multi-vector (only meaningful if ConstantStride() is true).
Epetra_RowMatrixTransposer: A class for transposing an Epetra_RowMatrix object.
int UpdateTransposeValues(Epetra_RowMatrix *MatrixWithNewValues)
Update the values of an already-redistributed problem.
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.
Epetra_RowMatrix: A pure virtual class for using real-valued double-precision row matrices.
virtual const Epetra_Map & RowMatrixRowMap() const =0
Returns the Epetra_Map object associated with the rows of this matrix.