FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fei_LinearSystemCore.hpp
1 #ifndef _fei_LinearSystemCore_hpp_
2 #define _fei_LinearSystemCore_hpp_
3 
4 class Data;
5 class Lookup;
6 
7 #include <fei_defs.h>
8 #include <cstdlib>
9 
125  public:
130 
137  virtual ~LinearSystemCore() {};
138 
139 
142  virtual LinearSystemCore* clone() = 0;
143 
144 
151  virtual int parameters(int numParams, const char*const * params) = 0;
152 
153 
160  virtual int setLookup(Lookup& lookup) = 0;
161 
162 
171  virtual int getProperty(const char* /*name*/, double& /*value*/)
172  {
173  return(-1);
174  }
175 
193  virtual int setGlobalOffsets(int len, int* nodeOffsets,
194  int* eqnOffsets, int* blkEqnOffsets) = 0;
195 
196 
207  virtual int setConnectivities(GlobalID elemBlock,
208  int numElements,
209  int numNodesPerElem,
210  const GlobalID* elemIDs,
211  const int* const* connNodes) = 0;
212 
213 
227  virtual int setStiffnessMatrices(GlobalID elemBlock,
228  int numElems,
229  const GlobalID* elemIDs,
230  const double *const *const *stiff,
231  int numEqnsPerElem,
232  const int *const * eqnIndices) = 0;
233 
234 
247  virtual int setLoadVectors(GlobalID elemBlock,
248  int numElems,
249  const GlobalID* elemIDs,
250  const double *const * load,
251  int numEqnsPerElem,
252  const int *const * eqnIndices) = 0;
253 
254 
272  virtual int setMatrixStructure(int** ptColIndices,
273  int* ptRrowLengths,
274  int** blkColIndices,
275  int* blkRowLengths,
276  int* ptRowsPerBlkRow) = 0;
277 
278 
299  virtual int setMultCREqns(int multCRSetID,
300  int numCRs, int numNodesPerCR,
301  int** nodeNumbers, int** eqnNumbers,
302  int* fieldIDs,
303  int* multiplierEqnNumbers) = 0;
304 
310  virtual int setPenCREqns(int penCRSetID,
311  int numCRs, int numNodesPerCR,
312  int** nodeNumbers, int** eqnNumbers,
313  int* fieldIDs) = 0;
314 
315 
320  virtual int sumIntoSystemMatrix(int numPtRows, const int* ptRows,
321  int numPtCols, const int* ptCols,
322  int numBlkRows, const int* blkRows,
323  int numBlkCols, const int* blkCols,
324  const double* const* values) = 0;
325 
332  virtual int sumIntoSystemMatrix(int numPtRows, const int* ptRows,
333  int numPtCols, const int* ptCols,
334  const double* const* values) = 0;
335 
340  virtual int putIntoSystemMatrix(int numPtRows, const int* ptRows,
341  int numPtCols, const int* ptCols,
342  const double* const* values) = 0;
343 
349  virtual int getMatrixRowLength(int row, int& length) = 0;
350 
362  virtual int getMatrixRow(int row, double* coefs, int* indices,
363  int len, int& rowLength) = 0;
364 
367  virtual int sumIntoRHSVector(int num, const double* values,
368  const int* indices) = 0;
370  virtual int putIntoRHSVector(int num, const double* values,
371  const int* indices) = 0;
373  virtual int getFromRHSVector(int num, double* values,
374  const int* indices) = 0;
375 
379  virtual int matrixLoadComplete() = 0;
380 
392  virtual int putNodalFieldData(int fieldID, int fieldSize,
393  int* nodeNumbers, int numNodes,
394  const double* data) = 0;
395 
396 
400  virtual int resetMatrixAndVector(double s) = 0;
401 
404  virtual int resetMatrix(double s) = 0;
405 
408  virtual int resetRHSVector(double s) = 0;
409 
426  virtual int enforceEssentialBC(int* globalEqn, double* alpha,
427  double* gamma, int len) = 0;
428 
448  virtual int enforceRemoteEssBCs(int numEqns, int* globalEqns,
449  int** colIndices, int* colIndLen,
450  double** coefs) = 0;
451 
456  virtual int getMatrixPtr(Data& data) = 0;
457 
463  virtual int copyInMatrix(double scalar, const Data& data) = 0;
464 
473  virtual int copyOutMatrix(double scalar, Data& data) = 0;
474 
480  virtual int sumInMatrix(double scalar, const Data& data) = 0;
481 
483  virtual int getRHSVectorPtr(Data& data) = 0;
484 
486  virtual int copyInRHSVector(double scalar, const Data& data) = 0;
487 
489  virtual int copyOutRHSVector(double scalar, Data& data) = 0;
490 
492  virtual int sumInRHSVector(double scalar, const Data& data) = 0;
493 
500  virtual int destroyMatrixData(Data& data) = 0;
501 
508  virtual int destroyVectorData(Data& data) = 0;
509 
522  virtual int setNumRHSVectors(int numRHSs, const int* rhsIDs) = 0;
523 
530  virtual int setRHSID(int rhsID) = 0;
531 
540  virtual int putInitialGuess(const int* eqnNumbers, const double* values,
541  int len) = 0;
542 
551  virtual int getSolution(double* answers, int len) = 0;
552 
558  virtual int getSolnEntry(int eqnNumber, double& answer) = 0;
559 
566  virtual int formResidual(double* values, int len) = 0;
567 
577  virtual int launchSolver(int& solveStatus, int& iterations) = 0;
578 
586  virtual int writeSystem(const char* name) = 0;
587 
588  virtual double* getMatrixBeginPointer()
589  { return NULL; }
590 
591  virtual int getMatrixOffset(int /*row*/, int /*col*/)
592  { return -1; }
593 
594 };
595 
596 #endif
597 
virtual int sumIntoSystemMatrix(int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, int numBlkRows, const int *blkRows, int numBlkCols, const int *blkCols, const double *const *values)=0
virtual int setRHSID(int rhsID)=0
virtual int setMultCREqns(int multCRSetID, int numCRs, int numNodesPerCR, int **nodeNumbers, int **eqnNumbers, int *fieldIDs, int *multiplierEqnNumbers)=0
virtual int resetMatrixAndVector(double s)=0
virtual int sumIntoRHSVector(int num, const double *values, const int *indices)=0
virtual int setLookup(Lookup &lookup)=0
virtual int setLoadVectors(GlobalID elemBlock, int numElems, const GlobalID *elemIDs, const double *const *load, int numEqnsPerElem, const int *const *eqnIndices)=0
virtual int copyOutRHSVector(double scalar, Data &data)=0
virtual int setConnectivities(GlobalID elemBlock, int numElements, int numNodesPerElem, const GlobalID *elemIDs, const int *const *connNodes)=0
virtual int resetMatrix(double s)=0
virtual int putNodalFieldData(int fieldID, int fieldSize, int *nodeNumbers, int numNodes, const double *data)=0
virtual int getFromRHSVector(int num, double *values, const int *indices)=0
virtual int sumInRHSVector(double scalar, const Data &data)=0
virtual int getMatrixRowLength(int row, int &length)=0
virtual int enforceEssentialBC(int *globalEqn, double *alpha, double *gamma, int len)=0
virtual int getMatrixPtr(Data &data)=0
virtual int getSolution(double *answers, int len)=0
virtual int setPenCREqns(int penCRSetID, int numCRs, int numNodesPerCR, int **nodeNumbers, int **eqnNumbers, int *fieldIDs)=0
virtual int setGlobalOffsets(int len, int *nodeOffsets, int *eqnOffsets, int *blkEqnOffsets)=0
virtual int copyOutMatrix(double scalar, Data &data)=0
virtual int putIntoRHSVector(int num, const double *values, const int *indices)=0
virtual LinearSystemCore * clone()=0
virtual int putIntoSystemMatrix(int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, const double *const *values)=0
virtual int setMatrixStructure(int **ptColIndices, int *ptRrowLengths, int **blkColIndices, int *blkRowLengths, int *ptRowsPerBlkRow)=0
virtual int setStiffnessMatrices(GlobalID elemBlock, int numElems, const GlobalID *elemIDs, const double *const *const *stiff, int numEqnsPerElem, const int *const *eqnIndices)=0
virtual int getRHSVectorPtr(Data &data)=0
virtual int copyInMatrix(double scalar, const Data &data)=0
virtual int resetRHSVector(double s)=0
virtual int setNumRHSVectors(int numRHSs, const int *rhsIDs)=0
virtual int destroyVectorData(Data &data)=0
virtual int matrixLoadComplete()=0
virtual int parameters(int numParams, const char *const *params)=0
virtual int putInitialGuess(const int *eqnNumbers, const double *values, int len)=0
virtual int sumInMatrix(double scalar, const Data &data)=0
virtual int getSolnEntry(int eqnNumber, double &answer)=0
virtual int enforceRemoteEssBCs(int numEqns, int *globalEqns, int **colIndices, int *colIndLen, double **coefs)=0
virtual int formResidual(double *values, int len)=0
virtual int getProperty(const char *, double &)
virtual int getMatrixRow(int row, double *coefs, int *indices, int len, int &rowLength)=0
virtual int writeSystem(const char *name)=0
virtual int launchSolver(int &solveStatus, int &iterations)=0
virtual int destroyMatrixData(Data &data)=0
virtual int copyInRHSVector(double scalar, const Data &data)=0