1 #ifndef _fei_EqnBuffer_hpp_
2 #define _fei_EqnBuffer_hpp_
12 #include "fei_fwd.hpp"
40 int getNumEqns() {
return(eqnNumbers_.size());};
43 std::vector<int>&
eqnNumbers() {
return(eqnNumbers_);};
48 std::vector<fei::CSVec*>&
eqns() {
return(eqns_);};
70 int addRHS(
int eqnNumber,
int rhsIndex,
double value,
bool accumulate=
true);
76 std::vector<std::vector<double>*>*
rhsCoefsPtr() {
return(&rhsCoefs_);};
105 int addEqn(
int eqnNumber,
const double* coefs,
const int* indices,
106 int len,
bool accumulate,
bool create_indices_union=
false);
127 int getCoef(
int eqnNumber,
int colIndex,
double& coef);
147 int addIndices(
int eqnNumber,
const int* indices,
int len);
149 int newCoefData_, newRHSData_;
153 int insertNewEqn(
int eqn,
int insertPoint);
155 int internalAddEqn(
int index,
const double* coefs,
156 const int* indices,
int len,
bool accumulate);
158 std::vector<int> eqnNumbers_;
160 std::vector<fei::CSVec*> eqns_;
162 std::vector<int> indices_union_;
165 std::vector<std::vector<double>*> rhsCoefs_;
167 bool setNumRHSsCalled_;
168 bool rhsCoefsAllocated_;
170 std::vector<double> dummyCoefs_;
int addEqn(int eqnNumber, const double *coefs, const int *indices, int len, bool accumulate, bool create_indices_union=false)
std::vector< fei::CSVec * > & eqns()
EqnBuffer & operator=(const EqnBuffer &src)
std::vector< int > & eqnNumbers()
int addRHS(int eqnNumber, int rhsIndex, double value, bool accumulate=true)
std::vector< std::vector< double > * > * rhsCoefsPtr()
int getCoefAndRemoveIndex(int eqnNumber, int colIndex, double &coef)
int addEqns(EqnBuffer &inputEqns, bool accumulate)
int addIndices(int eqnNumber, const int *indices, int len)
int removeIndex(int eqnNumber, int colIndex)
int getCoef(int eqnNumber, int colIndex, double &coef)
std::ostream & operator<<(std::ostream &out, const SerialBandDenseMatrixPrinter< OrdinalType, ScalarType > printer)