Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

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.1.1.1 $
00022 // $Date: 2000/09/15 08:23:30 $
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 // File: ~/system_of_eqn/linearSOE/sparseGEN/SparseGenColLinSOE.h
00030 //
00031 // Written: fmk 
00032 // Created: 04/98
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for SparseGenColLinSOE
00036 // SparseGenColLinSOE is a subclass of LinearSOE. It stores the matrix equation
00037 // Ax=b using the sparse column-compacted storage scheme for storing the 
00038 // matrix A. 
00039 //
00040 // What: "@(#) SparseGenColLinSOE.h, revA"
00041 
00042 #include <LinearSOE.h>
00043 #include <Vector.h>
00044 
00045 #include <SparseGenColLinSolver.h>
00046 
00112 class SparseGenColLinSOE : public LinearSOE
00113 {
00114   public:
00117     SparseGenColLinSOE(SparseGenColLinSolver &theSolver);        
00118 
00126     SparseGenColLinSOE(int N, int NNZ, int *rowStartA, int *colA,
00127 
00128          SparseGenColLinSolver &theSolver);        
00129 
00145     ~SparseGenColLinSOE();
00146 
00147 
00151     int getNumEqn(void) const;
00152 
00175     int setSize(Graph &theGraph);
00176 
00188     int addA(const Matrix &, const ID &, double fact = 1.0);
00189 
00200     int addB(const Vector &, const ID &, double fact = 1.0);    
00201 
00209     int setB(const Vector &, double fact = 1.0);        
00210 
00211     
00216     void zeroA(void);
00217 
00221     void zeroB(void);
00222 
00223     
00227     const Vector &getX(void);
00228 
00232     const Vector &getB(void);    
00233 
00237     double normRHS(void);
00238 
00239 
00243     void setX(int loc, double value);        
00244 
00246     int setSparseGenColSolver(SparseGenColLinSolver &newSolver);    
00247 
00248 
00250     int sendSelf(int commitTag, Channel &theChannel);
00252     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);    
00254     friend #include <SuperLU.h>    
00255     friend #include <ThreadedSuperLU.h>        
00256 
00257   protected:
00258     
00259   private:
00260     int size;            
00261     int nnz;             
00262     double *A, *B, *X;   
00263     int *rowA, *colStartA; 
00264     Vector *vectX;
00266     Vector *vectB;    
00268     int Asize, Bsize;    
00269     bool factored;
00270 };
00271 
00272 
00273 #endif
00274 
Copyright Contact Us