xc
SectionAggregator.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.10 $
49 // $Date: 2003/02/25 23:33:34 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/material/section/SectionAggregator.h,v $
51 
52 
53 // File: ~/section/SectionAggregator.h
54 //
55 // Written: MHS
56 // Created: Jun 2000
57 // Revision: A
58 //
59 // Description: This file contains the class definition for
60 // SectionAggregator. SectionAggregator decorates an MP
61 // section (couple bending and axial) with an uncoupled shear
62 // relation.
63 //
64 // What: "@(#) SectionAggregator.h, revA"
65 
66 #ifndef SectionAggregator_h
67 #define SectionAggregator_h
68 
69 #include <material/section/PrismaticBarCrossSection.h>
70 #include <material/section/AggregatorAdditions.h>
71 
72 namespace XC {
73 //
79  {
80  private:
81  PrismaticBarCrossSection *theSection;
82  AggregatorAdditions theAdditions;
83 
84  mutable Vector def;
85  mutable Vector defzero;
86  mutable Vector s;
87  mutable Matrix ks;
88  mutable Matrix fs;
89  mutable ResponseId theCode;
90 
91  static double workArea[];
92  //static int codeArea[];
93 
94  void copy_section(const SectionForceDeformation *);
95  void resize(void);
96  void free_mem(void);
97  protected:
98  int sendData(Communicator &);
99  int recvData(const Communicator &);
100 
101  public:
102  SectionAggregator(MaterialHandler *mat_ldr= nullptr);
103  SectionAggregator(int tag,MaterialHandler *mat_ldr= nullptr);
104  SectionAggregator(int tag, PrismaticBarCrossSection &theSection,const AggregatorAdditions &theAdditions,MaterialHandler *mat_ldr= nullptr);
105  SectionAggregator(int tag, const AggregatorAdditions &theAdditions,MaterialHandler *mat_ldr= nullptr);
106  SectionAggregator(int tag, PrismaticBarCrossSection &thesection, UniaxialMaterial &theAddition, int c,MaterialHandler *mat_ldr= nullptr);
109  ~SectionAggregator(void);
110 
111  const double &EA(void) const;
112  const double &EIz(void) const;
113  const double &EIy(void) const;
114  const double &EIyz(void) const;
115  const double &GAy(void) const;
116  const double &GAz(void) const;
117  const double &GJ(void) const;
118 
119  inline PrismaticBarCrossSection *getSection(void)
120  { return theSection; }
121  void setSection(const std::string &sectionName);
122  inline AggregatorAdditions &getAdditions(void)
123  { return theAdditions; }
124  void setAdditions(const std::vector<std::string> &,const std::vector<std::string> &);
125  void setAdditionsPyList(const boost::python::list &,const boost::python::list &);
126 
127 
128  int setInitialSectionDeformation(const Vector &deforms);
129  int setTrialSectionDeformation(const Vector &deforms);
130  virtual double getStrain(const double &y,const double &z) const;
132  const Vector &getInitialSectionDeformation(void) const;
133  const Vector &getSectionDeformation(void) const;
134  const Vector &getStressResultant(void) const;
135  const Matrix &getSectionTangent(void) const;
136  const Matrix &getInitialTangent(void) const;
137  const Matrix &getSectionFlexibility(void) const;
138  const Matrix &getInitialFlexibility(void) const;
139 
140  int commitState(void);
141  int revertToLastCommit(void);
142  int revertToStart(void);
143 
144  SectionForceDeformation *getCopy(void) const;
145  const ResponseId &getResponseType(void) const;
146  int getOrder(void) const;
147 
148  int sendSelf(Communicator &);
149  int recvSelf(const Communicator &);
150 
151  void Print(std::ostream &s, int flag =0) const;
152 
153  Response *setResponse(const std::vector<std::string> &argv, Information &info);
154  int getResponse(int responseID, Information &info);
155 
156  int setVariable(const std::string &argv);
157  int getVariable(int variableID, double &info);
158 
159  };
160 } // end of XC namespace
161 
162 #endif
int getVariable(int variableID, double &info)
Returns the value of the variable which identifier is being passed as parameter.
Definition: SectionAggregator.cpp:737
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
const double & GAy(void) const
Returns the shear stiffness along y axis.
Definition: SectionAggregator.cpp:338
Float vector abstraction.
Definition: Vector.h:94
const double & EIy(void) const
Returns the bending stiffness of the cross-section with respect to eht y axis.
Definition: SectionAggregator.cpp:310
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: SectionAggregator.cpp:609
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: SectionAggregator.cpp:656
SectionAggregator decorates an MP section (couple bending and axial) with an uncoupled shear relation...
Definition: SectionAggregator.h:78
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
const Matrix & getSectionTangent(void) const
Returns the tangent stiffness matrix.
Definition: SectionAggregator.cpp:455
Base class response objects.
Definition: Response.h:81
~SectionAggregator(void)
destructor:
Definition: SectionAggregator.cpp:275
pointers to UniaxialMaterial with the degree of freedom associated to each of them (used in SectionAg...
Definition: AggregatorAdditions.h:44
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
const double & GAz(void) const
Returns the shear stiffness along z axis.
Definition: SectionAggregator.cpp:348
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:53
const Matrix & getInitialFlexibility(void) const
Returns the initial flexibility matrix.
Definition: SectionAggregator.cpp:515
const Matrix & getSectionFlexibility(void) const
Returns the flexibility matrix.
Definition: SectionAggregator.cpp:496
const ResponseId & getResponseType(void) const
Section stiffness contribution response identifiers.
Definition: SectionAggregator.cpp:551
int setVariable(const std::string &argv)
Returns the identifier of the variable which name is being passed as parameter.
Definition: SectionAggregator.cpp:722
SectionAggregator(MaterialHandler *mat_ldr=nullptr)
Default constructor.
Definition: SectionAggregator.cpp:181
const double & EIz(void) const
Returns the bending stiffness of the cross-section en torno the z axis.
Definition: SectionAggregator.cpp:296
XC::SectionAggregator & operator=(const SectionAggregator &)
Assignment operator.
Definition: SectionAggregator.cpp:195
Response * setResponse(const std::vector< std::string > &argv, Information &info)
Returns the respuesta of the section.
Definition: SectionAggregator.cpp:696
int revertToLastCommit(void)
Returns the material to the las committed state.
Definition: SectionAggregator.cpp:585
const Vector & getStressResultant(void) const
Returns the stress resultant.
Definition: SectionAggregator.cpp:535
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: SectionAggregator.cpp:639
const Vector & getInitialSectionDeformation(void) const
Returns material initial generalized strain.
Definition: SectionAggregator.cpp:423
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: SectionAggregator.cpp:679
int getOrder(void) const
Returns the order of the section.
Definition: SectionAggregator.cpp:566
Stiffness material contribution response identifiers.
Definition: ResponseId.h:68
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: SectionAggregator.cpp:624
const Matrix & getInitialTangent(void) const
Returns the initial tangent stiffness matrix.
Definition: SectionAggregator.cpp:476
int getResponse(int responseID, Information &info)
Returns section response.
Definition: SectionAggregator.cpp:713
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
const double & EA(void) const
Returns the section axial stiffness.
Definition: SectionAggregator.cpp:283
SectionForceDeformation * getCopy(void) const
Virtual constructor.
Definition: SectionAggregator.cpp:279
const double & EIyz(void) const
Returns the product of inertia multiplied by the Young modulus.
Definition: SectionAggregator.cpp:324
int setTrialSectionDeformation(const Vector &deforms)
Sets trial strain.
Definition: SectionAggregator.cpp:387
const double & GJ(void) const
Returns the torsional stiffness.
Definition: SectionAggregator.cpp:358
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
int commitState(void)
Commits material state after convergence.
Definition: SectionAggregator.cpp:575
const Vector & getSectionDeformation(void) const
Returns material trial generalized strain.
Definition: SectionAggregator.cpp:438
virtual double getStrain(const double &y, const double &z) const
Returns strain at position being passed as parameter.
Definition: SectionAggregator.cpp:405
void setSection(const std::string &sectionName)
Assigns the section.
Definition: SectionAggregator.cpp:213
int setInitialSectionDeformation(const Vector &deforms)
Sets initial strain.
Definition: SectionAggregator.cpp:369
void zeroInitialSectionDeformation(void)
Zeroes material initial generalized strain.
Definition: SectionAggregator.cpp:414
int revertToStart(void)
Reverts the material to its initial state.
Definition: SectionAggregator.cpp:597