12 #ifndef __LINEARSOLVER_HEADER__ 
   13 #define __LINEARSOLVER_HEADER__ 
   29     virtual void SetupParam(
const string& dir, 
const string& file) = 0;
 
   35     virtual void Allocate(
const vector<USI>& rowCapacity,
 
   37                           const USI&         blockDim) = 0;
 
   41                              const vector<vector<OCP_DBL>>& val,
 
   45                              vector<OCP_DBL>&               u) = 0;
 
Definition of build-in datatypes and consts.
unsigned int USI
Generic unsigned integer.
unsigned int OCP_USI
Long unsigned integer.
Virtual base class for linear solvers.
virtual void AssembleMat(const vector< vector< USI >> &colId, const vector< vector< OCP_DBL >> &val, const OCP_USI &dim, const USI &blockDim, vector< OCP_DBL > &rhs, vector< OCP_DBL > &u)=0
Assemble matrix for linear solver from the internal matrix data.
virtual void Allocate(const vector< USI > &rowCapacity, const OCP_USI &maxDim, const USI &blockDim)=0
Allocate maximum memory for linear solvers.
virtual void SetupParam(const string &dir, const string &file)=0
Read the params for linear solvers from an input file.
virtual OCP_INT Solve()=0
Solve the linear system and return the number of iterations.
virtual USI GetNumIters() const =0
Get number of iterations.
virtual void InitParam()=0
Initialize the params for linear solvers.