XC Open source finite element analysis program
Pivots.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 //Pivots.h
28 //Pivots for a bending plane.
29 
30 
31 #ifndef PIVOTS_H
32 #define PIVOTS_H
33 
34 #include "xc_utils/src/geom/pos_vec/Pos3d.h"
35 #include "xc_utils/src/geom/pos_vec/Pos2d.h"
36 
37 namespace XC {
38 
39 class ComputePivots;
40 
42 //
44 class Pivots
45  {
46  Pos3d A;
47  Pos3d B;
48  Pos3d C;
49  Pos3d D;
50  bool ok;
51 
52  public:
53  Pivots(const Pos3d &a,const Pos3d &b,const Pos3d &c,const Pos3d &d);
54  Pivots(const ComputePivots &cp);
55  inline const Pos3d &getPuntoD(void) const
56  { return D; }
57  inline const Pos3d &getPivotA(void) const
58  { return A; }
59  inline const Pos3d &getPivotB(void) const
60  { return B; }
61  inline const Pos3d &getPivotC(void) const
62  { return C; }
63  inline Pos3d getPuntoA(const double &epsilon)
64  { return Pos3d(epsilon,A.y(),A.z()); }
65  inline Pos3d getPuntoB(const double &epsilon)
66  { return Pos3d(epsilon,B.y(),B.z()); }
67  inline Pos3d getPuntoD(const double &epsilon)
68  { return Pos3d(epsilon,D.y(),D.z()); }
69  inline double getEpsilonA(void) const
70  { return A.x(); }
71  inline double getEpsilonB(void) const
72  { return B.x(); }
73  inline double getEpsilonC(void) const
74  { return C.x(); }
75  inline double getEpsilonD(void) const
76  { return B.x(); }
77  inline Pos2d getPosPivotA(void) const
78  { return Pos2d(A.y(),A.z()); }
79  inline Pos2d getPosPivotB(void) const
80  { return Pos2d(B.y(),B.z()); }
81  inline Pos2d getPosPivotC(void) const
82  { return Pos2d(C.y(),C.z()); }
83  inline Pos2d getPosPuntoD(void) const
84  { return Pos2d(D.y(),D.z()); }
85  inline bool Ok(void) const
86  { return ok; }
87  bool checkPositions(void) const;
88  void print(std::ostream &) const;
89  };
90 
91 inline std::ostream &operator<<(std::ostream &os, const Pivots &p)
92  {
93  p.print(os);
94  return os;
95  }
96 
97 } // end of XC namespace
98 
99 #endif
Pivots(const Pos3d &a, const Pos3d &b, const Pos3d &c, const Pos3d &d)
Constructor.
Definition: Pivots.cc:82
Given a bending plane, computes the "pivots" position on the section.
Definition: ComputePivots.h:47
void print(std::ostream &) const
Print pivots definition.
Definition: Pivots.cc:92
Pivot positions computed for a bending plane.
Definition: Pivots.h:44
================================================================================
Definition: ContinuaReprComponent.h:34