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 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
179 const double* Values,
const int* Indices);
181 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
183 const double* Values,
const long long* Indices);
187 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
189 const double* Values,
const int* Indices);
191 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
193 const double* Values,
const long long* Indices);
197 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
199 double* Values,
int* Indices);
201 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
203 double* Values,
long long* Indices);
207 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
209 const double* Values,
const int* Indices);
211 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
213 const double* Values,
const long long* Indices);
231 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
233 const double* values,
236 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
238 const double* values,
258 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
260 int numCols,
const int* cols,
261 const double* values,
264 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
266 int numCols,
const long long* cols,
267 const double* values,
285 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
287 const double*
const* values,
290 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
292 const double*
const* values,
311 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
313 int numCols,
const int* cols,
314 const double*
const* values,
317 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
319 int numCols,
const long long* cols,
320 const double*
const* values,
338 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
340 const double* values,
343 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
345 const double* values,
364 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
366 int numCols,
const int* cols,
367 const double* values,
370 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
372 int numCols,
const long long* cols,
373 const double* values,
390 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
392 const double*
const* values,
395 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
397 const double*
const* values,
415 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
417 int numCols,
const int* cols,
418 const double*
const* values,
421 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
423 int numCols,
const long long* cols,
424 const double*
const* values,
443 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
445 const double* values,
448 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
450 const double* values,
471 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
473 int numCols,
const int* cols,
474 const double* values,
477 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
479 int numCols,
const long long* cols,
480 const double* values,
498 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
500 const double*
const* values,
503 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
505 const double*
const* values,
524 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
526 int numCols,
const int* cols,
527 const double*
const* values,
530 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
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);
742 ignoreNonLocalEntries_ = flag;
748 enum {SUMINTO = 0, REPLACE = 1, INSERT = 2};
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
799 template<
typename int_type> std::vector<int_type>& nonlocalRows();
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>
822 int GlobalAssemble(
const Epetra_Map& domain_map,
824 bool callFillComplete=
true,
826 bool save_off_and_reuse_map_exporter=
false);
830 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
831 template<>
inline std::vector<int>& Epetra_FECrsMatrix::nonlocalRows<int>()
833 return nonlocalRows_int_;
837 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
838 template<>
inline std::vector<long long>& Epetra_FECrsMatrix::nonlocalRows<long long>()
840 return nonlocalRows_LL_;
844 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
845 template<>
inline std::vector<std::vector<int> >& Epetra_FECrsMatrix::nonlocalCols<int>()
847 return nonlocalCols_int_;
851 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
852 template<>
inline std::vector<std::vector<long long> >& Epetra_FECrsMatrix::nonlocalCols<long long>()
854 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.
virtual void Print(std::ostream &os) const
Print method.
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_