SymSparseLinSOE.h

Go to the documentation of this file.
00001 // File: ~/system_of_eqn/linearSOE/LawSolver/SymSparseLinSOE.h
00002 //
00003 // Written: Jun Peng  (junpeng@stanford.edu)
00004 //          Prof. Kincho H. Law
00005 //          Stanford University
00006 // Created: 12/98
00007 // Revision: A
00008 //
00009 // Description: This file contains the class definition for 
00010 // SymSparseLinSOE.h. It stores the sparse matrix A in a fashion
00011 // that only store the none zero entries.
00012 //
00013 // What: "@(#) SymSparseLinSOE.h, revA"
00014 //
00015 // Almost all the information (Matrix A and Vector B) is stored as 
00016 // global variables in the file "symbolic.h".
00017 
00018 
00019 #ifndef SymSparseLinSOE_h
00020 #define SymSparseLinSOE_h
00021 
00022 #include <LinearSOE.h>
00023 #include <Vector.h>
00024 
00025 extern "C" {
00026    #include <FeStructs.h>
00027 }
00028 
00029 class SymSparseLinSolver;
00030 
00031 class SymSparseLinSOE : public LinearSOE
00032 {
00033   public:
00034     SymSparseLinSOE(SymSparseLinSolver &theSolver, int lSparse);        
00035     SymSparseLinSOE(int N, int NNZ, int *rowStartA, int *colA,
00036                     SymSparseLinSolver &theSolver, int lSparse);        
00037 
00038     ~SymSparseLinSOE();
00039 
00040     int getNumEqn(void) const;
00041     int setSize(Graph &theGraph);
00042     int addA(const Matrix &, const ID &, double fact = 1.0);
00043     int addB(const Vector &, const ID &, double fact = 1.0);    
00044     int setB(const Vector &, double fact = 1.0);        
00045     
00046     void zeroA(void);
00047     void zeroB(void);
00048     
00049     const Vector &getX(void);
00050     const Vector &getB(void);    
00051     double normRHS(void);
00052 
00053     void setX(int loc, double value);        
00054     void setX(const Vector &x);        
00055     int setSymSparseLinSolver(SymSparseLinSolver &newSolver);    
00056 
00057     int sendSelf(int commitTag, Channel &theChannel);
00058     int recvSelf(int commitTag, Channel &theChannel, 
00059                  FEM_ObjectBroker &theBroker);
00060 
00061     friend class SymSparseLinSolver;
00062 
00063   protected:
00064     
00065   private:
00066     int size;            // order of A
00067     int nnz;             // number of non-zeros in A
00068     double *B, *X;       // 1d arrays containing coefficients of B and X
00069     int *colA, *rowStartA;  //These are (ADJNCY, XADJ) pair.
00070 
00071     Vector *vectX;
00072     Vector *vectB;
00073     int Bsize;
00074     bool factored;
00075 
00076     int      LSPARSE;
00077     int      nblks;
00078     int      *xblk,  *invp;
00079     double   *diag, **penv;
00080     int      *rowblks;
00081     OFFDBLK  **begblk;
00082     OFFDBLK  *first;
00083 
00084 };
00085 
00086 #endif
00087 

Generated on Mon Oct 23 15:05:29 2006 for OpenSees by doxygen 1.5.0