XC Open source finite element analysis program
SetEstruct.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 //SetEstruct.h
28 
29 #ifndef SETESTRUCT_H
30 #define SETESTRUCT_H
31 
32 #include "SetBase.h"
33 #include <map>
34 #include "domain/mesh/node/NodeTopology.h"
35 
36 namespace XC {
37 class TritrizPtrElem;
38 class Node;
39 class Element;
40 
45 class SetEstruct: public SetBase
46  {
47  protected:
48  friend class Preprocessor;
49  void add_elements(const TritrizPtrElem &);
50 
51  NodePtrSet getNodePtrSet(void);
52  public:
53  SetEstruct(const std::string &nmb="",Preprocessor *preprocessor= nullptr);
54  SetEstruct(const SetEstruct &otro);
55  SetEstruct &operator=(const SetEstruct &otro);
56  virtual SetEstruct *getCopy(void) const= 0;
57  virtual size_t getNumNodeLayers(void) const= 0;
58  virtual size_t getNumNodeRows(void) const= 0;
59  virtual size_t getNumNodeColumns(void) const= 0;
60  virtual size_t getNumElementLayers(void) const= 0;
61  virtual size_t getNumElementRows(void) const= 0;
62  virtual size_t getNumElementColumns(void) const= 0;
63  size_t getNumberOfNodes(void) const;
64  size_t getNumberOfElements(void) const;
65  bool In(const Node *) const;
66  bool In(const Element *) const;
67 
68  bool EsFilaI(void) const;
69  bool EsFilaJ(void) const;
70  bool EsFilaK(void) const;
71  bool EsCapaICte(void) const;
72  bool EsCapaJCte(void) const;
73  bool EsCapaKCte(void) const;
74  size_t Dimension(void) const;
75  std::string GetStrTipo(void) const;
76 
77  virtual Node *GetNodo(const size_t &i=1,const size_t &j=1,const size_t &k=1)= 0;
78  virtual const Node *GetNodo(const size_t &i=1,const size_t &j=1,const size_t &k=1) const= 0;
79 
80  Node *getNodeI(const size_t &i);
81  Node *getNodeIJ(const size_t &i,const size_t &j);
82  inline Node *getNodeIJK(const size_t &i,const size_t &j,const size_t &k)
83  { return GetNodo(i,j,k); }
84 
85  virtual Element *getElement(const size_t &i=1,const size_t &j=1,const size_t &k=1)= 0;
86  virtual const Element *getElement(const size_t &i=1,const size_t &j=1,const size_t &k=1) const= 0;
87 
88  inline Element *getElementI(const size_t &i)
89  { return getElement(i,1,1); }
90  inline Element *getElementIJ(const size_t &i,const size_t &j)
91  { return getElement(i,j,1); }
92  inline Element *getElementIJK(const size_t &i,const size_t &j,const size_t &k)
93  { return getElement(i,j,k); }
94 
95  std::set<int> getNodeTags(void) const;
96  boost::python::list getNodes(void);
97  std::set<int> getElementTags(void) const;
98  boost::python::list getElements(void);
100  };
101 } //end of XC namespace
102 #endif
bool EsFilaJ(void) const
Returns true if only the J index varies.
Definition: SetEstruct.cc:68
std::string GetStrTipo(void) const
Returns the set type filaI, filaJ, filaK, capaICte,...
Definition: SetEstruct.cc:94
"Tritriz" of pointers to elements.
Definition: TritrizPtrElem.h:43
bool EsFilaK(void) const
Returns true if only the K index varies.
Definition: SetEstruct.cc:75
bool EsCapaKCte(void) const
Returns true if only I and J indices varies.
Definition: SetEstruct.cc:90
ElementEdges getElementEdges(void)
Returns the element edges with both end nodes belong to the nodes of the set.
Definition: SetEstruct.cc:134
SetEstruct & operator=(const SetEstruct &otro)
Assignment operator.
Definition: SetEstruct.cc:49
size_t Dimension(void) const
Return the dimension of the range (0,1,2 or 3). Zero if the range is empty, 1 if there is more than o...
Definition: SetEstruct.cc:109
Mesh node.
Definition: Node.h:99
bool EsFilaI(void) const
Returns true if only the I index varies.
Definition: SetEstruct.cc:61
bool EsCapaJCte(void) const
Returns true if only J and K indices varies.
Definition: SetEstruct.cc:86
Base calass for the finite elements.
Definition: Element.h:104
std::set< int > getElementTags(void) const
Returns the tags of the elements.
Definition: SetEstruct.cc:192
Finite element model generation tools.
Definition: Preprocessor.h:58
structured set, i. e. a set that can return a pointer a to a node or an element from its indices i...
Definition: SetEstruct.h:45
NodePtrSet getNodePtrSet(void)
Returns the pointers to the set nodes.
Definition: SetEstruct.cc:119
bool In(const Node *) const
Returns true if the nodo belongs to the set.
Definition: SetEstruct.cc:229
bool EsCapaICte(void) const
Returns true if only J and K indices varies.
Definition: SetEstruct.cc:82
SetEstruct(const std::string &nmb="", Preprocessor *preprocessor=nullptr)
Constructor.
Definition: SetEstruct.cc:41
Element edge container.
Definition: ElementEdges.h:44
================================================================================
Definition: ContinuaReprComponent.h:34
std::set< int > getNodeTags(void) const
Returns the tags of the nodes.
Definition: SetEstruct.cc:154
void add_elements(const TritrizPtrElem &)
Adds to the model the elements being passed as parameters.
Definition: SetEstruct.cc:141
Base de las clases Set y SetEstruct.
Definition: SetBase.h:50