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);
167 enum { ROW_MAJOR = 0, COLUMN_MAJOR = 3 };
169 #if !defined(EPETRA_NO_32BIT_GLOBAL_INDICES) || !defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
176 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
178 const double* Values,
const int* Indices);
180 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
182 const double* Values,
const long long* Indices);
186 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
188 const double* Values,
const int* Indices);
190 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
192 const double* Values,
const long long* Indices);
196 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
198 double* Values,
int* Indices);
200 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
202 double* Values,
long long* Indices);
206 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
208 const double* Values,
const int* Indices);
210 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
212 const double* Values,
const long long* Indices);
230 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
232 const double* values,
235 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
237 const double* values,
257 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
259 int numCols,
const int* cols,
260 const double* values,
263 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
265 int numCols,
const long long* cols,
266 const double* values,
284 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
286 const double*
const* values,
289 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
291 const double*
const* values,
310 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
312 int numCols,
const int* cols,
313 const double*
const* values,
316 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
318 int numCols,
const long long* cols,
319 const double*
const* values,
337 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
339 const double* values,
342 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
344 const double* values,
363 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
365 int numCols,
const int* cols,
366 const double* values,
369 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
371 int numCols,
const long long* cols,
372 const double* values,
389 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
391 const double*
const* values,
394 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
396 const double*
const* values,
414 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
416 int numCols,
const int* cols,
417 const double*
const* values,
420 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
422 int numCols,
const long long* cols,
423 const double*
const* values,
442 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
444 const double* values,
447 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
449 const double* values,
470 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
472 int numCols,
const int* cols,
473 const double* values,
476 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
478 int numCols,
const long long* cols,
479 const double* values,
497 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
499 const double*
const* values,
502 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
504 const double*
const* values,
523 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
525 int numCols,
const int* cols,
526 const double*
const* values,
529 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
531 int numCols,
const long long* cols,
532 const double*
const* values,
546 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
551 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
571 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
577 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
594 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
599 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
619 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
625 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
643 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
648 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
668 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
674 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
702 int GlobalAssemble(
bool callFillComplete=
true,
704 bool save_off_and_reuse_map_exporter=
false);
731 int GlobalAssemble(
const Epetra_Map& domain_map,
733 bool callFillComplete=
true,
735 bool save_off_and_reuse_map_exporter=
false);
741 ignoreNonLocalEntries_ = flag;
747 enum {SUMINTO = 0, REPLACE = 1, INSERT = 2};
749 template<
typename int_type>
750 int InputGlobalValues(
int numRows,
const int_type* rows,
751 int numCols,
const int_type* cols,
752 const double*
const* values,
756 template<
typename int_type>
757 int InputGlobalValues(
int numRows,
const int_type* rows,
758 int numCols,
const int_type* cols,
759 const double* values,
763 template<
typename int_type>
764 int InputNonlocalGlobalValues(int_type row,
765 int numCols,
const int_type* cols,
766 const double* values,
769 template<
typename int_type>
770 int InputGlobalValues_RowMajor(
771 int numRows,
const int_type* rows,
772 int numCols,
const int_type* cols,
773 const double* values,
776 template<
typename int_type>
777 int InsertNonlocalRow(int_type row,
typename std::vector<int_type>::iterator offset);
779 template<
typename int_type>
780 int InputNonlocalValue(
int rowoffset,
781 int_type col,
double value,
789 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
793 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
798 template<
typename int_type> std::vector<int_type>& nonlocalRows();
799 template<
typename int_type> std::vector<std::vector<int_type> >& nonlocalCols();
817 template<
typename int_type>
818 int SumIntoGlobalValues(int_type GlobalRow,
int NumEntries,
const double* values,
const int_type* Indices);
820 template<
typename int_type>
821 int GlobalAssemble(
const Epetra_Map& domain_map,
823 bool callFillComplete=
true,
825 bool save_off_and_reuse_map_exporter=
false);
829 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
830 template<>
inline std::vector<int>& Epetra_FECrsMatrix::nonlocalRows<int>()
832 return nonlocalRows_int_;
836 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
837 template<>
inline std::vector<long long>& Epetra_FECrsMatrix::nonlocalRows<long long>()
839 return nonlocalRows_LL_;
843 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
844 template<>
inline std::vector<std::vector<int> >& Epetra_FECrsMatrix::nonlocalCols<int>()
846 return nonlocalCols_int_;
850 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
851 template<>
inline std::vector<std::vector<long long> >& Epetra_FECrsMatrix::nonlocalCols<long long>()
853 return nonlocalCols_LL_;
std::vector< const double * > workData2d_
Epetra_Map: A class for partitioning vectors and matrices.
Epetra_IntSerialDenseVector: A class for constructing and using dense vectors.
bool ignoreNonLocalEntries_
Epetra_CrsMatrix * tempMat_
std::vector< std::vector< int > > nonlocalCols_int_
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 Finite-Element CrsGraph.
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. ...
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...
std::vector< int > nonlocalRows_int_
Epetra_Combine Mode enumerable type.
std::vector< long long > nonlocalRows_LL_
Epetra Finite-Element CrsMatrix.
Epetra_Export * exporter_
Epetra_LongLongSerialDenseVector: A class for constructing and using dense vectors.
std::vector< std::vector< long long > > nonlocalCols_LL_
std::vector< std::vector< double > > nonlocalCoefs_
void setIgnoreNonLocalEntries(bool flag)
Set whether or not non-local data values should be ignored.
Epetra_CrsMatrix: A class for constructing and using real-valued double-precision sparse compressed r...
Epetra_CrsMatrix & operator=(const Epetra_CrsMatrix &src)
Assignment operator.
std::vector< double > workData_
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...
Epetra_CrsGraph: A class for constructing and using sparse compressed row graphs. ...
Epetra_CrsMatrix * nonlocalMatrix_