9 #ifndef _fei_MatrixReducer_hpp_
10 #define _fei_MatrixReducer_hpp_
12 #include <fei_iosfwd.hpp>
16 #include <fei_Matrix.hpp>
17 #include <fei_Reducer.hpp>
18 #include <fei_MatrixGraph.hpp>
19 #include <fei_Matrix_core.hpp>
22 #define fei_file "fei_MatrixReducer.hpp"
23 #include <fei_ErrMacros.hpp>
34 virtual ~MatrixReducer();
43 const char*
typeName() {
return(target_->typeName()); }
50 {
return( target_->getMatrixGraph() ); }
57 int getGlobalNumRows()
const;
61 int getLocalNumRows()
const;
64 int putScalar(
double scalar);
71 int getRowLength(
int row,
int& length)
const;
82 int copyOutRow(
int row,
int len,
double* coefs,
int* indices)
const;
95 int sumIn(
int numRows,
const int* rows,
96 int numCols,
const int* cols,
97 const double*
const* values,
111 int copyIn(
int numRows,
const int* rows,
112 int numCols,
const int* cols,
113 const double*
const* values,
131 int sumInFieldData(
int fieldID,
135 const double*
const* data,
155 int sumInFieldData(
int fieldID,
171 int sumIn(
int blockID,
int connectivityID,
172 const double*
const* values,
179 int globalAssemble();
186 void setCommSizes() { target_->setCommSizes(); }
193 int gatherFromOverlap(
bool accumulate =
true);
196 int writeToFile(
const char* filename,
197 bool matrixMarketFormat=
true);
202 bool matrixMarketFormat=
true);
204 bool usingBlockEntryStorage()
205 {
return(target_->usingBlockEntryStorage()); }
208 int giveToUnderlyingMatrix(
int numRows,
const int* rows,
209 int numCols,
const int* cols,
210 const double*
const* values,
215 int giveToUnderlyingBlockMatrix(
int row,
221 const double*
const* values,
226 bool changedSinceMark();
229 int giveToMatrix(
int numRows,
const int* rows,
230 int numCols,
const int* cols,
231 const double*
const* values,
235 int giveToBlockMatrix(
int numRows,
const int* rows,
236 int numCols,
const int* cols,
237 const double*
const* values,
242 bool globalAssembleCalled_;
243 bool changedSinceMark_;
void writeToStream(snl_fei::RaggedTable< MAP_TYPE, SET_TYPE > &table, FEI_OSTREAM &os, const char *lineprefix=NULL)
std::string typeName(const T &t)