SheafSystem  0.0.0.0
block_connectivity.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Interface for class block_connectivity
19 
20 #ifndef BLOCK_CONNECTIVITY_H
21 #define BLOCK_CONNECTIVITY_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef BLOCK_RELATION_H
28 #include "SheafSystem/block_relation.h"
29 #endif
30 
31 #ifndef POD_TYPES_H
32 #include "SheafSystem/pod_types.h"
33 #endif
34 
35 #ifndef STD_IOSTREAM_H
36 #include "SheafSystem/std_iostream.h"
37 #endif
38 
39 namespace fiber_bundle
40 {
41 
42  using namespace sheaf;
43 
47 class SHEAF_DLL_SPEC block_connectivity : public block_relation
48 {
49 public:
50 
51  // ===========================================================
53  // ===========================================================
55 
56 public:
57 
61  virtual ~block_connectivity();
62 
66  size_type element_ct() const;
67 
71  size_type node_ct() const;
72 
76  pod_index_type* node_ids();
77 
81  const pod_index_type* node_ids() const;
82 
86  bool delete_node_ids() const;
87 
91  size_type node_id_ct() const;
92 
96  size_type nodes_per_element() const;
97 
101  pod_index_type start_id() const;
102 
106  virtual void to_stream(std::ostream& xos) const;
107 
111  block_connectivity& operator=(const block_connectivity& xother);
112 
116  virtual bool operator==(const block_connectivity& xother) const;
117 
118 protected:
119 
124 
128  block_connectivity(const block_connectivity& xother);
129 
136  block_connectivity(const pod_index_type* xnode_ids,
137  size_type xnode_id_ct,
138  size_type xnodes_per_element,
139  size_type xnode_ct);
140 
145  //*/
147 
152 
157 
162 
167 
172 
177 
183 
184 private:
185 
187 
188  // ===========================================================
190  // ===========================================================
192 
193 public:
194 
195 protected:
196 
197 private:
198 
200 
201 
202  // ===========================================================
204  // ===========================================================
206 
207 public:
208 
213  virtual block_connectivity* clone() const = 0;
214 
218  virtual bool invariant() const;
219 
223  virtual bool is_ancestor_of(const any* other) const;
224 
225 protected:
226 
227 private:
228 
230 };
231 
232 
233 // ===========================================================
234 // NON-MEMBER FUNCTIONS
235 // ===========================================================
236 
237 #ifndef DOXYGEN_1_5_4_SKIP_UNKNOWN
238 
242 SHEAF_DLL_SPEC
243 std::ostream& operator << (std::ostream& xos, const block_connectivity& xconn);
244 
245 #endif // ifndef DOXYGEN_1_5_4_SKIP_UNKNOWN
246 
247 } // namespace fiber_bundle
248 
249 #endif // ifndef BLOCK_CONNECTIVITY_H
pod_index_type * _node_ids
The nodal connectivity array.
size_type _nodes_per_element
The number of nodes per element.
Zone to node connectivity relation for a block of zones of a given type.
Abstract base class with useful features for all objects.
Definition: any.h:39
size_type _node_id_ct
the number of entyries in _node_ids.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
Abstract cell relation for a block of zones of a given type.
size_type _element_ct
The number of elements.
bool operator==(const singly_linked_list< T, Alloc > &lhs, const singly_linked_list< T, Alloc > &rhs)
Checks if the contents of lhs and rhs are equal, that is, whether lhs.size() == rhs.size() and each element in lhs compares equal with the element in rhs at the same position.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
size_type _node_ct
The number of distinct nodes.
pod_index_type _start_id
The id given to the first node id generated. Mostly only useful for creating 1 (vs 0) based node numb...
Namespace for the sheaves component of the sheaf system.
Namespace for the fiber_bundles component of the sheaf system.
bool _delete_node_ids
True if destructor of this should delete _node_ids.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const binary_index &xbi)
Insert binary_index& xbi into ostream& os.
Definition: binary_index.cc:35