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  inline PrismaticBarCrossSection *getSection(void)
112  { return theSection; }
113  void setSection(const std::string &sectionName);
114  inline AggregatorAdditions &getAdditions(void)
115  { return theAdditions; }
116  void setAddtions(const std::vector<std::string> &,const std::vector<std::string> &);
117  void setAddtionsPyList(const boost::python::list &,const boost::python::list &);
118 
119 
120  int setInitialSectionDeformation(const Vector &deforms);
121  int setTrialSectionDeformation(const Vector &deforms);
122  virtual double getStrain(const double &y,const double &z) const;
124  const Vector &getInitialSectionDeformation(void) const;
125  const Vector &getSectionDeformation(void) const;
126  const Vector &getStressResultant(void) const;
127  const Matrix &getSectionTangent(void) const;
128  const Matrix &getInitialTangent(void) const;
129  const Matrix &getSectionFlexibility(void) const;
130  const Matrix &getInitialFlexibility(void) const;
131 
132  int commitState(void);
133  int revertToLastCommit(void);
134  int revertToStart(void);
135 
136  SectionForceDeformation *getCopy(void) const;
137  const ResponseId &getResponseType(void) const;
138  int getOrder(void) const;
139 
140  int sendSelf(Communicator &);
141  int recvSelf(const Communicator &);
142 
143  void Print(std::ostream &s, int flag =0) const;
144 
145  Response *setResponse(const std::vector<std::string> &argv, Information &info);
146  int getResponse(int responseID, Information &info);
147 
148  int setVariable(const std::string &argv);
149  int getVariable(int variableID, double &info);
150 
151  };
152 } // end of XC namespace
153 
154 #endif
int getVariable(int variableID, double &info)
Returns the value of the variable which identifier is being passed as parameter.
Definition: SectionAggregator.cpp:638
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
Float vector abstraction.
Definition: Vector.h:94
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: SectionAggregator.cpp:513
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: SectionAggregator.cpp:559
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:359
Base class response objects.
Definition: Response.h:81
~SectionAggregator(void)
destructor:
Definition: SectionAggregator.cpp:265
pointers to UniaxialMaterial with the degree of freedom associated to each of them (used in SectionAg...
Definition: AggregatorAdditions.h:46
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:50
const Matrix & getInitialFlexibility(void) const
Returns the initial flexibility matrix.
Definition: SectionAggregator.cpp:419
const Matrix & getSectionFlexibility(void) const
Returns the flexibility matrix.
Definition: SectionAggregator.cpp:400
const ResponseId & getResponseType(void) const
Section stiffness contribution response identifiers.
Definition: SectionAggregator.cpp:455
int setVariable(const std::string &argv)
Returns the identifier of the variable which name is being passed as parameter.
Definition: SectionAggregator.cpp:623
SectionAggregator(MaterialHandler *mat_ldr=nullptr)
Default constructor.
Definition: SectionAggregator.cpp:176
XC::SectionAggregator & operator=(const SectionAggregator &)
Assignment operator.
Definition: SectionAggregator.cpp:190
Response * setResponse(const std::vector< std::string > &argv, Information &info)
Returns the respuesta of the section.
Definition: SectionAggregator.cpp:597
int revertToLastCommit(void)
Returns the material to the las committed state.
Definition: SectionAggregator.cpp:489
const Vector & getStressResultant(void) const
Returns the stress resultant.
Definition: SectionAggregator.cpp:439
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: SectionAggregator.cpp:543
const Vector & getInitialSectionDeformation(void) const
Returns material initial generalized strain.
Definition: SectionAggregator.cpp:327
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: SectionAggregator.cpp:580
int getOrder(void) const
Returns the order of the section.
Definition: SectionAggregator.cpp:470
Stiffness material contribution response identifiers.
Definition: ResponseId.h:61
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: SectionAggregator.cpp:528
const Matrix & getInitialTangent(void) const
Returns the initial tangent stiffness matrix.
Definition: SectionAggregator.cpp:380
int getResponse(int responseID, Information &info)
Returns section response.
Definition: SectionAggregator.cpp:614
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
SectionForceDeformation * getCopy(void) const
Virtual constructor.
Definition: SectionAggregator.cpp:269
int setTrialSectionDeformation(const Vector &deforms)
Sets trial strain.
Definition: SectionAggregator.cpp:291
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:479
const Vector & getSectionDeformation(void) const
Returns material trial generalized strain.
Definition: SectionAggregator.cpp:342
virtual double getStrain(const double &y, const double &z) const
Returns strain at position being passed as parameter.
Definition: SectionAggregator.cpp:309
void setSection(const std::string &sectionName)
Assigns the section.
Definition: SectionAggregator.cpp:208
int setInitialSectionDeformation(const Vector &deforms)
Sets initial strain.
Definition: SectionAggregator.cpp:273
void zeroInitialSectionDeformation(void)
Zeroes material initial generalized strain.
Definition: SectionAggregator.cpp:318
int revertToStart(void)
Reverts the material to its initial state.
Definition: SectionAggregator.cpp:501