DiagonalSOE.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 $
00022 // $Date: 2005/01/27 22:22:50 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/diagonal/DiagonalSOE.h,v $
00024                                                                         
00025 // Written: fmk 
00026 // Created: Jan 2005
00027 // Revision: A
00028 //
00029 // Description: This file contains the class definition for DiagonalSOE
00030 // DiagonalSOE is a subclass of LinearSOE. It stores a diagonal system
00031 // of equation, i.e. just the diagonal
00032 
00033 // What: "@(#) DiagonalSOE.h, revA"
00034 
00035 #ifndef DiagonalSOE_h
00036 #define DiagonalSOE_h
00037 
00038 #include <LinearSOE.h>
00039 #include <Vector.h>
00040 class DiagonalSolver;
00041 
00042 class DiagonalSOE : public LinearSOE
00043 {
00044   public:
00045     DiagonalSOE(DiagonalSolver &theSolver);
00046     DiagonalSOE(int N, DiagonalSolver &theSolver);
00047 
00048     ~DiagonalSOE();
00049 
00050     int getNumEqn(void) const;
00051     int setSize(Graph &theGraph);
00052     int addA(const Matrix &, const ID &, double fact = 1.0);
00053     int addB(const Vector &, const ID &, double fact = 1.0);    
00054     int setB(const Vector &, double fact = 1.0);        
00055     
00056     void zeroA(void);
00057     void zeroB(void);
00058 
00059     void setX(int loc, double value);
00060     void setX(const Vector &x);
00061 
00062     
00063     const Vector &getX(void);
00064     const Vector &getB(void);
00065     double normRHS(void);
00066 
00067     int setDiagonalSolver(DiagonalSolver &newSolver);    
00068     
00069     int sendSelf(int commitTag, Channel &theChannel);
00070     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);    
00071 
00072     friend class DiagonalSolver;    
00073     friend class DiagonalDirectSolver;
00074     
00075   protected:
00076     
00077   private:
00078     int size;
00079     double *A, *B, *X;
00080     Vector *vectX;
00081     Vector *vectB;
00082     bool isAfactored;
00083 };
00084 
00085 
00086 #endif
00087 
00088 
00089 

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