Nektar++
Composite.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: Composite.h
4 //
5 // For more information, please see: http://www.nektar.info/
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Mesh Composite Object.
32 //
33 ////////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKMESHUTILS_MESHELEMENTS_COMPOSITE
36 #define NEKMESHUTILS_MESHELEMENTS_COMPOSITE
37 
40 
41 namespace Nektar
42 {
43 namespace NekMeshUtils
44 {
45 /**
46  * @brief A composite is a collection of elements.
47  *
48  * All elements should be of the same type, i.e. have the same tag.
49  */
50 class Composite
51 {
52 public:
54  {
55  }
56 
57  /// ID of composite.
58  unsigned int m_id;
59  /// Element type tag.
60  std::string m_tag;
61  /// boundary label
62  std::string m_label;
63  /// Determines whether items can be reordered.
64  bool m_reorder;
65  /// List of elements in this composite.
66  std::vector<ElementSharedPtr> m_items;
67 };
68 
69 /// Shared pointer to a composite.
70 typedef std::shared_ptr<Composite> CompositeSharedPtr;
71 /// Container of composites; key is the composite id, value is the
72 /// composite.
73 typedef std::map<unsigned int, CompositeSharedPtr> CompositeMap;
74 }
75 }
76 
77 #endif
std::vector< ElementSharedPtr > m_items
List of elements in this composite.
Definition: Composite.h:66
std::map< unsigned int, CompositeSharedPtr > CompositeMap
Container of composites; key is the composite id, value is the composite.
Definition: Composite.h:73
bool m_reorder
Determines whether items can be reordered.
Definition: Composite.h:64
A composite is a collection of elements.
Definition: Composite.h:50
NEKMESHUTILS_EXPORT Composite()
Definition: Composite.h:53
unsigned int m_id
ID of composite.
Definition: Composite.h:58
#define NEKMESHUTILS_EXPORT
std::shared_ptr< Composite > CompositeSharedPtr
Shared pointer to a composite.
Definition: Composite.h:70
std::string m_label
boundary label
Definition: Composite.h:62
std::string m_tag
Element type tag.
Definition: Composite.h:60