xc
Pivots.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 //Pivots.h
29 //Pivots for a bending plane.
30 
31 
32 #ifndef PIVOTS_H
33 #define PIVOTS_H
34 
35 #include "utility/geom/pos_vec/Pos3d.h"
36 #include "utility/geom/pos_vec/Pos2d.h"
37 
38 namespace XC {
39 
40 class ComputePivots;
41 
43 //
45 class Pivots: public CommandEntity
46  {
47  Pos3d A;
48  Pos3d B;
49  Pos3d C;
50  Pos3d D;
51  bool ok;
52 
53  public:
54  Pivots(const Pos3d &a,const Pos3d &b,const Pos3d &c,const Pos3d &d);
55  Pivots(const ComputePivots &cp);
56  inline const Pos3d &getDPoint(void) const
57  { return D; }
58  inline const Pos3d &getAPivot(void) const
59  { return A; }
60  inline const Pos3d &getBPivot(void) const
61  { return B; }
62  inline const Pos3d &getCPivot(void) const
63  { return C; }
64  inline Pos3d getAPoint(const double &epsilon)
65  { return Pos3d(epsilon,A.y(),A.z()); }
66  inline Pos3d getBPoint(const double &epsilon)
67  { return Pos3d(epsilon,B.y(),B.z()); }
68  inline Pos3d getDPoint(const double &epsilon)
69  { return Pos3d(epsilon,D.y(),D.z()); }
70  inline double getEpsilonA(void) const
71  { return A.x(); }
72  inline double getEpsilonB(void) const
73  { return B.x(); }
74  inline double getEpsilonC(void) const
75  { return C.x(); }
76  inline double getEpsilonD(void) const
77  { return B.x(); }
78  inline Pos2d getAPivotPosition(void) const
79  { return Pos2d(A.y(),A.z()); }
80  inline Pos2d getBPivotPosition(void) const
81  { return Pos2d(B.y(),B.z()); }
82  inline Pos2d getCPivotPosition(void) const
83  { return Pos2d(C.y(),C.z()); }
84  inline Pos2d getPointDPosition(void) const
85  { return Pos2d(D.y(),D.z()); }
86  inline bool Ok(void) const
87  { return ok; }
88  bool checkPositions(void) const;
89  void print(std::ostream &) const;
90  };
91 
93 inline std::ostream &operator<<(std::ostream &os, const Pivots &p)
94  {
95  p.print(os);
96  return os;
97  }
98 
99 } // end of XC namespace
100 
101 #endif
Posición en dos dimensiones.
Definition: Pos2d.h:41
Pivots(const Pos3d &a, const Pos3d &b, const Pos3d &c, const Pos3d &d)
Constructor.
Definition: Pivots.cc:87
Objet that can execute python scripts.
Definition: CommandEntity.h:40
void print(std::ostream &) const
Print pivots definition.
Definition: Pivots.cc:97
Pivot positions computed for a bending plane.
Definition: Pivots.h:45
Posición en tres dimensiones.
Definition: Pos3d.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Given a bending plane, computes the "pivots" position on the section.
Definition: ComputePivots.h:48