xc
LineSearch.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 2001, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.3 $
49 // $Date: 2003/02/14 23:00:42 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/algorithm/equiSolnAlgo/LineSearch.h,v $
51 
52 #ifndef LineSearch_h
53 #define LineSearch_h
54 
55 // Written: fmk
56 // Created: 11/01
57 
58 // Description: This file contains the class definition for
59 // LineSearch. LineSearch is an abstract base class,
60 // i.e. no objects of it's type can be created. Its subclasses seek
61 // to find a better solution to R(U)=0 than the solution Ui-1 + delta Ui
62 // would give, typically Ui = Ui-1 + factor * delta Ui.
63 //
64 // What: "@(#)LineSearch.h, revA"
65 
66 #include <utility/actor/actor/MovableObject.h>
67 #include "utility/kernel/CommandEntity.h"
68 #include <iostream>
69 #include "utility/matrix/Vector.h"
70 
71 namespace XC {
72 class SolutionAlgorithm;
73 class IncrementalIntegrator;
74 class LinearSOE;
75 
79 //
81 //
83 //
87 class LineSearch: public MovableObject, public CommandEntity
88  {
89  protected:
90  Vector x;
91  double tolerance;
92  int maxIter;
93  double minEta;
94  double maxEta;
95  int printFlag;
96 
97 
98  friend class NewtonLineSearch;
99  LineSearch(int classTag,const double &tol= 0.8, const int &mi= 10,const double &mneta= 0.1,const double &mxeta= 10,const int &flag= 1);
100  virtual LineSearch *getCopy(void) const= 0;
101  int updateAndUnbalance(IncrementalIntegrator &);
102  public:
103  inline virtual ~LineSearch(void) {}
104  // virtual functions
105  virtual int newStep(LinearSOE &theSOE);
106  virtual int search(double s0,
107  double s1,
108  LinearSOE &theSOE,
109  IncrementalIntegrator &theIntegrator) =0;
110  int sendSelf(Communicator &);
111  int recvSelf(const Communicator &);
112  void Print(std::ostream &s, int flag =0) const;
113 
114  };
115 } // end of XC namespace
116 
117 #endif
118 
119 
Float vector abstraction.
Definition: Vector.h:94
Communication parameters between processes.
Definition: Communicator.h:66
Linear system of equations.
Definition: LinearSOE.h:92
Object that can move between processes.
Definition: MovableObject.h:100
int sendSelf(Communicator &)
Send the object.
Definition: LineSearch.cpp:96
performs a Newton-Raphson with line search solution algorithm in solving the equations as outline in ...
Definition: NewtonLineSearch.h:88
Objet that can execute python scripts.
Definition: CommandEntity.h:40
IncrementalIntegrator is an algorithmic class for setting up the finite element equations in an incre...
Definition: IncrementalIntegrator.h:100
int recvSelf(const Communicator &)
Receive the object.
Definition: LineSearch.cpp:99
Base class for line search algorithms.
Definition: LineSearch.h:87
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35