xc
MapSetBase.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 //MapSetBase.h
28 //Sets container.
29 
30 #ifndef MAPSETBASE_H
31 #define MAPSETBASE_H
32 
33 #include "preprocessor/PreprocessorContainer.h"
34 #include "utility/actor/actor/MovableObject.h"
35 #include <map>
36 #include <deque>
37 
38 
39 namespace XC {
40 
41 class SetBase;
42 class Set;
43 class SetEstruct;
44 class EntMdlr;
45 class Pnt;
46 class Edge;
47 class Face;
48 class Body;
49 class UniformGrid;
50 
55 class MapSetBase: public std::map<std::string,SetBase *>
56  {
57  public:
58  typedef std::map<std::string,SetBase *> map_sets;
59  protected:
60  static std::deque<std::string> setsClassNames;
61  friend class EntMdlr;
62 
64 
65  SetBase *find(const std::string &nmb) const;
66  SetEstruct *find_set_estruct(const std::string &nmb);
67  void clearSets(void);
68  friend class Set;
69 
70  MapSetBase(const MapSetBase &);
72  const std::deque<std::string> &getSetsClassNames(void);
73  const std::deque<std::string> &getSetsNames(void);
74  DbTagData &getDbTagData(void) const;
75  const ID &getSetsDBTags(CommParameters &cp);
76 
77  friend class Preprocessor;
78  public:
79  MapSetBase(void)
80  :map_sets() {}
81  virtual ~MapSetBase(void);
82 
83  bool exists(const std::string &nmb) const;
84  void removeSet(const std::string &);
85 
86  std::set<SetBase *> get_sets(const Node *);
87  std::set<SetBase *> get_sets(const Element *);
88  std::set<SetBase *> get_sets(const Pnt *);
89  std::set<SetBase *> get_sets(const Edge *);
90  std::set<SetBase *> get_sets(const Face *);
91  std::set<SetBase *> get_sets(const Body *);
92  std::set<SetBase *> get_sets(const UniformGrid *);
93 
94  };
95 } // end of XC namespace
96 
97 #endif
Base class for one-dimensional geometry objects.
Definition: Edge.h:46
bool exists(const std::string &nmb) const
Return true if the sets already exists.
Definition: MapSetBase.cc:42
SetBase * find(const std::string &nmb) const
Returns a pointer to the set which name is being passed as parameter.
Definition: MapSetBase.cc:46
void removeSet(const std::string &)
Deletes the set and removes it from the sets map.
Definition: MapSetBase.cc:101
Finite element model generation tools.
Definition: Preprocessor.h:58
void clearSets(void)
Clears all defined sets.
Definition: MapSetBase.cc:117
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:43
Vector of integers.
Definition: ID.h:93
Sets container.
Definition: MapSetBase.h:55
virtual ~MapSetBase(void)
Destructor.
Definition: MapSetBase.cc:128
std::set< SetBase * > get_sets(const Node *)
Return the sets that contain the pointer to node being passed as parameter.
Definition: MapSetBase.cc:188
Base de las clases Set y SetEstruct.
Definition: SetBase.h:49
Base class for the finite elements.
Definition: Element.h:109
Uniform mesh.
Definition: UniformGrid.h:40
const std::deque< std::string > & getSetsClassNames(void)
Return the class names of the sets.
Definition: MapSetBase.cc:169
const ID & getSetsDBTags(CommParameters &cp)
Return the DBTags of the sets.
Definition: MapSetBase.cc:132
Object set.
Definition: Set.h:56
Point (KPoint).
Definition: Pnt.h:49
Multiblock topology object (point, line, face, block,...).
Definition: EntMdlr.h:54
structured set, i.
Definition: SetEstruct.h:45
SetEstruct * create_set_estruct(const SetEstruct &)
Returns a copy of the argument.
Definition: MapSetBase.cc:61
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
const std::deque< std::string > & getSetsNames(void)
Return the class names of the sets.
Definition: MapSetBase.cc:151
Communication parameters between processes.
Definition: CommParameters.h:65
Six-faced solid.
Definition: Body.h:64
Mesh node.
Definition: Node.h:110
SetEstruct * find_set_estruct(const std::string &nmb)
Returns a pointer to the structured set named as the parameter.
Definition: MapSetBase.cc:80
MapSetBase & operator=(const MapSetBase &)
Assignment operator (DOESN&#39;T COPY SETS).
Definition: MapSetBase.cc:95
Surface.
Definition: Face.h:41