xc
UniaxialFiber.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 //UniaxialFiber.h
29 
30 #ifndef UniaxialFiber_h
31 #define UniaxialFiber_h
32 
33 #include "Fiber.h"
34 
35 namespace XC {
36 class UniaxialMaterial;
37 class MaterialHandler;
38 
40 //
42 class UniaxialFiber: public Fiber
43  {
44  void free_mem(void);
45  void alloc(const UniaxialMaterial &theMat);
46  protected:
48  double area;
49 
50  int sendData(Communicator &);
51  int recvData(const Communicator &);
52 
53  public:
54  UniaxialFiber(int classTag);
55  UniaxialFiber(int tag, int classTag,double Area);
56  UniaxialFiber(int tag, int classTag,const UniaxialMaterial &,const double &);
57  UniaxialFiber(int tag, int classTag,const MaterialHandler &,const std::string &,const double &);
60  ~UniaxialFiber(void);
61 
62  void setMaterial(const UniaxialMaterial *theMat);
63  void setMaterial(const MaterialHandler &ldr,const std::string &nmbMat);
64 
65  int commitState(void);
66  int revertToLastCommit(void);
67  int revertToStart(void);
68 
69  inline UniaxialMaterial *getMaterial(void)
70  { return theMaterial; }
71  inline const UniaxialMaterial *getMaterial(void) const
72  { return theMaterial; }
74  inline double getArea(void) const
75  { return area; }
76  };
77 } // end of XC namespace
78 
79 
80 #endif
81 
82 
83 
84 
85 
86 
int revertToLastCommit(void)
Returns to its last committed state.
Definition: UniaxialFiber.cc:148
Communication parameters between processes.
Definition: Communicator.h:66
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
UniaxialFiber(int classTag)
Constructor for blank object that recvSelf needs to be invoked upon.
Definition: UniaxialFiber.cc:92
int commitState(void)
Commits material state.
Definition: UniaxialFiber.cc:144
int revertToStart(void)
Returns to the initial state.
Definition: UniaxialFiber.cc:152
Section fiber.
Definition: Fiber.h:90
UniaxialFiber & operator=(const UniaxialFiber &)
Assignment operator.
Definition: UniaxialFiber.cc:115
double getArea(void) const
Return the fiber area.
Definition: UniaxialFiber.h:74
double area
area of the fiber
Definition: UniaxialFiber.h:48
UniaxialMaterial * theMaterial
pointer to a material
Definition: UniaxialFiber.h:47
int recvData(const Communicator &)
Receive data through the communicator argument.
Definition: UniaxialFiber.cc:168
int sendData(Communicator &)
Send data through the communicator argument.
Definition: UniaxialFiber.cc:157
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Fiber of uniaxial material.
Definition: UniaxialFiber.h:42
void setMaterial(const UniaxialMaterial *theMat)
Set the fiber material.
Definition: UniaxialFiber.cc:128