XC Open source finite element analysis program
FiberSection2d.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.10 $
48 // $Date: 2003/03/04 00:48:16 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/section/fiber_section/FiberSection2d.h,v $
50 
51 // Written: fmk
52 // Created: 04/01
53 //
54 // Description: This file contains the class definition for
55 // FiberSection2d.h. FiberSection2d provides the abstraction of a
56 // 2d beam section discretized by fibers. The section stiffness and
57 // stress resultants are obtained by summing fiber contributions.
58 
59 #ifndef FiberSection2d_h
60 #define FiberSection2d_h
61 
62 #include <material/section/fiber_section/FiberSectionBase.h>
63 #include <material/section/repres/section/contenedor_fibras.h>
64 #include <utility/matrix/Vector.h>
65 #include <utility/matrix/Matrix.h>
66 
67 namespace XC {
68 class FiberSectionRepr;
69 
71 //
75  {
76  private:
77 // AddingSensitivity:BEGIN //////////////////////////////////////////
78  int parameterID;
79 // AddingSensitivity:END ///////////////////////////////////////////
80  friend class DqFibras;
81  double get_strain(const double &y) const;
82  protected:
83 
84  public:
85  FiberSection2d(MaterialLoader *mat_ldr= nullptr);
86  FiberSection2d(int tag,MaterialLoader *mat_ldr= nullptr);
87  FiberSection2d(int tag,const contenedor_fibras &fibers,MaterialLoader *mat_ldr= nullptr);
88 
89  int setInitialSectionDeformation(const Vector &deforms);
90  int setTrialSectionDeformation(const Vector &deforms);
91  virtual double getStrain(const double &y,const double &z= 0) const;
92 
93  virtual void setupFibers(void);
94 
95  const Matrix &getInitialTangent(void) const;
96 
97  int revertToLastCommit(void);
98  int revertToStart(void);
99 
100  SectionForceDeformation *getCopy(void) const;
101  const ResponseId &getType (void) const;
102  int getOrder(void) const;
103 
104  int sendSelf(CommParameters &);
105  int recvSelf(const CommParameters &);
106  void Print(std::ostream &s, int flag = 0);
107 
108  int getResponse(int responseID, Information &info);
109 
110  Fiber *addFiber(Fiber &theFiber);
111  Fiber *addFiber(int tag,const MaterialLoader &,const std::string &nmbMat,const double &, const Vector &position);
112 
113  // AddingSensitivity:BEGIN //////////////////////////////////////////
114  int setParameter(const std::vector<std::string> &argv, Parameter &param);
115  int updateParameter(int parameterID, Information &info);
116  int activateParameter(int parameterID);
117  const Vector & getStressResultantSensitivity(int gradNumber, bool conditional);
118  const Vector & getSectionDeformationSensitivity(int gradNumber);
119  const Matrix & getSectionTangentSensitivity(int gradNumber);
120  int commitSensitivity(const Vector& sectionDeformationGradient, int gradNumber, int numGrads);
121  // AddingSensitivity:END ///////////////////////////////////////////
122  inline virtual double getCdgZ(void) const
123  { return 0.0; }
124 
125  };
126 
127 FiberSection2d FiberSectionReprToFiberSection2d(const int &tag,const FiberSectionRepr &fiberSectionRepr);
128 } // end of XC namespace
129 
130 #endif
int revertToLastCommit(void)
Returns the section to its last commited state.
Definition: FiberSection2d.cpp:170
int getResponse(int responseID, Information &info)
Returns section response.
Definition: FiberSection2d.cpp:206
std::list< Fiber * > contenedor_fibras
Contenedor de fibras.
Definition: contenedor_fibras.h:36
Definition: Vector.h:82
Fiber section model in a bi-dimensional space. Sections stiffness and internal forces are obtained by...
Definition: FiberSection2d.h:74
int setInitialSectionDeformation(const Vector &deforms)
Sets values for initial strains.
Definition: FiberSection2d.cpp:143
int setTrialSectionDeformation(const Vector &deforms)
Sets values for trial strains.
Definition: FiberSection2d.cpp:150
virtual double getStrain(const double &y, const double &z=0) const
Returns the strains in the position being passed as parameter.
Definition: FiberSection2d.cpp:135
Information about an element.
Definition: Information.h:80
const Matrix & getInitialTangent(void) const
Return the initial tangent stiffness matrix.
Definition: FiberSection2d.cpp:157
Stiffness material contribution response identifiers.
Definition: ResponseId.h:60
Fiber * addFiber(Fiber &theFiber)
Adds a fiber to the section.
Definition: FiberSection2d.cpp:101
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: FiberSection2d.cpp:198
Fiber section representation.
Definition: FiberSectionRepr.h:78
Contenedor de fibras.
Definition: DqFibras.h:66
Definition: Matrix.h:82
int revertToStart(void)
Returns the section to its initial state.
Definition: FiberSection2d.cpp:178
SectionForceDeformation * getCopy(void) const
Virtual constructor.
Definition: FiberSection2d.cpp:160
Material handler (definition, searching,...).
Definition: MaterialLoader.h:45
Section fiber.
Definition: Fiber.h:89
Definition: Parameter.h:65
Base class for fiber sections.
Definition: FiberSectionBase.h:57
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
virtual double getCdgZ(void) const
Returns the coordenada «z» del centro de gravedad of the cross-section.
Definition: FiberSection2d.h:122