44 #ifndef EPETRA_FECRSMATRIX_H
45 #define EPETRA_FECRSMATRIX_H
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
49 #warning "The Epetra package is deprecated"
64 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
133 int* NumEntriesPerRow,
134 bool ignoreNonLocalEntries=
false);
139 int NumEntriesPerRow,
140 bool ignoreNonLocalEntries=
false);
146 int* NumEntriesPerRow,
147 bool ignoreNonLocalEntries=
false);
153 int NumEntriesPerRow,
154 bool ignoreNonLocalEntries=
false);
159 bool ignoreNonLocalEntries=
false);
164 bool ignoreNonLocalEntries=
false);
175 enum { ROW_MAJOR = 0, COLUMN_MAJOR = 3 };
177 void Print(std::ostream& os)
const;
178 #if !defined(EPETRA_NO_32BIT_GLOBAL_INDICES) || !defined(EPETRA_NO_64BIT_GLOBAL_INDICES)
185 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
187 const double* Values,
const int* Indices);
189 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
191 const double* Values,
const long long* Indices);
195 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
197 const double* Values,
const int* Indices);
199 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
201 const double* Values,
const long long* Indices);
205 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
207 double* Values,
int* Indices);
209 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
211 double* Values,
long long* Indices);
215 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
217 const double* Values,
const int* Indices);
219 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
221 const double* Values,
const long long* Indices);
239 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
241 const double* values,
244 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
246 const double* values,
266 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
268 int numCols,
const int* cols,
269 const double* values,
272 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
274 int numCols,
const long long* cols,
275 const double* values,
293 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
295 const double*
const* values,
298 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
300 const double*
const* values,
319 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
321 int numCols,
const int* cols,
322 const double*
const* values,
325 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
327 int numCols,
const long long* cols,
328 const double*
const* values,
346 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
348 const double* values,
351 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
353 const double* values,
372 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
374 int numCols,
const int* cols,
375 const double* values,
378 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
380 int numCols,
const long long* cols,
381 const double* values,
398 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
400 const double*
const* values,
403 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
405 const double*
const* values,
423 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
425 int numCols,
const int* cols,
426 const double*
const* values,
429 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
431 int numCols,
const long long* cols,
432 const double*
const* values,
451 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
453 const double* values,
456 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
458 const double* values,
479 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
481 int numCols,
const int* cols,
482 const double* values,
485 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
487 int numCols,
const long long* cols,
488 const double* values,
506 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
508 const double*
const* values,
511 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
513 const double*
const* values,
532 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
534 int numCols,
const int* cols,
535 const double*
const* values,
538 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
540 int numCols,
const long long* cols,
541 const double*
const* values,
555 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
560 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
580 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
586 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
603 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
608 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
628 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
634 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
652 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
657 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
677 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
683 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
711 int GlobalAssemble(
bool callFillComplete=
true,
713 bool save_off_and_reuse_map_exporter=
false);
740 int GlobalAssemble(
const Epetra_Map& domain_map,
742 bool callFillComplete=
true,
744 bool save_off_and_reuse_map_exporter=
false);
750 ignoreNonLocalEntries_ = flag;
756 enum {SUMINTO = 0, REPLACE = 1, INSERT = 2};
758 template<
typename int_type>
759 int InputGlobalValues(
int numRows,
const int_type* rows,
760 int numCols,
const int_type* cols,
761 const double*
const* values,
765 template<
typename int_type>
766 int InputGlobalValues(
int numRows,
const int_type* rows,
767 int numCols,
const int_type* cols,
768 const double* values,
772 template<
typename int_type>
773 int InputNonlocalGlobalValues(int_type row,
774 int numCols,
const int_type* cols,
775 const double* values,
778 template<
typename int_type>
779 int InputGlobalValues_RowMajor(
780 int numRows,
const int_type* rows,
781 int numCols,
const int_type* cols,
782 const double* values,
785 template<
typename int_type>
786 int InsertNonlocalRow(int_type row,
typename std::vector<int_type>::iterator offset);
788 template<
typename int_type>
789 int InputNonlocalValue(
int rowoffset,
790 int_type col,
double value,
798 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
802 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
807 template<
typename int_type> std::vector<int_type>& nonlocalRows();
808 template<
typename int_type> std::vector<std::vector<int_type> >& nonlocalCols();
826 template<
typename int_type>
827 int SumIntoGlobalValues(int_type GlobalRow,
int NumEntries,
const double* values,
const int_type* Indices);
829 template<
typename int_type>
830 int GlobalAssemble(
const Epetra_Map& domain_map,
832 bool callFillComplete=
true,
834 bool save_off_and_reuse_map_exporter=
false);
838 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
839 template<>
inline std::vector<int>& Epetra_FECrsMatrix::nonlocalRows<int>()
841 return nonlocalRows_int_;
845 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
846 template<>
inline std::vector<long long>& Epetra_FECrsMatrix::nonlocalRows<long long>()
848 return nonlocalRows_LL_;
852 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
853 template<>
inline std::vector<std::vector<int> >& Epetra_FECrsMatrix::nonlocalCols<int>()
855 return nonlocalCols_int_;
859 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
860 template<>
inline std::vector<std::vector<long long> >& Epetra_FECrsMatrix::nonlocalCols<long long>()
862 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_