xc
SearchWithStepSizeAndStepDirection.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 2001, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** Reliability module developed by: **
46 ** Terje Haukaas (haukaas@ce.berkeley.edu) **
47 ** Armen Der Kiureghian (adk@ce.berkeley.edu) **
48 ** **
49 ** ****************************************************************** */
50 
51 // $Revision: 1.4 $
52 // $Date: 2003/10/27 23:45:42 $
53 // $Source: /usr/local/cvs/OpenSees/SRC/reliability/analysis/designPoint/SearchWithStepSizeAndStepDirection.h,v $
54 
55 
56 //
57 // Written by Terje Haukaas (haukaas@ce.berkeley.edu)
58 //
59 
60 #ifndef SearchWithStepSizeAndStepDirection_h
61 #define SearchWithStepSizeAndStepDirection_h
62 
63 #include <reliability/analysis/designPoint/FindDesignPointAlgorithm.h>
64 #include <reliability/analysis/stepSize/StepSizeRule.h>
65 #include <reliability/analysis/direction/SearchDirection.h>
66 #include <reliability/analysis/transformation/ProbabilityTransformation.h>
67 #include <reliability/analysis/hessianApproximation/HessianApproximation.h>
68 #include <reliability/analysis/convergenceCheck/ReliabilityConvergenceCheck.h>
69 #include <utility/matrix/Matrix.h>
70 #include <utility/matrix/Vector.h>
71 #include <reliability/domain/components/ReliabilityDomain.h>
72 
73 #include <fstream>
74 using std::ofstream;
75 
76 namespace XC {
77  class GFunEvaluator;
78  class GradGEvaluator;
80 {
81 
82 public:
83 
84  // Constructor and destructor
86  int passedMaxNumberOfIterations,
87  GFunEvaluator *passedGFunEvaluator,
88  GradGEvaluator *passedGradGEvaluator,
89  StepSizeRule *passedStepSizeRule,
90  SearchDirection *passedSearchDirection,
91  ProbabilityTransformation *passedProbabilityTransformation,
92  HessianApproximation *theHessianApproximation,
93  ReliabilityConvergenceCheck *theReliabilityConvergenceCheck,
94  int printFlag,
95  const std::string &fileNamePrint,
96  Vector *startPoint);
97 
98  int findDesignPoint(ReliabilityDomain *theReliabilityDomain);
99 
100  Vector get_x();
101  Vector get_u();
102  Vector get_alpha();
103  Vector get_gamma();
104  int getNumberOfSteps();
105  Vector getSecondLast_u();
106  Vector getSecondLast_alpha();
107  Vector getLastSearchDirection();
108  double getFirstGFunValue();
109  double getLastGFunValue();
110  Vector getGradientInStandardNormalSpace();
111  int getNumberOfEvaluations();
112 
113 protected:
114 
115 private:
116 
117  // The reliability domain and tools for the analysis
118  ReliabilityDomain *theReliabilityDomain;
119  GFunEvaluator *theGFunEvaluator;
120  GradGEvaluator *theGradGEvaluator;
121  StepSizeRule *theStepSizeRule;
122  SearchDirection *theSearchDirection;
123  ProbabilityTransformation *theProbabilityTransformation;
124  HessianApproximation *theHessianApproximation;
125  ReliabilityConvergenceCheck *theReliabilityConvergenceCheck;
126 
127  // Private member functions to do the job
128  int doTheActualSearch(bool doRvProjection);
129  int doRvProjection(Vector uOld, Vector uNew);
130 
131  // Data members set when the object is created
132  int maxNumberOfIterations;
133 
134  // Data members where the results are to be stored
135  Vector x;
136  Vector u;
137  Vector alpha;
138  Vector gradientInStandardNormalSpace;
139  Vector gamma;
140  Vector uSecondLast;
141  Vector alphaSecondLast;
142  int i;
143  Vector searchDirection;
144  double Gfirst;
145  double Glast;
146 
147  // Data members set through the call when a job is to be done
148  Vector *startPoint;
149  Vector *designPoint_uStar;
150 
151  int printFlag;
152  std::string fileNamePrint;
153  int numberOfEvaluations;
154 };
155 } // end of XC namespace
156 
157 #endif
Float vector abstraction.
Definition: Vector.h:93
Definition: FindDesignPointAlgorithm.h:67
Definition: ReliabilityDomain.h:75
Definition: GradGEvaluator.h:69
Definition: SearchWithStepSizeAndStepDirection.h:79
Definition: HessianApproximation.h:66
Definition: SearchDirection.h:66
Definition: ReliabilityConvergenceCheck.h:66
Definition: GFunEvaluator.h:71
Definition: ProbabilityTransformation.h:67
Definition: StepSizeRule.h:66
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34