LinearSOE.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.4 $
00022 // $Date: 2005/12/01 01:12:55 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/LinearSOE.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef LinearSOE_h
00027 #define LinearSOE_h
00028 
00029 // File: ~/system_of_eqn/LinearSOE.h
00030 //
00031 // Written: fmk 
00032 // Created: 11/96
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for LinearSOE.
00036 // LinearSOE is an abstract base class and thus no objects of it's type
00037 // can be instantiated. It has pure virtual functions which must be
00038 // implemented in it's derived classes. LinearSystemOfEqn is an abstraction 
00039 // of the linear system of equation given by : [A]{X} = {B} - {C},
00040 // where A is a matrix and B,C and X are vectors. To solve the equation means
00041 // given A, B and C to find the unknown X such that the equation is satisfied.
00042 //
00043 // What: "@(#) LinearSOE.h, revA"
00044 
00045 #ifndef _bool_h
00046 #include <bool.h>
00047 #endif
00048 
00049 #include <SystemOfEqn.h>
00050 
00051 class LinearSOESolver;
00052 class Graph;
00053 class Matrix;
00054 class Vector;
00055 class ID;
00056 
00057 class LinearSOE : public SystemOfEqn
00058 {
00059   public:
00060     LinearSOE(LinearSOESolver &theSolver, int classTag);    
00061     virtual ~LinearSOE();
00062 
00063     virtual int solve(void);    
00064 
00065     // pure virtual functions
00066     virtual int setSize(Graph &theGraph) =0;    
00067     virtual int getNumEqn(void) const =0;
00068     
00069     virtual int addA(const Matrix &, const ID &, double fact = 1.0) =0;
00070     virtual int addB(const Vector &, const ID &, double fact = 1.0) =0;    
00071     virtual int setB(const Vector &, double fact = 1.0) =0;        
00072 
00073     virtual void zeroA(void) =0;
00074     virtual void zeroB(void) =0;
00075 
00076     virtual const Vector &getX(void) = 0;
00077     virtual const Vector &getB(void) = 0;    
00078     virtual double getDeterminant(void);
00079     virtual double normRHS(void) = 0;
00080 
00081     virtual void setX(int loc, double value) =0;
00082     virtual void setX(const Vector &X) =0;
00083     
00084     LinearSOESolver *getSolver(void);
00085     
00086   protected:
00087     int setSolver(LinearSOESolver &newSolver);          
00088     
00089   private:
00090     LinearSOESolver *theSolver;    
00091 };
00092 
00093 
00094 #endif
00095 

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