xc
LinearBucklingAnalysis.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 //LinearBucklingAnalysis.h
29 
30 
31 #ifndef LinearBucklingAnalysis_h
32 #define LinearBucklingAnalysis_h
33 
34 
35 // Description: This file contains the interface for the LinearBucklingAnalysis
36 // class. LinearBucklingAnalysis is a subclass of StaticAnalysis, it is used to perform
37 // a linear buckling analysis on the FE\_Model.
38 
39 #include <solution/analysis/analysis/StaticAnalysis.h>
40 #include "LinearBucklingEigenAnalysis.h"
41 
42 
43 namespace XC {
44 class ConvergenceTest;
45 class EigenAnalysis;
46 class LinearBucklingAlgo;
47 class LinearBucklingIntegrator;
48 class Vector;
49 class ArpackSOE;
50 class ArpackSolver;
51 
53 //
56  {
57  private:
58  SolutionStrategy *eigen_solu;
59  LinearBucklingEigenAnalysis linearBucklingEigenAnalysis;
60  int numModes;
61  int linear_buckling_analysis_step;
62  protected:
63  friend class SolutionProcedure;
65  Analysis *getCopy(void) const;
66  public:
67  void clearAll(void);
68 
69  int analyze(int numSteps);
70  int domainChanged(void);
71 
72  int getNumModes(void) const
73  { return numModes; }
74  void setNumModes(const int &nm)
75  { numModes= nm; }
76 
77  int getLinearBucklingAnalysisStep(void) const
78  { return this->linear_buckling_analysis_step; }
79  void setLinearBucklingAnalysisStep(const int &i)
80  { linear_buckling_analysis_step= i; }
81 
82  inline const LinearBucklingEigenAnalysis &getEigenAnalysis(void) const
83  { return linearBucklingEigenAnalysis; }
84  inline LinearBucklingEigenAnalysis &getEigenAnalysis(void)
85  { return linearBucklingEigenAnalysis; }
86 
89  int setArpackSOE(ArpackSOE &theSOE);
90 
91  virtual const Vector &getEigenvector(int mode);
92  virtual Vector getNormalizedEigenvector(int mode);
93  boost::python::list getNormalizedEigenvectorPy(int mode) const;
94  boost::python::list getNormalizedEigenvectorsPy(void) const;
95  virtual const double &getEigenvalue(int mode) const;
96  boost::python::list getEigenvaluesPy(void) const;
97  };
98 
101  { return new LinearBucklingAnalysis(*this); }
102 } // end of XC namespace
103 
104 #endif
int setLinearBucklingIntegrator(LinearBucklingIntegrator &)
the integrator to use in the analysis de eigenvalues.
Definition: LinearBucklingAnalysis.cc:111
virtual const Vector & getEigenvector(int mode)
Returns the eigenvector that corresponds to the mode being passed as parameter.
Definition: LinearBucklingAnalysis.cc:120
boost::python::list getEigenvaluesPy(void) const
Returns a Python list with the computed eigenvalues for each mode.
Definition: LinearBucklingAnalysis.cc:144
Algorithm for linear buckling analysis.
Definition: LinearBucklingAlgo.h:79
Float vector abstraction.
Definition: Vector.h:94
int analyze(int numSteps)
Performs the analysis.
Definition: LinearBucklingAnalysis.cc:67
LinearBucklingAnalysis(SolutionStrategy *, SolutionStrategy *)
Constructor.
Definition: LinearBucklingAnalysis.cc:49
virtual Vector getNormalizedEigenvector(int mode)
Returns the normalized eigenvector that corresponds to the mode being passed as parameter.
Definition: LinearBucklingAnalysis.cc:125
performs a static analysis on the FE_Model.
Definition: StaticAnalysis.h:79
Base class for the object that perform the analysis.
Definition: Analysis.h:117
int domainChanged(void)
Make the changes that a domain change requires.
Definition: LinearBucklingAnalysis.cc:98
void clearAll(void)
Clears all object members (constraint handler, analysis model,...).
Definition: LinearBucklingAnalysis.cc:55
Linear buckling analysis.
Definition: LinearBucklingAnalysis.h:55
LinearBucklingIntegrator is an algorithmic class for setting up the finite element equations for a li...
Definition: LinearBucklingIntegrator.h:49
virtual const double & getEigenvalue(int mode) const
Returns the eigenvalue that corresponds to the mode being passed as parameter.
Definition: LinearBucklingAnalysis.cc:140
int setArpackSOE(ArpackSOE &theSOE)
Sets the linear system of equations to use in the analysis de eigenvalues.
Definition: LinearBucklingAnalysis.cc:115
Solution procedure for the finite element problem.
Definition: SolutionProcedure.h:57
Eigenvalue analysis for linear buckling analysis (used inside an StaticAnalysis). ...
Definition: LinearBucklingEigenAnalysis.h:44
Analysis * getCopy(void) const
Virtual constructor.
Definition: LinearBucklingAnalysis.h:100
Solution strategy for the finite element problem.
Definition: SolutionStrategy.h:94
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Arpack++ based system of equations.
Definition: ArpackSOE.h:40
boost::python::list getNormalizedEigenvectorsPy(void) const
Returns a Python list with the computed eigenvectors as lists.
Definition: LinearBucklingAnalysis.cc:129
int setLinearBucklingAlgorithm(LinearBucklingAlgo &)
Set the solution algorithm to use for linear buckling analysis.
Definition: LinearBucklingAnalysis.cc:106
boost::python::list getNormalizedEigenvectorPy(int mode) const
Return a Python list with the component of the eigenvector corresponding to the given mode...
Definition: LinearBucklingAnalysis.cc:135