XC Open source finite element analysis program
SectionForceDeformation.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 1999, 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 ** ****************************************************************** */
46 
47 // $Revision: 1.9 $
48 // $Date: 2003/03/04 00:48:16 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/section/SectionForceDeformation.h,v $
50 
51 
52 #ifndef SectionForceDeformation_h
53 #define SectionForceDeformation_h
54 
55 // File: ~/material/SectionForceDeformation.h
56 //
57 // Written: MHS
58 // Created: Feb 2000
59 // Revision: A
60 //
61 // Description: This file contains the class definition for SectionForceDeformation.
62 // SectionForceDeformation is an abstract base class and thus no objects of it's type
63 // can be instantiated. It has pure virtual functions which must be
64 // implemented in it's derived classes.
65 //
66 // What: "@(#) SectionForceDeformation.h, revA"
67 
68 #include "material/Material.h"
69 
70 namespace XC {
71 
72 class Information;
73 class Response;
74 class Vector;
75 class Matrix;
76 class ResponseId;
77 class MaterialLoader;
78 
80 //
82 //
87  {
88  protected:
89  mutable Matrix *fDefault;
91 
92  int sendData(CommParameters &cp);
93  int recvData(const CommParameters &cp);
94  public:
95  SectionForceDeformation(int tag,int classTag,MaterialLoader *mat_ldr= nullptr);
98  virtual ~SectionForceDeformation(void);
99 
100  inline MaterialLoader *getMaterialLoader(void)
101  { return material_loader; }
102 
103  virtual void zeroInitialSectionDeformation(void)= 0;
104  virtual int setInitialSectionDeformation(const Vector &)= 0;
105  virtual int addInitialSectionDeformation(const Vector &);
106  inline void setInitialGeneralizedStrain(const Vector &iS)
107  { setInitialSectionDeformation(iS); }
108  const Vector &getInitialGeneralizedStrain(void) const
109  { return getInitialSectionDeformation(); }
110 
111 
112  virtual int setTrialSectionDeformation(const Vector &) = 0;
113  virtual const Vector &getInitialSectionDeformation(void) const= 0;
114  virtual const Vector &getSectionDeformation(void) const= 0;
115  double getSectionDeformation(const int &) const;
116  double getSectionDeformationByName(const std::string &) const;
117  virtual double getStrain(const double &y,const double &z= 0) const= 0;
118 
119  virtual const Vector &getStressResultant(void) const= 0;
120  double getStressResultant(const int &) const;
121  double getStressResultantByName(const std::string &) const;
122  virtual const Matrix &getSectionTangent(void) const= 0;
123  virtual const Matrix &getInitialTangent(void) const= 0;
124  virtual const Matrix &getSectionFlexibility(void) const;
125  virtual const Matrix &getInitialFlexibility(void) const;
126 
127  inline const Vector &getGeneralizedStress(void) const
128  { return getStressResultant(); }
129  virtual const Vector &getGeneralizedStrain(void) const
130  { return getSectionDeformation(); }
131 
132  virtual double getRho(void) const;
133 
134  virtual SectionForceDeformation *getCopy(void) const= 0;
135  virtual const ResponseId &getType(void) const= 0;
136  std::string getTypeString(void) const;
137  virtual int getOrder(void) const = 0;
138 
139  virtual Response *setResponse(const std::vector<std::string> &argv, Information &info);
140  virtual int getResponse(int responseID, Information &info);
141 
142 // AddingSensitivity:BEGIN //////////////////////////////////////////
143  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
144  virtual int updateParameter(int parameterID, Information &info);
145  virtual int activateParameter(int parameterID);
146  virtual const Vector &getStressResultantSensitivity(int gradNumber, bool conditional);
147  virtual const Vector &getSectionDeformationSensitivity(int gradNumber);
148  virtual const Matrix &getSectionTangentSensitivity(int gradNumber);
149  virtual double getRhoSensitivity(int gradNumber);
150  virtual int commitSensitivity(const Vector& sectionDeformationGradient, int gradNumber, int numGrads);
151 // AddingSensitivity:END ///////////////////////////////////////////
152  };
153 
154 } // end of XC namespace
155 
156 
157 #endif
Base class for materials.
Definition: Material.h:85
SectionForceDeformation & operator=(const SectionForceDeformation &otro)
Assignment operator.
Definition: SectionForceDeformation.cpp:93
Definition: Vector.h:82
int sendData(CommParameters &cp)
Send object members through the channel defined in cp.
Definition: SectionForceDeformation.cpp:394
Matrix * fDefault
Default flexibility matrix.
Definition: SectionForceDeformation.h:89
virtual SectionForceDeformation * getCopy(void) const =0
Virtual constructor.
virtual const Matrix & getInitialFlexibility(void) const
Returns the initial flexibility matrix of the section.
Definition: SectionForceDeformation.cpp:154
virtual int addInitialSectionDeformation(const Vector &)
Adds to the generalized strains vector inicial el being passed as parameter.
Definition: SectionForceDeformation.cpp:114
virtual double getRho(void) const
Returns the densidad (masa por unidad de longitud/area/volumen) of the section.
Definition: SectionForceDeformation.cpp:189
double getSectionDeformationByName(const std::string &) const
Returns section&#39;s trial deformation component by its name.
Definition: SectionForceDeformation.cpp:356
std::string getTypeString(void) const
Comma separated internal forces names to with the section contributes with stiffness.
Definition: SectionForceDeformation.cpp:109
Information about an element.
Definition: Information.h:80
SectionForceDeformation(int tag, int classTag, MaterialLoader *mat_ldr=nullptr)
Constructor.
Definition: SectionForceDeformation.cpp:81
MaterialLoader * material_loader
Material definition handler (search,...).
Definition: SectionForceDeformation.h:90
Stiffness material contribution response identifiers.
Definition: ResponseId.h:60
int recvData(const CommParameters &cp)
Receives object members through the channel defined in cp.
Definition: SectionForceDeformation.cpp:402
double getStressResultantByName(const std::string &) const
Returns the esfuerzos de la placa.
Definition: SectionForceDeformation.cpp:320
virtual int getResponse(int responseID, Information &info)
Returns section response.
Definition: SectionForceDeformation.cpp:265
virtual const Matrix & getSectionFlexibility(void) const
Returns the tangent flexibility matrix of the section.
Definition: SectionForceDeformation.cpp:120
Definition: Matrix.h:82
Material handler (definition, searching,...).
Definition: MaterialLoader.h:45
Definition: Parameter.h:65
Base class for force deformation section models. Constitutive equations of the section.
Definition: SectionForceDeformation.h:86
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71
virtual Response * setResponse(const std::vector< std::string > &argv, Information &info)
Returns the respuesta of the section.
Definition: SectionForceDeformation.cpp:246