xc
GenericSectionNd.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.3 $
49 // $Date: 2003/02/14 23:01:34 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/material/section/GenericSectionNd.h,v $
51 
52 
53 #ifndef GenericSectionNd_h
54 #define GenericSectionNd_h
55 
56 // File: ~/material/GenericSectionNd.h
57 //
58 // Written: MHS
59 // Created: Apr 2000
60 // Revision: A
61 //
62 // Description: This file contains the class definition for GenericSectionNd.
63 //
64 // What: "@(#) GenericSectionNd.h, revA"
65 
66 #include <material/section/SectionForceDeformation.h>
67 
68 namespace XC {
69 class Information;
70 class NDMaterial;
71 
73 //
81  {
82  protected:
83  NDMaterial *theModel;
84  ResponseId *code;
85  int order;
86 
87  void free(void);
88  void alloc(const NDMaterial *,const ResponseId *);
89  int sendData(Communicator &);
90  int recvData(const Communicator &);
91  public:
92  GenericSectionNd(int tag, const NDMaterial &m,const ResponseId &mCode);
93  GenericSectionNd(int tag= 0);
96  ~GenericSectionNd(void);
97 
101  const Vector &getInitialSectionDeformation(void) const;
102  const Vector &getSectionDeformation(void) const;
103  double getStrain(const double &,const double &) const;
104  const Vector &getStressResultant(void) const;
105  const Matrix &getSectionTangent(void) const;
106  const Matrix &getInitialTangent(void) const;
107 
108  int commitState(void);
109  int revertToLastCommit(void);
110  int revertToStart(void);
111 
112  SectionForceDeformation *getCopy(void) const;
113  const ResponseId &getResponseType(void) const;
114  int getOrder(void) const;
115 
116  int sendSelf(Communicator &);
117  int recvSelf(const Communicator &);
118 
119  void Print(std::ostream &s, int flag = 0) const;
120  };
121 } // end of XC namespace
122 
123 
124 #endif
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
void free(void)
Frees memory.
Definition: GenericSectionNd.cpp:77
Float vector abstraction.
Definition: Vector.h:94
int commitState(void)
Commits the current state.
Definition: GenericSectionNd.cpp:208
Communication parameters between processes.
Definition: Communicator.h:66
void alloc(const NDMaterial *, const ResponseId *)
Allocates memory.
Definition: GenericSectionNd.cpp:93
const Matrix & getInitialTangent(void) const
Return the initial stiffness matrix.
Definition: GenericSectionNd.cpp:204
void zeroInitialSectionDeformation(void)
Zeroes initial generalized strain.
Definition: GenericSectionNd.cpp:168
const Vector & getSectionDeformation(void) const
Returns material&#39;s trial generalized deformation.
Definition: GenericSectionNd.cpp:183
double getStrain(const double &, const double &) const
Returns strain at position being passed as parameter.
Definition: GenericSectionNd.cpp:188
const ResponseId & getResponseType(void) const
Returns the section ID code that indicates the type of response quantities returned by this instance ...
Definition: GenericSectionNd.cpp:221
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: GenericSectionNd.cpp:233
SectionForceDeformation * getCopy(void) const
Virtual constructor.
Definition: GenericSectionNd.cpp:229
GenericSectionND provides a wrapper around a NDMaterial.
Definition: GenericSectionNd.h:80
const Vector & getStressResultant(void) const
Return the the generalized stress vector.
Definition: GenericSectionNd.cpp:196
const Vector & getInitialSectionDeformation(void) const
Return the initial generalized strain.
Definition: GenericSectionNd.cpp:175
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: GenericSectionNd.cpp:243
int sendSelf(Communicator &)
Sends the object.
Definition: GenericSectionNd.cpp:253
Stiffness material contribution response identifiers.
Definition: ResponseId.h:61
int revertToLastCommit(void)
Returns the material to its last committed state.
Definition: GenericSectionNd.cpp:212
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
int recvSelf(const Communicator &)
Receives the object.
Definition: GenericSectionNd.cpp:268
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int setTrialSectionDeformation(const Vector &)
Set trial generalized strain.
Definition: GenericSectionNd.cpp:164
Matrix of floats.
Definition: Matrix.h:111
const Matrix & getSectionTangent(void) const
Return the stiffness matrix.
Definition: GenericSectionNd.cpp:200
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: GenericSectionNd.cpp:289
int setInitialSectionDeformation(const Vector &)
Set initial generalized strain.
Definition: GenericSectionNd.cpp:155
GenericSectionNd(int tag, const NDMaterial &m, const ResponseId &mCode)
Constructor.
Definition: GenericSectionNd.cpp:125
int getOrder(void) const
Returns the result of invoking getOrder() on the NDMaterial.
Definition: GenericSectionNd.cpp:225
GenericSectionNd & operator=(const GenericSectionNd &)
Assignment operator.
Definition: GenericSectionNd.cpp:143
~GenericSectionNd(void)
Destructor.
Definition: GenericSectionNd.cpp:151
int revertToStart(void)
Returns the material to its initial state.
Definition: GenericSectionNd.cpp:216