xc
MeshEdges.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 //MeshEdges.h
29 
30 #ifndef MeshEdges_h
31 #define MeshEdges_h
32 
33 #include "utility/kernel/CommandEntity.h"
34 #include "domain/mesh/MeshEdge.h"
35 
36 class Polyline3d;
37 
38 
39 namespace XC {
40 class Element;
41 class Domain;
42 class ID;
43 
44 
46 //
48 class MeshEdges: public CommandEntity, public std::deque<MeshEdge>
49  {
50  public:
51  MeshEdges(void);
52 
53  std::deque<const MeshEdge *> getLoop(const MeshEdge *) const;
54  MeshEdges getEdgesNotInLoop(const std::deque<const MeshEdge *> &) const;
55  std::deque<Polyline3d> getContours(const double &factor) const;
56  void print(std::ostream &) const;
57  };
58 
59 std::deque<Polyline3d> getContours(MeshEdges edges,const double &factor);
60 
62 inline std::ostream &operator<<(std::ostream &os, const MeshEdges &me)
63  {
64  me.print(os);
65  return os;
66  }
67 } // end of XC namespace
68 
69 #endif
70 
Polyline in a three-dimensional space.
Definition: Polyline3d.h:37
void print(std::ostream &) const
Prints edges information.
Definition: MeshEdges.cc:136
Objet that can execute python scripts.
Definition: CommandEntity.h:40
MeshEdges(void)
Constructor.
Definition: MeshEdges.cc:35
Mesh edge.
Definition: MeshEdge.h:40
std::deque< const MeshEdge * > getLoop(const MeshEdge *) const
returns the loop that starts in vertex passed as parameter.
Definition: MeshEdges.cc:39
MeshEdges getEdgesNotInLoop(const std::deque< const MeshEdge *> &) const
Returns the edges that result from removing the edges from the loop passed as parameter.
Definition: MeshEdges.cc:122
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
std::deque< Polyline3d > getContours(const double &factor) const
returns closed contours from de edge set.
Definition: MeshEdges.cc:93
Element edge container.
Definition: MeshEdges.h:48