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

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.2 $
00022 // $Date: 2001/02/17 06:32:38 $
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 #include <LinearSOESolver.h>
00052 #include <Graph.h>
00053 #include <Matrix.h>
00054 #include <Vector.h>
00055 #include <ID.h>
00056 
00084 class LinearSOE : public SystemOfEqn
00085 {
00086   public:
00092     LinearSOE(LinearSOESolver &theSolver, int classTag);    
00093 
00097     virtual ~LinearSOE();
00098 
00099 
00107     virtual int solve(void);    
00108 
00109 
00111     virtual int setSize(Graph &theGraph) =0;    
00116     virtual int getNumEqn(void) const =0;
00117 
00118     
00128     virtual int addA(const Matrix &, const ID &, double fact = 1.0) =0;
00129 
00138     virtual int addB(const Vector &, const ID &, double fact = 1.0) =0;    
00139 
00145     virtual int setB(const Vector &, double fact = 1.0) =0;        
00146 
00147 
00151     virtual void zeroA(void) =0;
00152 
00156     virtual void zeroB(void) =0;
00157 
00158 
00164     virtual const Vector &getX(void) = 0;
00165 
00171     virtual const Vector &getB(void) = 0;    
00172 
00174     virtual double getDeterminant(void);
00175 
00177     virtual double normRHS(void) = 0;
00178 
00180     virtual void setX(int loc, double value) =0;
00181     
00182   protected:
00184     int setSolver(LinearSOESolver &newSolver);         
00186     LinearSOESolver *getSolver(void);
00187     
00188   private:
00190     LinearSOESolver *theSolver;    
00191 };
00192 
00193 
00194 #endif
00195 
Copyright Contact Us