|
Epetra Package Browser (Single Doxygen Collection)
Development
|
Go to the documentation of this file.
55 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES // FIXME
61 int *NumBlockEntriesPerRow,
62 bool ignoreNonLocalEntries)
64 ignoreNonLocalEntries_(ignoreNonLocalEntries),
65 numNonlocalBlockRows_(0),
66 nonlocalBlockRows_(NULL),
67 nonlocalBlockRowLengths_(NULL),
68 nonlocalBlockRowAllocLengths_(NULL),
69 nonlocalBlockCols_(NULL),
82 int NumBlockEntriesPerRow,
83 bool ignoreNonLocalEntries)
85 ignoreNonLocalEntries_(ignoreNonLocalEntries),
86 numNonlocalBlockRows_(0),
87 nonlocalBlockRows_(NULL),
88 nonlocalBlockRowLengths_(NULL),
89 nonlocalBlockRowAllocLengths_(NULL),
90 nonlocalBlockCols_(NULL),
104 int *NumBlockEntriesPerRow,
105 bool ignoreNonLocalEntries)
107 ignoreNonLocalEntries_(ignoreNonLocalEntries),
108 numNonlocalBlockRows_(0),
109 nonlocalBlockRows_(NULL),
110 nonlocalBlockRowLengths_(NULL),
111 nonlocalBlockRowAllocLengths_(NULL),
112 nonlocalBlockCols_(NULL),
113 nonlocalCoefs_(NULL),
126 int NumBlockEntriesPerRow,
127 bool ignoreNonLocalEntries)
129 ignoreNonLocalEntries_(ignoreNonLocalEntries),
130 numNonlocalBlockRows_(0),
131 nonlocalBlockRows_(NULL),
132 nonlocalBlockRowLengths_(NULL),
133 nonlocalBlockRowAllocLengths_(NULL),
134 nonlocalBlockCols_(NULL),
135 nonlocalCoefs_(NULL),
147 bool ignoreNonLocalEntries)
149 ignoreNonLocalEntries_(ignoreNonLocalEntries),
150 numNonlocalBlockRows_(0),
151 nonlocalBlockRows_(NULL),
152 nonlocalBlockRowLengths_(NULL),
153 nonlocalBlockRowAllocLengths_(NULL),
154 nonlocalBlockCols_(NULL),
155 nonlocalCoefs_(NULL),
167 ignoreNonLocalEntries_(src.ignoreNonLocalEntries_),
168 numNonlocalBlockRows_(0),
169 nonlocalBlockRows_(NULL),
170 nonlocalBlockRowLengths_(NULL),
171 nonlocalBlockRowAllocLengths_(NULL),
172 nonlocalBlockCols_(NULL),
173 nonlocalCoefs_(NULL),
252 double* values =
A.
A();
255 for(
int k=0; k<lda*
n; ++k) {
256 values[k] = ScalarConstant;
269 if(callFillComplete) {
297 pointRowsPerNonlocalBlockRow,
300 delete [] pointRowsPerNonlocalBlockRow;
305 if(callFillComplete) {
315 int numCols = 0, allocLen = 0;
317 int* pointColsPerBlockCol = NULL;
318 int ptColAllocLen = 0;
319 int insertPoint = -1;
327 numCols, allocLen) );
328 int tmpNumCols = numCols-1;
331 pointColsPerBlockCol,
332 tmpNumCols, ptColAllocLen) );
338 pointColsPerBlockCol,
342 delete [] pointColsPerBlockCol;
390 if(callFillComplete) {
401 int NumRows,
int NumCols)
413 if (coloffset < 0)
return(-1);
417 if (subblock == NULL) {
423 if (subblock == NULL) {
428 int nrows = subblock->
M();
429 int ncols = subblock->
N();
430 if (nrows != NumRows || ncols != NumCols) {
434 int Target_LDA = subblock->
LDA();
435 int Source_LDA = LDA;
436 double* tptr = subblock->
A();
437 double* sptr = values;
439 for(
int j=0; j<NumCols; ++j) {
440 for(
int i=0; i<NumRows; ++i) {
449 for(
int j=0; j<NumCols; ++j) {
450 for(
int i=0; i<NumRows; ++i) {
474 int tmp2 = alloc_len - 1;
481 int initialAllocLen = numCols*2;
490 if (newCols == NULL || newCoefs == NULL) {
494 newCols[offset] =
new int[initialAllocLen];
497 for(
int j=0; j<initialAllocLen; ++j) {
498 newCols[offset][j] = 0;
526 int myRow =
LRID(BlockRow);
535 BlockIndices,
false,
Add) );
543 int myRow =
LRID(BlockRow);
552 BlockIndices,
false,
Insert) );
560 int myRow =
LRID(BlockRow);
569 BlockIndices,
false,
Add) );
576 bool indicesAreLocal,
579 (void)indicesAreLocal;
585 int insertPoint = -1;
594 rowoffset = insertPoint;
599 for(
int i=0; i<NumBlockEntries; ++i) {
600 int col = BlockIndices[i];
623 curCols_ =
new int[NumBlockEntries];
624 for(
int j=0; j<NumBlockEntries; ++j) {
670 #endif // EPETRA_NO_32BIT_GLOBAL_INDICES
int M() const
Returns row dimension of system.
int BeginInsertGlobalValues(int BlockRow, int NumBlockEntries, int *BlockIndices)
Initiate insertion of a list of elements in a given global row of the matrix, values are inserted via...
Epetra Finite-Element VbrMatrix.
int EndSubmitEntries()
Completes processing of all data passed in for the current block row.
int FillComplete()
Signal that data entry is complete, perform transformations to local index space.
Epetra_FEVbrMatrix(Epetra_DataAccess CV, const Epetra_BlockMap &RowMap, int *NumBlockEntriesPerRow, bool ignoreNonLocalEntries=false)
Epetra_FEVbrMatrix constuctor with variable number of indices per row.
int BeginSumIntoGlobalValues(int BlockRow, int NumBlockEntries, int *BlockIndices)
Initiate summing into current values with this list of entries for a given global row of the matrix,...
int PutScalar(double ScalarConstant)
Initialize all values in graph of the matrix with constant value.
const Epetra_BlockMap & RangeMap() const
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
int N() const
Returns column dimension of system.
int numNonlocalBlockRows_
#define EPETRA_CHK_ERR(a)
void SetIndicesAreGlobal(bool Flag)
const Epetra_BlockMap & DomainMap() const
Returns the Epetra_BlockMap object associated with the domain of this matrix operator.
int BeginInsertGlobalValues(int BlockRow, int NumBlockEntries, int *BlockIndices)
Initiate insertion of a list of elements in a given global row of the matrix, values are inserted via...
double * A() const
Returns pointer to the this matrix.
const Epetra_BlockMap & RowMap() const
Returns the RowMap object as an Epetra_BlockMap (the Epetra_Map base class) needed for implementing E...
int InputNonlocalBlockEntry(double *Values, int LDA, int NumRows, int NumCols)
const Epetra_BlockMap & Map() const
Map() method inherited from Epetra_DistObject.
int Epetra_Util_binary_search(T item, const T *list, int len, int &insertPoint)
Utility function to perform a binary-search on a list of data.
int BeginReplaceGlobalValues(int BlockRow, int NumBlockEntries, int *BlockIndices)
Initiate replacement of current values with this list of entries for a given global row of the matrix...
int ** nonlocalBlockCols_
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 BeginSumIntoGlobalValues(int BlockRow, int NumBlockEntries, int *BlockIndices)
Initiate summing into current values with this list of entries for a given global row of the matrix,...
const Epetra_Comm & Comm() const
Fills a matrix with rows from a source matrix based on the specified importer.
Epetra_FEVbrMatrix & operator=(const Epetra_FEVbrMatrix &src)
bool ignoreNonLocalEntries_
int SubmitBlockEntry(double *Values, int LDA, int NumRows, int NumCols)
Submit a block entry to the indicated block row and column specified in the Begin routine.
const Epetra_CrsGraph & Graph() const
Returns a pointer to the Epetra_CrsGraph object associated with this matrix.
int IndexBase() const
Returns the index base for row and column indices for this graph.
Epetra_VbrMatrix & operator=(const Epetra_VbrMatrix &src)
int GlobalAssemble(bool callFillComplete=true)
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
virtual ~Epetra_FEVbrMatrix()
Epetra_VbrMatrix Destructor.
int LDA() const
Returns the leading dimension of the this matrix.
int EndSubmitEntries()
Completes processing of all data passed in for the current block row.
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs.
void destroyNonlocalData()
long long NumGlobalElements64() const
int InsertNonlocalRow(int row, int offset, int numCols)
int * nonlocalBlockRowAllocLengths_
int Epetra_Util_insert(T item, int offset, T *&list, int &usedLength, int &allocatedLength, int allocChunkSize=32)
Function to insert an item in a list, at a specified offset.
int * nonlocalBlockRowLengths_
int SetupForNonlocalSubmits(int BlockRow, int NumBlockEntries, int *BlockIndices, bool IndicesAreLocal, Epetra_CombineMode SubmitMode)
Epetra_SerialDenseMatrix *** nonlocalCoefs_
Epetra_VbrMatrix: A class for the construction and use of real-valued double-precision variable block...
int LRID(int GRID_in) const
Returns the local row index for given global row index, returns -1 if no local row for this global ro...
int BeginReplaceGlobalValues(int BlockRow, int NumBlockEntries, int *BlockIndices)
Initiate replacement of current values with this list of entries for a given global row of the matrix...
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements.
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
int SubmitBlockEntry(double *Values, int LDA, int NumRows, int NumCols)
Submit a block entry to the indicated block row and column specified in the Begin routine.
int PutScalar(double ScalarConstant)
Initialize all values in graph of the matrix with constant value.