BFGS.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/11/29 22:42:41 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/algorithm/equiSolnAlgo/BFGS.h,v $
00024                                                                         
00025 #ifndef BFGS_h
00026 #define BFGS_h
00027 
00028 // File: ~/OOP/analysis/algorithm/BFGS.h 
00029 // 
00030 // Written: Ed Love
00031 // Created: 06/01
00032 
00033 // Description: This file contains the class definition for
00034 // BFGS.
00035 // 
00036 // What: "@(#)BFGS.h, revA"
00037 
00038 #include <EquiSolnAlgo.h>
00039 #include <Vector.h>
00040 #include <IncrementalIntegrator.h>
00041 #include <LinearSOE.h> 
00042 
00043 class BFGS: public EquiSolnAlgo
00044 {
00045   public:
00046 
00047     BFGS(int tangent = CURRENT_TANGENT, int n = 10);    
00048     BFGS(ConvergenceTest &theTest, int tangent = CURRENT_TANGENT, int n = 10);
00049     ~BFGS();
00050 
00051     int solveCurrentStep(void);    
00052 
00053     int setConvergenceTest(ConvergenceTest *theNewTest);
00054     ConvergenceTest *getConvergenceTest(void);     
00055     
00056     virtual int sendSelf(int commitTag, Channel &theChannel);
00057     virtual int recvSelf(int commitTag, Channel &theChannel, 
00058                          FEM_ObjectBroker &theBroker);
00059 
00060     void Print(OPS_Stream &s, int flag =0);    
00061     
00062   protected:
00063     
00064   private:
00065 
00066     ConvergenceTest *theTest;
00067 
00068     ConvergenceTest *localTest;
00069     int tangent;
00070 
00071     int numberLoops;
00072 
00073     Vector **s;  //displacement increments
00074 
00075     Vector **z;  
00076 
00077     Vector *residOld;  //residuals
00078     Vector *residNew;
00079 
00080     Vector *du; //displacement increment
00081 
00082     Vector *b;  //current right-hand side
00083 
00084     Vector *temp; //temporary vector 
00085 
00086     double *rdotz;
00087 
00088     double *sdotr;
00089 
00090     void BFGSUpdate(IncrementalIntegrator *theIntegrator,
00091                     LinearSOE *theSOE,
00092                     Vector &du, 
00093                     Vector &b, 
00094                     int count);
00095   
00096 };
00097 
00098 #endif
00099 
00100 

Generated on Mon Oct 23 15:04:57 2006 for OpenSees by doxygen 1.5.0