xc
CircularArc.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 //CircularArc.h
29 
30 #ifndef ARCOCIRCUNF_H
31 #define ARCOCIRCUNF_H
32 
33 #include "LineBase.h"
34 
35 
36 class CircularSector3d;
37 
38 namespace XC {
39 
43 
44 class CircularArc: public LineBase
45  {
46  Pnt *p3;
47  protected:
48  const CircularSector3d get_sector_circular3d(void) const;
49  Pos3dArray get_positions(void) const;
50  bool check_points(void) const;
51  public:
53  CircularArc(const std::string &name= "",Preprocessor *m= nullptr);
54  virtual bool operator==(const CircularArc &) const;
55  virtual SetEstruct *getCopy(void) const;
56  const Pnt *P3(void) const;
57 
58  void update_topology(void);
59 
60  double getLength(void) const;
61  Pos3d getCentroid(void) const;
62  double getIncludedAngle(void) const;
63  double getTheta1(void) const;
64  double getTheta2(void) const;
65  Pos3d getCenter(void) const;
66  Pos3d getPInic(void) const;
67  Pos3d getPFin(void) const;
68  Pos3d getPMed(void) const;
69  double getRadius(void) const;
70  double getLambda(const Pos3d &) const;
71 
73  inline virtual size_t getNumberOfVertices(void) const
74  { return 3; }
75  virtual const Pnt *getVertex(const size_t &i) const;
76  virtual Pnt *getVertex(const size_t &i);
77  virtual void SetVertice(const size_t &,Pnt *);
78  virtual BND3d Bnd(void) const;
79  int getVtkCellType(void) const;
80  virtual ID getKPoints(void) const;
81  virtual std::deque<Segment3d> getSegments(void) const;
82 
83  boost::python::dict getPyDict(void) const;
84  void setPyDict(const boost::python::dict &);
85  };
86 
87 } //end of XC namespace
88 #endif
Pos3d getPMed(void) const
Return the midpoint.
Definition: CircularArc.cc:212
double getTheta2(void) const
Return the end angle.
Definition: CircularArc.cc:166
virtual ID getKPoints(void) const
Return k-points.
Definition: CircularArc.cc:249
const CircularSector3d get_sector_circular3d(void) const
Return the circle sector correlated with the arc.
Definition: CircularArc.cc:121
double getTheta1(void) const
Return the start angle.
Definition: CircularArc.cc:157
Finite element model generation tools.
Definition: Preprocessor.h:59
Array of positions in a three-dimensional space.
Definition: Pos3dArray.h:38
virtual void SetVertice(const size_t &, Pnt *)
Set the i-th vertex.
Definition: CircularArc.cc:91
int getVtkCellType(void) const
Interface with VTK.
Definition: CircularArc.cc:245
const Pnt * P3(void) const
Return a constant pointer to the midpoint of the arc.
Definition: CircularArc.cc:69
virtual BND3d Bnd(void) const
Returns object boundary.
Definition: CircularArc.cc:237
Sector de círculo en tres dimensiones.
Definition: CircularSector3d.h:34
double getLambda(const Pos3d &) const
Return the parameter of the point on the arc (distance to the arc&#39;s first point measured over the arc...
Definition: CircularArc.cc:176
Pos3d getPFin(void) const
Return the end point.
Definition: CircularArc.cc:203
Vector of integers.
Definition: ID.h:95
bool check_points(void) const
Check that the points are defined.
Definition: CircularArc.cc:108
Base class for 1D entities.
Definition: LineBase.h:41
virtual std::deque< Segment3d > getSegments(void) const
Return the segments that compose the edge.
Definition: CircularArc.cc:259
virtual const Pnt * getVertex(const size_t &i) const
Return the i-th vertex.
Definition: CircularArc.cc:73
double getIncludedAngle(void) const
Return the angle subtended by the arc.
Definition: CircularArc.cc:148
double getRadius(void) const
Return the radius.
Definition: CircularArc.cc:221
Circumference arc.
Definition: CircularArc.h:44
Pos3d getCentroid(void) const
Return the centroid of the arc.
Definition: CircularArc.cc:139
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: CircularArc.cc:279
Pos3dArray get_positions(void) const
Return ndiv+1 equally-sapaced positions along the arc.
Definition: CircularArc.cc:241
void update_topology(void)
Updates topology.
Definition: CircularArc.cc:230
"boundary" en tres dimensiones.
Definition: BND3d.h:34
CircularArc(Preprocessor *m)
Constructor.
Definition: CircularArc.cc:42
Point (KPoint).
Definition: Pnt.h:50
structured set, i.
Definition: SetEstruct.h:47
virtual size_t getNumberOfVertices(void) const
Return the number of vertices.
Definition: CircularArc.h:73
Pos3d getPInic(void) const
Return the start point.
Definition: CircularArc.cc:194
Posición en tres dimensiones.
Definition: Pos3d.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: CircularArc.cc:268
double getLength(void) const
Return the arc length.
Definition: CircularArc.cc:130
virtual bool operator==(const CircularArc &) const
Comparison operator.
Definition: CircularArc.cc:50
virtual SetEstruct * getCopy(void) const
Virtual constructor.
Definition: CircularArc.cc:65
Pos3d getCenter(void) const
Return the center of the circumference.
Definition: CircularArc.cc:185