9 #ifndef _fei_Reducer_hpp_
10 #define _fei_Reducer_hpp_
12 #include <fei_macros.hpp>
13 #include <fei_SharedPtr.hpp>
15 #include <fei_Logger.hpp>
16 #include <fei_CSVec.hpp>
17 #include <fei_FillableMat.hpp>
18 #include <fei_CSVec.hpp>
19 #include <fei_CSRMat.hpp>
43 void setLocalUnreducedEqns(
const std::vector<int>& localUnreducedEqns);
51 void addGraphIndices(
int numRows,
const int* rows,
52 int numCols,
const int* cols,
55 void addSymmetricGraphIndices(
int numIndices,
const int* indices,
66 int addMatrixValues(
int numRows,
const int* rows,
67 int numCols,
const int* cols,
68 const double*
const* values,
98 int addVectorValues(
int numValues,
99 const int* globalIndices,
100 const double* values,
106 int copyOutVectorValues(
int numValues,
107 const int* globalIndices,
113 void getSlaveMasterEqns(
int slaveEqn, std::vector<int>& masterEqns);
114 bool isSlaveEqn(
int unreducedEqn)
const;
115 bool isSlaveCol(
int unreducedEqn)
const;
121 int translateToReducedEqn(
int unreducedEqn)
const;
122 int translateFromReducedEqn(
int reduced_eqn)
const;
124 bool global_gather=
true);
127 void assembleReducedVector(
bool soln_vector,
130 std::vector<int>& getLocalReducedEqns();
134 void expand_work_arrays(
int size);
138 fei::FillableMat Kii_, Kid_, Kdi_, Kdd_;
148 std::vector<int> localUnreducedEqns_;
149 std::vector<int> localReducedEqns_;
150 std::vector<int> nonslaves_;
151 std::vector<int> reverse_;
153 int numGlobalSlaves_;
155 int firstLocalReducedEqn_;
156 int lastLocalReducedEqn_;
157 int lowestGlobalSlaveEqn_;
158 int highestGlobalSlaveEqn_;
163 std::string dbgprefix_;
164 unsigned mat_counter_;
165 unsigned rhs_vec_counter_;
169 double* double_array_;
172 std::vector<double> work_1D_;
173 std::vector<const double*> work_2D_;
178 #endif // _fei_Reducer_hpp_