xc
EdgeContainer.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 //EdgeContainer.h
29 
30 #ifndef EdgeContainer_h
31 #define EdgeContainer_h
32 
33 #include "utility/kernel/CommandEntity.h"
34 #include "preprocessor/multi_block_topology/entities/1d/Edge.h"
35 
36 namespace XC {
37 
40 class EdgeContainer: public CommandEntity, public std::deque<const Edge *>
41  {
42  public:
43  typedef std::deque<const Pnt *> point_sequence;
44  EdgeContainer(void);
45 
46  std::deque<const Edge *> getLoop(const Edge *) const;
47  EdgeContainer getEdgesNotInLoop(const std::deque<const Edge *> &) const;
48  std::deque< point_sequence > getContoursPointSequences(void) const;
49  void print(std::ostream &) const;
50  };
51 
52 std::deque< EdgeContainer::point_sequence > getContoursPointSequences(EdgeContainer edges);
53 
55 inline std::ostream &operator<<(std::ostream &os, const EdgeContainer &me)
56  {
57  me.print(os);
58  return os;
59  }
60 } // end of XC namespace
61 
62 #endif
63 
Base class for one-dimensional geometry objects.
Definition: Edge.h:49
std::deque< const Edge * > getLoop(const Edge *) const
returns the loop that starts in vertex passed as parameter.
Definition: EdgeContainer.cc:38
Edge container.
Definition: EdgeContainer.h:40
EdgeContainer getEdgesNotInLoop(const std::deque< const Edge *> &) const
Returns the edges that result from removing the edges from the loop passed as parameter.
Definition: EdgeContainer.cc:124
Objet that can execute python scripts.
Definition: CommandEntity.h:40
void print(std::ostream &) const
Prints edges information.
Definition: EdgeContainer.cc:138
EdgeContainer(void)
Constructor.
Definition: EdgeContainer.cc:34
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
std::deque< point_sequence > getContoursPointSequences(void) const
returns closed contours from de edge set.
Definition: EdgeContainer.cc:90