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