xc
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/fiber_list.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 FiberPtrDeque;
81  double get_strain(const double &y) const;
82  protected:
83 
84  public:
85  FiberSection2d(MaterialHandler *mat_ldr= nullptr);
86  FiberSection2d(int tag,MaterialHandler *mat_ldr= nullptr);
87  FiberSection2d(int tag,const fiber_list &fibers,MaterialHandler *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 MaterialHandler &,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 getCenterOfMassZ(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
Fiber section model in a bi-dimensional space.
Definition: FiberSection2d.h:74
const Matrix & getInitialTangent(void) const
Return the initial tangent stiffness matrix.
Definition: FiberSection2d.cpp:157
Base class for force deformation section models.
Definition: SectionForceDeformation.h:86
int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: FiberSection2d.cpp:272
Float vector abstraction.
Definition: Vector.h:93
virtual double getCenterOfMassZ(void) const
Returns the coordenada «z» del centro de gravedad of the cross-section.
Definition: FiberSection2d.h:122
Base class for fiber sections.
Definition: FiberSectionBase.h:57
Information about an element.
Definition: Information.h:80
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
std::list< Fiber * > fiber_list
fiber list.
Definition: fiber_list.h:36
Section fiber.
Definition: Fiber.h:89
int setInitialSectionDeformation(const Vector &deforms)
Sets values for initial strains.
Definition: FiberSection2d.cpp:143
int getOrder(void) const
Return the number of response quantities provided by the section.
Definition: FiberSection2d.cpp:166
const ResponseId & getType(void) const
Return the ordering and type of response quantities returned by this object.
Definition: FiberSection2d.cpp:163
int revertToStart(void)
Returns the section to its initial state.
Definition: FiberSection2d.cpp:178
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: FiberSection2d.cpp:216
Fiber pointers container.
Definition: FiberPtrDeque.h:66
Fiber * addFiber(Fiber &theFiber)
Adds a fiber to the section.
Definition: FiberSection2d.cpp:101
Stiffness material contribution response identifiers.
Definition: ResponseId.h:60
int revertToLastCommit(void)
Returns the section to its last commited state.
Definition: FiberSection2d.cpp:170
void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: FiberSection2d.cpp:198
Material handler (definition, searching,...).
Definition: MaterialHandler.h:45
int getResponse(int responseID, Information &info)
Returns section response.
Definition: FiberSection2d.cpp:206
SectionForceDeformation * getCopy(void) const
Virtual constructor.
Definition: FiberSection2d.cpp:160
int sendSelf(CommParameters &)
Send the object.
Definition: FiberSection2d.cpp:184
Fiber section representation.
Definition: FiberSectionRepr.h:78
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
int recvSelf(const CommParameters &)
Receive the object.
Definition: FiberSection2d.cpp:191
Definition: Parameter.h:65
FiberContainer fibers
Pointers to fibers container.
Definition: FiberSectionBase.h:68
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: FiberSection2d.cpp:245