44#ifndef EPETRA_FECRSMATRIX_H
45#define EPETRA_FECRSMATRIX_H
56#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
125 int* NumEntriesPerRow,
126 bool ignoreNonLocalEntries=
false);
131 int NumEntriesPerRow,
132 bool ignoreNonLocalEntries=
false);
138 int* NumEntriesPerRow,
139 bool ignoreNonLocalEntries=
false);
145 int NumEntriesPerRow,
146 bool ignoreNonLocalEntries=
false);
151 bool ignoreNonLocalEntries=
false);
156 bool ignoreNonLocalEntries=
false);
169 void Print(std::ostream& os)
const;
170#if !defined(EPETRA_NO_32BIT_GLOBAL_INDICES) || !defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
177#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
178 int SumIntoGlobalValues(
int GlobalRow,
int NumEntries,
179 const double* Values,
const int* Indices);
181#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
182 int SumIntoGlobalValues(
long long GlobalRow,
int NumEntries,
183 const double* Values,
const long long* Indices);
187#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
188 int InsertGlobalValues(
int GlobalRow,
int NumEntries,
189 const double* Values,
const int* Indices);
191#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
192 int InsertGlobalValues(
long long GlobalRow,
int NumEntries,
193 const double* Values,
const long long* Indices);
197#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
198 int InsertGlobalValues(
int GlobalRow,
int NumEntries,
199 double* Values,
int* Indices);
201#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
202 int InsertGlobalValues(
long long GlobalRow,
int NumEntries,
203 double* Values,
long long* Indices);
207#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
208 int ReplaceGlobalValues(
int GlobalRow,
int NumEntries,
209 const double* Values,
const int* Indices);
211#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
212 int ReplaceGlobalValues(
long long GlobalRow,
int NumEntries,
213 const double* Values,
const long long* Indices);
231#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
232 int SumIntoGlobalValues(
int numIndices,
const int* indices,
233 const double* values,
236#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
237 int SumIntoGlobalValues(
int numIndices,
const long long* indices,
238 const double* values,
258#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
259 int SumIntoGlobalValues(
int numRows,
const int* rows,
260 int numCols,
const int* cols,
261 const double* values,
264#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
265 int SumIntoGlobalValues(
int numRows,
const long long* rows,
266 int numCols,
const long long* cols,
267 const double* values,
285#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
286 int SumIntoGlobalValues(
int numIndices,
const int* indices,
287 const double*
const* values,
290#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
291 int SumIntoGlobalValues(
int numIndices,
const long long* indices,
292 const double*
const* values,
311#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
312 int SumIntoGlobalValues(
int numRows,
const int* rows,
313 int numCols,
const int* cols,
314 const double*
const* values,
317#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
318 int SumIntoGlobalValues(
int numRows,
const long long* rows,
319 int numCols,
const long long* cols,
320 const double*
const* values,
338#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
339 int InsertGlobalValues(
int numIndices,
const int* indices,
340 const double* values,
343#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
344 int InsertGlobalValues(
int numIndices,
const long long* indices,
345 const double* values,
364#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
365 int InsertGlobalValues(
int numRows,
const int* rows,
366 int numCols,
const int* cols,
367 const double* values,
370#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
371 int InsertGlobalValues(
int numRows,
const long long* rows,
372 int numCols,
const long long* cols,
373 const double* values,
390#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
391 int InsertGlobalValues(
int numIndices,
const int* indices,
392 const double*
const* values,
395#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
396 int InsertGlobalValues(
int numIndices,
const long long* indices,
397 const double*
const* values,
415#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
416 int InsertGlobalValues(
int numRows,
const int* rows,
417 int numCols,
const int* cols,
418 const double*
const* values,
421#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
422 int InsertGlobalValues(
int numRows,
const long long* rows,
423 int numCols,
const long long* cols,
424 const double*
const* values,
443#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
444 int ReplaceGlobalValues(
int numIndices,
const int* indices,
445 const double* values,
448#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
449 int ReplaceGlobalValues(
int numIndices,
const long long* indices,
450 const double* values,
471#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
472 int ReplaceGlobalValues(
int numRows,
const int* rows,
473 int numCols,
const int* cols,
474 const double* values,
477#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
478 int ReplaceGlobalValues(
int numRows,
const long long* rows,
479 int numCols,
const long long* cols,
480 const double* values,
498#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
499 int ReplaceGlobalValues(
int numIndices,
const int* indices,
500 const double*
const* values,
503#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
504 int ReplaceGlobalValues(
int numIndices,
const long long* indices,
505 const double*
const* values,
524#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
525 int ReplaceGlobalValues(
int numRows,
const int* rows,
526 int numCols,
const int* cols,
527 const double*
const* values,
530#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
531 int ReplaceGlobalValues(
int numRows,
const long long* rows,
532 int numCols,
const long long* cols,
533 const double*
const* values,
547#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
552#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
572#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
578#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
595#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
600#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
620#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
626#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
644#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
649#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
669#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
675#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
703 int GlobalAssemble(
bool callFillComplete=
true,
705 bool save_off_and_reuse_map_exporter=
false);
732 int GlobalAssemble(
const Epetra_Map& domain_map,
734 bool callFillComplete=
true,
736 bool save_off_and_reuse_map_exporter=
false);
750 template<
typename int_type>
751 int InputGlobalValues(
int numRows,
const int_type* rows,
752 int numCols,
const int_type* cols,
753 const double*
const* values,
757 template<
typename int_type>
758 int InputGlobalValues(
int numRows,
const int_type* rows,
759 int numCols,
const int_type* cols,
760 const double* values,
764 template<
typename int_type>
765 int InputNonlocalGlobalValues(int_type row,
766 int numCols,
const int_type* cols,
767 const double* values,
770 template<
typename int_type>
771 int InputGlobalValues_RowMajor(
772 int numRows,
const int_type* rows,
773 int numCols,
const int_type* cols,
774 const double* values,
777 template<
typename int_type>
778 int InsertNonlocalRow(int_type row,
typename std::vector<int_type>::iterator offset);
780 template<
typename int_type>
781 int InputNonlocalValue(
int rowoffset,
782 int_type col,
double value,
790#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
794#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
800 template<
typename int_type> std::vector<std::vector<int_type> >&
nonlocalCols();
818 template<
typename int_type>
819 int SumIntoGlobalValues(int_type GlobalRow,
int NumEntries,
const double* values,
const int_type* Indices);
821 template<
typename int_type>
824 bool callFillComplete=
true,
826 bool save_off_and_reuse_map_exporter=
false);
830#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
837#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
844#ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
851#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
Epetra_Combine Mode enumerable type.
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs.
const Epetra_Map & RowMap() const
Returns the Epetra_Map object associated with the rows of this matrix.
virtual int ReplaceGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
Replace specified existing values with this list of entries for a given global row of the matrix.
virtual int SumIntoGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
Add this list of entries to existing values for a given global row of the matrix.
const Epetra_CrsGraph & Graph() const
Returns a reference to the Epetra_CrsGraph object associated with this matrix.
const Epetra_Map & ColMap() const
Returns the Epetra_Map object that describes the set of column-indices that appear in each processor'...
virtual int InsertGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
Insert a list of elements in a given global row of the matrix.
Epetra_CrsMatrix(Epetra_DataAccess CV, const Epetra_Map &RowMap, const int *NumEntriesPerRow, bool StaticProfile=false)
Epetra_CrsMatrix constructor with variable number of indices per row.
Epetra_Export: This class builds an export object for efficient exporting of off-processor elements.
Epetra Finite-Element CrsGraph.
Epetra_CrsMatrix * nonlocalMatrix_
std::vector< std::vector< int_type > > & nonlocalCols()
Epetra_FECrsMatrix & operator=(const Epetra_FECrsMatrix &src)
Assignment operator.
std::vector< std::vector< long long > > nonlocalCols_LL_
Epetra_FECrsMatrix(Epetra_DataAccess CV, const Epetra_Map &RowMap, int *NumEntriesPerRow, bool ignoreNonLocalEntries=false)
Constructor.
int SumIntoGlobalValues(int GlobalRow, int NumEntries, const double *Values, const int *Indices)
override base-class Epetra_CrsMatrix::SumIntoGlobalValues method
std::vector< double > workData_
int GlobalAssemble(bool callFillComplete=true, Epetra_CombineMode combineMode=Add, bool save_off_and_reuse_map_exporter=false)
Gather any overlapping/shared data into the non-overlapping partitioning defined by the Map that was ...
Epetra_CrsMatrix * tempMat_
void setIgnoreNonLocalEntries(bool flag)
Set whether or not non-local data values should be ignored.
std::vector< std::vector< int > > nonlocalCols_int_
std::vector< std::vector< double > > nonlocalCoefs_
Epetra_Export * exporter_
std::vector< const double * > workData2d_
bool ignoreNonLocalEntries_
std::vector< int_type > & nonlocalRows()
std::vector< int > nonlocalRows_int_
std::vector< long long > nonlocalRows_LL_
Epetra_IntSerialDenseVector: A class for constructing and using dense vectors.
Epetra_LongLongSerialDenseVector: A class for constructing and using dense vectors.
Epetra_Map: A class for partitioning vectors and matrices.
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...