fei_LinearSystemCore.hpp

00001 #ifndef _fei_LinearSystemCore_hpp_
00002 #define _fei_LinearSystemCore_hpp_
00003 
00004 class Data;
00005 class Lookup;
00006 
00007 #include <fei_defs.h>
00008 
00123 class LinearSystemCore {
00124  public:
00128    LinearSystemCore(){};
00129 
00136    virtual ~LinearSystemCore() {};
00137 
00138 
00141    virtual LinearSystemCore* clone() = 0;
00142 
00143 
00150    virtual int parameters(int numParams, const char*const * params) = 0;
00151 
00152 
00159    virtual int setLookup(Lookup& lookup) = 0;
00160 
00161 
00170    virtual int getProperty(const char* /*name*/, double& /*value*/)
00171      {
00172        return(-1);
00173      }
00174 
00192    virtual int setGlobalOffsets(int len, int* nodeOffsets,
00193                                  int* eqnOffsets, int* blkEqnOffsets) = 0;
00194 
00195 
00206    virtual int setConnectivities(GlobalID elemBlock,
00207                                   int numElements,
00208                                   int numNodesPerElem,
00209                                   const GlobalID* elemIDs,
00210                                   const int* const* connNodes) = 0;
00211 
00212 
00226    virtual int setStiffnessMatrices(GlobalID elemBlock,
00227                                      int numElems,
00228                                      const GlobalID* elemIDs,
00229                                      const double *const *const *stiff,
00230                                      int numEqnsPerElem,
00231                                      const int *const * eqnIndices) = 0;
00232 
00233 
00246    virtual int setLoadVectors(GlobalID elemBlock,
00247                                int numElems,
00248                                const GlobalID* elemIDs,
00249                                const double *const * load,
00250                                int numEqnsPerElem,
00251                                const int *const * eqnIndices) = 0;
00252 
00253 
00271    virtual int setMatrixStructure(int** ptColIndices,
00272                                    int* ptRrowLengths,
00273                                    int** blkColIndices,
00274                                    int* blkRowLengths,
00275                                    int* ptRowsPerBlkRow) = 0;
00276 
00277 
00298    virtual int setMultCREqns(int multCRSetID,
00299                               int numCRs, int numNodesPerCR,
00300                               int** nodeNumbers, int** eqnNumbers,
00301                               int* fieldIDs,
00302                               int* multiplierEqnNumbers) = 0;
00303 
00309    virtual int setPenCREqns(int penCRSetID,
00310                               int numCRs, int numNodesPerCR,
00311                               int** nodeNumbers, int** eqnNumbers,
00312                               int* fieldIDs) = 0;
00313 
00314 
00319    virtual int sumIntoSystemMatrix(int numPtRows, const int* ptRows,
00320                                     int numPtCols, const int* ptCols,
00321                                     int numBlkRows, const int* blkRows,
00322                                     int numBlkCols, const int* blkCols,
00323                                     const double* const* values) = 0;
00324 
00331    virtual int sumIntoSystemMatrix(int numPtRows, const int* ptRows,
00332                                     int numPtCols, const int* ptCols,
00333                                     const double* const* values) = 0;
00334 
00339    virtual int putIntoSystemMatrix(int numPtRows, const int* ptRows,
00340                                     int numPtCols, const int* ptCols,
00341                                     const double* const* values) = 0;
00342 
00348    virtual int getMatrixRowLength(int row, int& length) = 0;
00349 
00361    virtual int getMatrixRow(int row, double* coefs, int* indices,
00362                             int len, int& rowLength) = 0;
00363 
00366    virtual int sumIntoRHSVector(int num, const double* values,
00367                                  const int* indices) = 0;
00369    virtual int putIntoRHSVector(int num, const double* values,
00370                                  const int* indices) = 0;
00372    virtual int getFromRHSVector(int num, double* values,
00373                                  const int* indices) = 0;
00374 
00378    virtual int matrixLoadComplete() = 0;
00379 
00391    virtual int putNodalFieldData(int fieldID, int fieldSize,
00392                                   int* nodeNumbers, int numNodes,
00393                                   const double* data) = 0;
00394 
00395 
00399    virtual int resetMatrixAndVector(double s) = 0;
00400 
00403    virtual int resetMatrix(double s) = 0;
00404 
00407    virtual int resetRHSVector(double s) = 0;
00408 
00425    virtual int enforceEssentialBC(int* globalEqn, double* alpha,
00426                                    double* gamma, int len) = 0;
00427 
00447    virtual int enforceRemoteEssBCs(int numEqns, int* globalEqns,
00448                                           int** colIndices, int* colIndLen,
00449                                           double** coefs) = 0;
00450 
00455    virtual int getMatrixPtr(Data& data) = 0;
00456 
00462    virtual int copyInMatrix(double scalar, const Data& data) = 0;
00463 
00472    virtual int copyOutMatrix(double scalar, Data& data) = 0;
00473 
00479    virtual int sumInMatrix(double scalar, const Data& data) = 0;
00480 
00482    virtual int getRHSVectorPtr(Data& data) = 0;
00483 
00485    virtual int copyInRHSVector(double scalar, const Data& data) = 0;
00486 
00488    virtual int copyOutRHSVector(double scalar, Data& data) = 0;
00489 
00491    virtual int sumInRHSVector(double scalar, const Data& data) = 0;
00492 
00499    virtual int destroyMatrixData(Data& data) = 0;
00500 
00507    virtual int destroyVectorData(Data& data) = 0;
00508 
00521    virtual int setNumRHSVectors(int numRHSs, const int* rhsIDs) = 0;
00522 
00529    virtual int setRHSID(int rhsID) = 0;
00530 
00539    virtual int putInitialGuess(const int* eqnNumbers, const double* values,
00540                                 int len) = 0;
00541 
00550    virtual int getSolution(double* answers, int len) = 0;
00551 
00557    virtual int getSolnEntry(int eqnNumber, double& answer) = 0;
00558 
00565    virtual int formResidual(double* values, int len) = 0;
00566 
00576    virtual int launchSolver(int& solveStatus, int& iterations) = 0;
00577 
00585    virtual int writeSystem(const char* name) = 0;
00586 };
00587 
00588 #endif
00589 

Generated on Wed May 12 21:30:41 2010 for FEI by  doxygen 1.4.7