XC Open source finite element analysis program
Fiber.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 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.5 $
48 // $Date: 2003/02/25 23:33:36 $
49 // $Source: material/section/fiber_section/fiber/Fiber.h,v $
50 
51 
52 // File: ~/fiber/Fiber.h
53 //
54 // Written: Remo Magalhaes de Souza
55 // Created: 10/98
56 // Revision:
57 //
58 // Description: This file contains the class definition for
59 // Fiber. Fiber is an abstract base class and thus no objects of
60 // it's type can be instatiated. It has pure virtual functions which
61 // must be implemented in it's derived classes.
62 //
63 // What: "@(#) Fiber.h, revA"
64 
65 
66 #ifndef Fiber_h
67 #define Fiber_h
68 
69 #include "utility/tagged/TaggedObject.h"
70 #include "utility/actor/actor/MovableObject.h"
71 
72 class Pos2d;
73 
74 namespace XC {
75 class Vector;
76 class Matrix;
77 class ResponseId;
78 class UniaxialMaterial;
79 class Information;
80 class Response;
81 
83 //
85 //
87 //
89 class Fiber: public TaggedObject, public MovableObject
90  {
91  bool dead;
92  protected:
93  int sendData(CommParameters &);
94  int recvData(const CommParameters &);
95 
96  public:
97  Fiber(int tag, int classTag);
98 
99  virtual int setTrialFiberStrain(const Vector &vs)=0;
100  virtual Vector &getFiberStressResultants(void) =0;
101  virtual Matrix &getFiberTangentStiffContr(void) =0;
102 
103  virtual int commitState(void)=0;
104  virtual int revertToLastCommit(void)=0;
105  virtual int revertToStart(void)=0;
106 
107  virtual Fiber *getCopy(void) const= 0;
108  virtual int getOrder(void) const= 0;
109  virtual const ResponseId &getType(void) const= 0;
110 
111  virtual const bool isDead(void) const
112  { return dead; }
113  virtual const bool isAlive(void) const
114  { return !dead; }
115  virtual void kill(void)
116  { dead= true; }
117  virtual void alive(void)
118  { dead= false; }
119 
120  virtual Response *setResponse(const std::vector<std::string> &argv, Information &info);
121  virtual int getResponse(int responseID, Information &info);
122 
123  virtual void getFiberLocation(double &y, double &z) const=0;
124  virtual double getLocY(void) const= 0;
125  virtual double getLocZ(void) const
126  { return 0.0; }
127  Pos2d getPos(void) const;
128 
129  virtual UniaxialMaterial *getMaterial(void) =0;
130  virtual const UniaxialMaterial *getMaterial(void) const= 0;
131  virtual double getArea(void) const=0;
132  double getStrain(void) const;
133  double getFuerza(void) const;
134  double getMz(const double &y0= 0.0) const;
135  double getMy(const double &z0= 0.0) const;
136  };
137 
140 inline double Fiber::getMz(const double &y0) const
141  { return getFuerza()*(getLocY() - y0); }
142 
145 inline double Fiber::getMy(const double &z0) const
146  { return getFuerza()*(getLocZ() - z0); }
147 
148 } // end of XC namespace
149 
150 
151 #endif
152 
double getFuerza(void) const
Return the fuerza con la que actúa la fibra.
Definition: Fiber.cpp:81
Definition: Vector.h:82
Pos2d getPos(void) const
Returns fiber position.
Definition: Fiber.cpp:94
Information about an element.
Definition: Information.h:80
double getMy(const double &z0=0.0) const
Returns the momento de la fuerza ejercida por la fibra respecto al eje paralelo al «y» que pasa por z...
Definition: Fiber.h:145
Stiffness material contribution response identifiers.
Definition: ResponseId.h:60
Object that can move between processes.
Definition: MovableObject.h:91
Fiber(int tag, int classTag)
constructor.
Definition: Fiber.cpp:71
virtual Fiber * getCopy(void) const =0
Virtual constructor.
Definition: Matrix.h:82
Object idenfied by an integer (tag).
Definition: TaggedObject.h:82
Section fiber.
Definition: Fiber.h:89
int recvData(const CommParameters &)
Receive data through the channel being passed as parameter.
Definition: Fiber.cpp:107
int sendData(CommParameters &)
Send data through the channel being passed as parameter.
Definition: Fiber.cpp:98
double getMz(const double &y0=0.0) const
Returns the momento de la fuerza ejercida por la fibra respecto al eje paralelo al «z» que pasa por y...
Definition: Fiber.h:140
Communication parameters between processes.
Definition: CommParameters.h:65
double getStrain(void) const
Returns fiber strain.
Definition: Fiber.cpp:90
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:88