ConjugateGradientSolver.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:29 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/system_of_eqn/linearSOE/cg/ConjugateGradientSolver.h,v $
00024                                                                         
00025                                                                         
00026 // File: ~/system_of_eqn/linearSOE/ConjugateGradientSolver.h
00027 //
00028 // Written: fmk 
00029 // Created: 06/00
00030 // Revision: A
00031 //
00032 // Description: This file contains the class definition for 
00033 // ConjugateGradientSolver. ConjugateGradientSolver is an abstract 
00034 // that implements the method solve and which declares a method
00035 // formAp to be pure virtual.
00036 //
00037 // What: "@(#) ConjugateGradientSolver.h, revA"
00038 
00039 #ifndef ConjugateGradientSolver_h
00040 #define ConjugateGradientSolver_h
00041 
00042 #include <LinearSOESolver.h>
00043 class LinearSOE;
00044 class Vector;
00045 
00046 class ConjugateGradientSolver : public LinearSOESolver
00047 {
00048   public:
00049     ConjugateGradientSolver(int classTag, LinearSOE *theLinearSOE, double tol);    
00050     virtual ~ConjugateGradientSolver();
00051 
00052     virtual int setSize(void);    
00053     virtual int solve(void);
00054     virtual int formAp(const Vector &p, Vector &Ap) = 0;    
00055 //    virtual int setLinearSOE(LinearSOE &theSOE) =0;
00056 
00057   protected:
00058     
00059   private:
00060     Vector *r, *p, *Ap, *x;
00061     LinearSOE *theLinearSOE;
00062     double tolerance;
00063 };
00064 
00065 #endif
00066 

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