SparseGenColLinSOE.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.3 $
00022 // $Date: 2005/12/06 22:11:37 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/SparseGenColLinSOE.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef SparseGenColLinSOE_h
00027 #define SparseGenColLinSOE_h
00028 
00029 // Written: fmk 
00030 // Created: 04/98
00031 // Revision: A
00032 //
00033 // Description: This file contains the class definition for SparseGenColLinSOE
00034 // SparseGenColLinSOE is a subclass of LinearSOE. It stores the matrix equation
00035 // Ax=b using the sparse column-compacted storage scheme for storing the 
00036 // matrix A. 
00037 //
00038 // What: "@(#) SparseGenColLinSOE.h, revA"
00039 
00040 #include <LinearSOE.h>
00041 #include <Vector.h>
00042 
00043 class SparseGenColLinSolver;
00044 
00045 class SparseGenColLinSOE : public LinearSOE
00046 {
00047   public:
00048     SparseGenColLinSOE(SparseGenColLinSolver &theSolver);        
00049     SparseGenColLinSOE(SparseGenColLinSolver &theSolver, int classTag);        
00050     SparseGenColLinSOE(int N, int NNZ, int *rowStartA, int *colA,
00051                        SparseGenColLinSolver &theSolver);        
00052 
00053     virtual ~SparseGenColLinSOE();
00054 
00055     virtual int getNumEqn(void) const;
00056     virtual int setSize(Graph &theGraph);
00057     virtual int addA(const Matrix &, const ID &, double fact = 1.0);
00058     virtual int addB(const Vector &, const ID &, double fact = 1.0);    
00059     virtual int setB(const Vector &, double fact = 1.0);        
00060     
00061     virtual void zeroA(void);
00062     virtual void zeroB(void);
00063     
00064     virtual const Vector &getX(void);
00065     virtual const Vector &getB(void);    
00066     virtual double normRHS(void);
00067 
00068     virtual void setX(int loc, double value);        
00069     virtual void setX(const Vector &x);        
00070     virtual int setSparseGenColSolver(SparseGenColLinSolver &newSolver);    
00071 
00072     virtual int sendSelf(int commitTag, Channel &theChannel);
00073     virtual int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);    
00074 #ifdef _PARALLEL_PROCESSING
00075     friend class SuperLU;    
00076     friend class ThreadedSuperLU;        
00077     friend class DistributedSuperLU;        
00078 #else
00079     friend class SuperLU;    
00080 #endif
00081 
00082   protected:
00083     int size;            // order of A
00084     int nnz;             // number of non-zeros in A
00085     double *A, *B, *X;   // 1d arrays containing coefficients of A, B and X
00086     int *rowA, *colStartA; // int arrays containing info about coeficientss in A
00087     Vector *vectX;
00088     Vector *vectB;    
00089     int Asize, Bsize;    // size of the 1d array holding A
00090     bool factored;
00091     
00092   private:
00093 
00094 };
00095 
00096 
00097 #endif
00098 

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