xc
SectionForceDeformation.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 1999, 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.9 $
49 // $Date: 2003/03/04 00:48:16 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/material/section/SectionForceDeformation.h,v $
51 
52 
53 #ifndef SectionForceDeformation_h
54 #define SectionForceDeformation_h
55 
56 // File: ~/material/SectionForceDeformation.h
57 //
58 // Written: MHS
59 // Created: Feb 2000
60 // Revision: A
61 //
62 // Description: This file contains the class definition for SectionForceDeformation.
63 // SectionForceDeformation is an abstract base class and thus no objects of it's type
64 // can be instantiated. It has pure virtual functions which must be
65 // implemented in it's derived classes.
66 //
67 // What: "@(#) SectionForceDeformation.h, revA"
68 
69 #include "material/Material.h"
70 #include "utility/matrix/Matrix.h"
71 
72 namespace XC {
73 
74 class Information;
75 class Response;
76 class Vector;
77 class Matrix;
78 class ResponseId;
79 class MaterialHandler;
80 
82 //
84 //
89  {
90  protected:
91  mutable Matrix fDefault;
93 
94  int sendData(Communicator &comm);
95  int recvData(const Communicator &comm);
96  bool isEqual(const SectionForceDeformation &) const;
97  public:
98  SectionForceDeformation(int tag,int classTag,MaterialHandler *mat_ldr= nullptr);
99  inline virtual ~SectionForceDeformation(void) {}
100 
101  inline MaterialHandler *getMaterialHandler(void)
102  { return material_handler; }
103 
104  virtual void zeroInitialSectionDeformation(void)= 0;
105  virtual int setInitialSectionDeformation(const Vector &)= 0;
106  virtual int incrementInitialSectionDeformation(const Vector &);
107  inline void setInitialGeneralizedStrain(const Vector &iS)
108  { setInitialSectionDeformation(iS); }
109  inline const Vector &getInitialGeneralizedStrain(void) const
110  { return getInitialSectionDeformation(); }
111 
112 
116  virtual int setTrialSectionDeformation(const Vector &) = 0;
117  virtual const Vector &getInitialSectionDeformation(void) const= 0;
121  virtual const Vector &getSectionDeformation(void) const= 0;
122  double getSectionDeformation(const int &) const;
123  double getSectionDeformationByName(const std::string &) const;
124  virtual double getStrain(const double &y,const double &z= 0) const= 0;
125 
128  virtual const Vector &getStressResultant(void) const= 0;
129  double getStressResultant(const int &) const;
130  double getStressResultantByName(const std::string &) const;
133  virtual const Matrix &getSectionTangent(void) const= 0;
134  virtual const Matrix &getInitialTangent(void) const= 0;
135  virtual const Matrix &getSectionFlexibility(void) const;
136  virtual const Matrix &getInitialFlexibility(void) const;
137 
139  inline const Vector &getGeneralizedStress(void) const
140  { return getStressResultant(); }
142  virtual const Vector &getGeneralizedStrain(void) const
143  { return getSectionDeformation(); }
144  virtual Matrix getValues(const std::string &, bool silent= false) const;
145 
146  virtual double getRho(void) const;
147  virtual double getLinearRho(void) const;
148  virtual double getArealRho(void) const;
149  virtual double getVolumetricRho(void) const;
150 
152  virtual SectionForceDeformation *getCopy(void) const= 0;
161  virtual const ResponseId &getResponseType(void) const= 0;
162  std::string getResponseTypeString(void) const;
164  virtual int getOrder(void) const = 0;
165 
166  virtual Response *setResponse(const std::vector<std::string> &argv, Information &info);
167  virtual int getResponse(int responseID, Information &info);
168 
169  boost::python::dict getPyDict(void) const;
170  void setPyDict(const boost::python::dict &);
171 
172 // AddingSensitivity:BEGIN //////////////////////////////////////////
173  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
174  virtual int updateParameter(int parameterID, Information &info);
175  virtual int activateParameter(int parameterID);
176  virtual const Vector &getStressResultantSensitivity(int gradNumber, bool conditional);
177  virtual const Vector &getSectionDeformationSensitivity(int gradNumber);
178  virtual const Matrix &getSectionTangentSensitivity(int gradNumber);
179  virtual const Matrix &getSectionFlexibilitySensitivity(int gradIndex);
180  virtual const Matrix &getInitialTangentSensitivity(int gradIndex);
181  virtual const Matrix &getInitialFlexibilitySensitivity(int gradIndex);
182  virtual double getRhoSensitivity(int gradNumber);
183  virtual int commitSensitivity(const Vector& sectionDeformationGradient, int gradNumber, int numGrads);
184 // AddingSensitivity:END ///////////////////////////////////////////
185  virtual double getEnergy(void) const;
186  };
187 
188 } // end of XC namespace
189 
190 
191 #endif
virtual SectionForceDeformation * getCopy(void) const =0
Virtual constructor.
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
virtual int getResponse(int responseID, Information &info)
Returns section response.
Definition: SectionForceDeformation.cpp:273
virtual double getEnergy(void) const
Return the energy stored in the material.
Definition: SectionForceDeformation.cpp:533
virtual int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: SectionForceDeformation.cpp:478
Float vector abstraction.
Definition: Vector.h:94
virtual double getArealRho(void) const
Returns the mass per unit area of the section.
Definition: SectionForceDeformation.cpp:186
int sendData(Communicator &comm)
Send object members through the communicator argument.
Definition: SectionForceDeformation.cpp:440
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
virtual Response * setResponse(const std::vector< std::string > &argv, Information &info)
Returns the respuesta of the section.
Definition: SectionForceDeformation.cpp:254
Base class response objects.
Definition: Response.h:81
virtual double getRho(void) const
Returns the density (mass per unit length/area/volume) of the section.
Definition: SectionForceDeformation.cpp:174
virtual int incrementInitialSectionDeformation(const Vector &)
Adds to the generalized initial strains vector inicial the vector being passed as parameter...
Definition: SectionForceDeformation.cpp:109
virtual double getLinearRho(void) const
Returns the mass per unit length of the section.
Definition: SectionForceDeformation.cpp:178
double getSectionDeformationByName(const std::string &) const
Returns section&#39;s trial deformation component by its name.
Definition: SectionForceDeformation.cpp:402
Base class for materials.
Definition: Material.h:93
virtual const Vector & getStressResultant(void) const =0
Return the section resisting forces, , at the current trial state.
virtual int setTrialSectionDeformation(const Vector &)=0
Set the value of the trial section deformation vector, to be {def}.
int recvData(const Communicator &comm)
Receives object members through the communicator argument.
Definition: SectionForceDeformation.cpp:448
virtual Matrix getValues(const std::string &, bool silent=false) const
Return values of internal forces, deformations...
Definition: SectionForceDeformation.cpp:304
virtual double getVolumetricRho(void) const
Returns the mass per unit volume of the section.
Definition: SectionForceDeformation.cpp:194
const Vector & getGeneralizedStress(void) const
Return generalized stress.
Definition: SectionForceDeformation.h:139
virtual int getOrder(void) const =0
Return the number of response quantities provided by the section.
virtual const Vector & getGeneralizedStrain(void) const
Return generalized strain.
Definition: SectionForceDeformation.h:142
virtual const Matrix & getInitialFlexibility(void) const
Returns the initial flexibility matrix of the section.
Definition: SectionForceDeformation.cpp:147
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: SectionForceDeformation.cpp:464
virtual const Vector & getSectionDeformation(void) const =0
Return the section deformation vector, .
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: SectionForceDeformation.cpp:456
Stiffness material contribution response identifiers.
Definition: ResponseId.h:61
Vector getTrialSectionDeformation(void) const
Return the trial section deformation vector, .
Definition: SectionForceDeformation.cpp:336
SectionForceDeformation(int tag, int classTag, MaterialHandler *mat_ldr=nullptr)
Constructor.
Definition: SectionForceDeformation.cpp:83
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
std::string getResponseTypeString(void) const
Comma separated internal forces names to with the section contributes with stiffness.
Definition: SectionForceDeformation.cpp:104
MaterialHandler * material_handler
Material definition handler (search,...).
Definition: SectionForceDeformation.h:92
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
virtual int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: SectionForceDeformation.cpp:475
Parameter.
Definition: Parameter.h:68
virtual const Matrix & getSectionTangent(void) const =0
Return the section tangent stiffness matrix, , at the current trial state.
double getStressResultantByName(const std::string &) const
Returns the esfuerzos de la placa.
Definition: SectionForceDeformation.cpp:366
virtual const Matrix & getSectionFlexibility(void) const
Returns the tangent flexibility matrix of the section.
Definition: SectionForceDeformation.cpp:121
virtual const ResponseId & getResponseType(void) const =0
Return the ordering and type of response quantities returned by this object.
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: SectionForceDeformation.cpp:472
Matrix fDefault
Default flexibility matrix.
Definition: SectionForceDeformation.h:91
bool isEqual(const SectionForceDeformation &) const
Return true if both objects are equal.
Definition: SectionForceDeformation.cpp:87