xc
ResponseId.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 //ResponseId.h
29 //Stiffness material contribution response identifiers.
30 
31 #ifndef ResponseId_h
32 #define ResponseId_h
33 
34 #include "utility/matrix/ID.h"
35 
36 namespace XC {
37  class Channel;
38  class FEM_ObjectBroker;
39 
40 
41 const int SECTION_RESPONSE_MZ= 1; // Curvature about the section z-axis
42 const int SECTION_RESPONSE_P= 2; // Axial strain
43 const int SECTION_RESPONSE_VY= 3;
44 const int SECTION_RESPONSE_MY= 4; // Curvature about the section y-axis
45 const int SECTION_RESPONSE_VZ= 5;
46 const int SECTION_RESPONSE_T= 6; // Torsion.
47 
48 
49 const int MEMBRANE_RESPONSE_n1= 11; // Axial force per unit length, parallel to axis 1
50 const int MEMBRANE_RESPONSE_n2= 12; // Axial force per unit length, parallel to axis 2
51 const int MEMBRANE_RESPONSE_n12= 13; // In-plane shear force per unit length.
52 const int PLATE_RESPONSE_m1= 14; // Bending moment per unit length, parallel to axis 1.
53 const int PLATE_RESPONSE_m2= 15; // Bending moment per unit length, parallel to axis 2.
54 const int PLATE_RESPONSE_m12= 16; // Torque per unit length.
55 const int PLATE_RESPONSE_q13= 17; // Shear force per unit length, perpendicular to axis 1 and parallel to axis 3.
56 const int PLATE_RESPONSE_q23= 18; // Shear force per unit length, perpendicular to axis 2 and parallel to axis 3.
57 
58 const int SOLID_MECHANICS_RESPONSE_sigma_11= 19; // Solid mechanics.
59 const int SOLID_MECHANICS_RESPONSE_sigma_22= 20;
60 const int SOLID_MECHANICS_RESPONSE_sigma_33= 21;
61 const int SOLID_MECHANICS_RESPONSE_sigma_12= 22;
62 const int SOLID_MECHANICS_RESPONSE_sigma_23= 23;
63 const int SOLID_MECHANICS_RESPONSE_sigma_13= 24;
64 
65 //
68 class ResponseId: public ID
69  {
70  public:
71  ResponseId(int sz= 0);
72  ResponseId(const std::deque<std::string> &);
73  ResponseId(const std::vector<std::string> &);
74  explicit ResponseId(const boost::python::list &);
75  //ResponseId(int *, int size, bool cleanIt = false);
76  explicit ResponseId(const ID &);
77  bool hasResponse(const int &) const;
78  bool hasResponse(const std::string &) const;
79  virtual int getComponentIdFromString(const std::string &str) const;
80  virtual std::string getStringFromComponentId(const int &ri) const;
81  std::string getString(void) const;
82  boost::python::list getStringIdentifiers(void) const;
83  boost::python::list getIdentifiers(void) const;
84 
85  std::deque<int> getComponentIndexesFromCode(const int &) const;
86  std::deque<int> getComponentIndexesFromCode(const std::string &) const;
87  boost::python::list getComponentIndexesFromCodePy(const int &code) const;
88  boost::python::list getComponentIndexesFromCodePy(const std::string &code) const;
89  };
90 
91 class RespP: public ResponseId
92  {
93  public:
94  RespP(void);
95  int getComponentIdFromString(const std::string &str) const;
96  std::string getStringFromComponentId(const int &ri) const;
97  };
98 
99 class RespPMz: public ResponseId
100  {
101  public:
102  RespPMz(void);
103  int getComponentIdFromString(const std::string &str) const;
104  std::string getStringFromComponentId(const int &ri) const;
105  };
106 
107 class RespPMzV: public ResponseId
108  {
109  public:
110  RespPMzV(void);
111  int getComponentIdFromString(const std::string &str) const;
112  std::string getStringFromComponentId(const int &ri) const;
113  };
114 
115 class RespVyP: public ResponseId
116  {
117  public:
118  RespVyP(void);
119  int getComponentIdFromString(const std::string &str) const;
120  std::string getStringFromComponentId(const int &ri) const;
121  };
122 
123 class RespPMzMy: public ResponseId
124  {
125  public:
126  RespPMzMy(void);
127  int getComponentIdFromString(const std::string &str) const;
128  std::string getStringFromComponentId(const int &ri) const;
129  };
130 
131 class RespPMzMyT: public ResponseId
132  {
133  public:
134  RespPMzMyT(void);
135  int getComponentIdFromString(const std::string &str) const;
136  std::string getStringFromComponentId(const int &ri) const;
137  };
138 
140  {
141  public:
142  RespPMzVyMyVzT(void);
143  int getComponentIdFromString(const std::string &str) const;
144  std::string getStringFromComponentId(const int &ri) const;
145  };
146 
148  {
149  public:
151  };
152 
154  {
155  public:
157  };
158 
159 class RespPVyMz: public RespPMzV
160  {
161  public:
162  RespPVyMz(void);
163  };
164 
166  {
167  public:
168  RespMembraneMaterial(void);
169  int getComponentIdFromString(const std::string &str) const;
170  std::string getStringFromComponentId(const int &ri) const;
171  };
172 
174  {
175  public:
176  RespPlateMaterial(void);
177  int getComponentIdFromString(const std::string &str) const;
178  std::string getStringFromComponentId(const int &ri) const;
179  };
180 
182  {
183  public:
184  RespShellMaterial(void);
185  int getComponentIdFromString(const std::string &str) const;
186  std::string getStringFromComponentId(const int &ri) const;
187  };
188 
190  {
191  public:
193  int getComponentIdFromString(const std::string &str) const;
194  std::string getStringFromComponentId(const int &ri) const;
195  };
196 
198  {
199  public:
201  int getComponentIdFromString(const std::string &str) const;
202  std::string getStringFromComponentId(const int &ri) const;
203  };
204 
206  {
207  public:
209  int getComponentIdFromString(const std::string &str) const;
210  std::string getStringFromComponentId(const int &ri) const;
211  };
212 
213 const RespP RespElasticSection1d;
214 const RespPMz RespElasticSection2d;
215 const RespPMzV RespElasticShSection2d;
216 const RespVyP RespBidirectional;
217 const RespPMzMy RespFiberSection3d;
218 const RespPMzMyT RespElasticSection3d;
219 const RespPMzVyMyVzT RespElasticShSection3d;
220 const RespFiberSectionShear2d RespFiberSectionSh2d;
221 const RespFiberSectionShear3d RespFiberSectionSh3d;
222 const RespPVyMz RespIsolator2spring;
223 const RespMembraneMaterial RespMembraneMat;
224 const RespPlateMaterial RespPlateMat;
225 const RespShellMaterial RespShellMat;
226 const RespSolidMecanics1DMaterial RespSolidMechanics1D;
227 const RespSolidMecanics2DMaterial RespSolidMechanics2D;
228 const RespSolidMecanics3DMaterial RespSolidMechanics3D;
229 
230 } // end of XC namespace
231 
232 #endif
Definition: ResponseId.h:153
virtual int getComponentIdFromString(const std::string &str) const
Return the identifier of the response component from the given label (something like &#39;Mz&#39; or &#39;N&#39;...
Definition: ResponseId.cc:167
Definition: ResponseId.h:99
Definition: ResponseId.h:123
bool hasResponse(const int &) const
Return true if the given response identifier is found in this object.
Definition: ResponseId.cc:68
Definition: ResponseId.h:159
virtual std::string getStringFromComponentId(const int &ri) const
Return the label corresponding to the response component identified by the given code.
Definition: ResponseId.cc:205
Definition: ResponseId.h:173
Vector of integers.
Definition: ID.h:95
Definition: ResponseId.h:139
boost::python::list getComponentIndexesFromCodePy(const int &code) const
Return the strain or stress vector indexes corresponding to the given code.
Definition: ResponseId.cc:144
boost::python::list getStringIdentifiers(void) const
Return the response identifiers in text form in a Python list.
Definition: ResponseId.cc:97
Definition: ResponseId.h:181
Definition: ResponseId.h:107
Definition: ResponseId.h:147
boost::python::list getIdentifiers(void) const
Return the response identifiers in a Python list.
Definition: ResponseId.cc:110
Stiffness material contribution response identifiers.
Definition: ResponseId.h:68
std::deque< int > getComponentIndexesFromCode(const int &) const
Return the strain or stress vector indexes corresponding to the given code.
Definition: ResponseId.cc:124
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
std::string getString(void) const
Return the response identifiers in text form as comma separated values in a string.
Definition: ResponseId.cc:83
Definition: ResponseId.h:165
Definition: ResponseId.h:205
Definition: ResponseId.h:197
Definition: ResponseId.h:115
Definition: ResponseId.h:189
Definition: ResponseId.h:131
Definition: ResponseId.h:91