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