UmfpackGenLinSOE.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.2 $
00022 // $Date: 2001/12/07 00:17:55 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/umfGEN/UmfpackGenLinSOE.h,v $
00024                                                                         
00025                                                                         
00026 // File: ~/system_of_eqn/linearSOE/umfGEN/UmfpackGenLinSOE.h
00027 //
00028 // Written: fmk 
00029 // Created: 11/98
00030 // Revision: A
00031 //
00032 // Description: This file contains the class definition for 
00033 // UmfpackGenLinSOE. It stores the sparse matrix A in a fashion
00034 // required by the UmfpackLinSolver object.
00035 //
00036 // What: "@(#) UmfpackGenLinSOE.h, revA"
00037 
00038 
00039 #ifndef UmfpackGenLinSOE_h
00040 #define UmfpackGenLinSOE_h
00041 
00042 #include <LinearSOE.h>
00043 #include <Vector.h>
00044 
00045 class UmfpackGenLinSolver;
00046 
00047 class UmfpackGenLinSOE : public LinearSOE
00048 {
00049   public:
00050     UmfpackGenLinSOE(UmfpackGenLinSolver &theSolver);        
00051     UmfpackGenLinSOE(int N, int NNZ, int *rowStartA, int *colA,
00052                     UmfpackGenLinSolver &theSolver);        
00053 
00054     ~UmfpackGenLinSOE();
00055 
00056     int getNumEqn(void) const;
00057     int setSize(Graph &theGraph);
00058     int addA(const Matrix &, const ID &, double fact = 1.0);
00059     int addB(const Vector &, const ID &, double fact = 1.0);    
00060     int setB(const Vector &, double fact = 1.0);        
00061     
00062     void zeroA(void);
00063     void zeroB(void);
00064     
00065     const Vector &getX(void);
00066     const Vector &getB(void);    
00067     double normRHS(void);
00068 
00069     void setX(int loc, double value);        
00070     void setX(const Vector &x);        
00071     int setUmfpackGenLinSolver(UmfpackGenLinSolver &newSolver);    
00072 
00073     int sendSelf(int commitTag, Channel &theChannel);
00074     int recvSelf(int commitTag, Channel &theChannel, 
00075                  FEM_ObjectBroker &theBroker); 
00076 
00077     friend class UmfpackGenLinSolver;
00078 
00079   protected:
00080     
00081   private:
00082     int size;            // order of A
00083     int nnz;             // number of non-zeros in A
00084     double *A, *B, *X;   // 1d arrays containing coefficients of A, B and X
00085     int *colA, *rowStartA; // int arrays containing info about coeff's in A
00086     int lValue;
00087     int *index;   // keep only for UMFpack
00088     
00089     Vector *vectX;
00090     Vector *vectB;    
00091     int Asize, Bsize;    // size of the 1d array holding A
00092     bool factored;
00093     
00094 };
00095 
00096 
00097 #endif
00098 

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