SheafSystem  0.0.0.0
zone_nodes_block.h
Go to the documentation of this file.
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 
20 
21 #ifndef ZONE_NODES_BLOCK_H
22 #define ZONE_NODES_BLOCK_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef HOMOGENEOUS_BLOCK_H
29 #include "SheafSystem/homogeneous_block.h"
30 #endif
31 
32 #ifndef ZONE_NODES_BLOCK_CRG_INTERVAL_H
33 #include "SheafSystem/zone_nodes_block_crg_interval.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39 using namespace sheaf;
40 
41 class base_space_member_prototype;
42 class block_connectivity;
43 
47 class SHEAF_DLL_SPEC zone_nodes_block : public homogeneous_block
48 {
49 
50  // ===========================================================
52  // ===========================================================
54 
55 public:
56 
60  static const poset_path& static_prototype_path();
61 
66  static host_type& new_host(namespace_type& xns,
67  const poset_path& xhost_path,
68  const poset_path& xschema_path,
69  int xmax_db,
70  bool xauto_access);
71 
78  static host_type& standard_host(namespace_type& xns,
79  const poset_path& xhost_path,
80  int xmax_db,
81  bool xauto_access);
82 
83 protected:
84 
85 private:
86 
88 
89 
90  // ===========================================================
92  // ===========================================================
94 
95 public:
96 
102  enum static_const_int {DB = -1};
103 
108 
115  explicit zone_nodes_block(const abstract_poset_member& xother,
116  bool xnew_jem = false);
117 
121  virtual ~zone_nodes_block();
122 
123  // ===========================================================
124  // NEW HANDLE, NEW STATE CONSTRUCTORS
125  // ===========================================================
126 
131  zone_nodes_block(base_space_poset& xhost, const block_connectivity& xconn, bool xauto_access);
132 
133 
134  // ===========================================================
135  // NEW HANDLE, EXISTING STATE CONSTRUCTORS
136  // ===========================================================
137 
142  zone_nodes_block(const base_space_poset& xhost, pod_index_type xhub_id);
143 
148  zone_nodes_block(const base_space_poset& xhost, const scoped_index& xid);
149 
154  zone_nodes_block(const base_space_poset& xhost, const std::string& xname);
155 
160  zone_nodes_block(const namespace_poset* xnamespace,
161  const poset_path& xpath,
162  bool xauto_access = true);
163 
168  zone_nodes_block(const namespace_poset* xnamespace,
169  pod_index_type xposet_id,
170  pod_index_type xmember_id);
171 
176  zone_nodes_block(const namespace_poset* xnamespace,
177  const scoped_index& xposet_id,
178  const scoped_index& xmember_id);
179 
180  // ===========================================================
181  // EXISTING HANDLE, NEW STATE "CONSTRUCTORS"
182  // ===========================================================
183 
187  void new_state(const block_connectivity& xconn, bool xauto_access);
188 
192  void new_state(base_space_poset& xhost, const block_connectivity& xconn, bool xauto_access);
193 
194 protected:
195 
196 private:
197 
199 
200 
201  // ===========================================================
203  // ===========================================================
205 
206 public:
207 
211  bool contains_vertex_client_id_space(bool xauto_access) const;
212 
216  index_space_handle& get_vertex_client_id_space(bool xauto_access) const;
217 
221  void release_vertex_client_id_space(index_space_handle& xid_space, bool xauto_access) const;
222 
226  index_space_iterator& get_vertex_client_id_space_iterator(bool xauto_access) const;
227 
231  void release_vertex_client_id_space_iterator(index_space_iterator& xitr, bool xauto_access) const;
232 
233 protected:
234 
235 private:
236 
238 
239 
240  // ===========================================================
242  // ===========================================================
244 
245 public:
246 
250  virtual const zone_nodes_block_crg_interval& interval() const;
251 
252 protected:
253 
254 private:
255 
257 
258 
259  // ===========================================================
261  // ===========================================================
263 
264 public:
265 
266 protected:
267 
268 private:
269 
271 
272 
273  // ===========================================================
275  // ===========================================================
277 
278 public:
279 
280 protected:
281 
282 private:
283 
285 
286 
287  // ===========================================================
289  // ===========================================================
291 
292 public:
293 
297  virtual zone_nodes_block& operator=(const abstract_poset_member& xother);
298 
302  zone_nodes_block& operator=(const zone_nodes_block& xother);
303 
304 protected:
305 
306 private:
307 
309 
310 
311  // ===========================================================
313  // ===========================================================
315 
316 public:
317 
322  {
323  return static_cast<zone_nodes_block*>(homogeneous_block::greatest_jem());
324  };
325 
329  inline zone_nodes_block* least_jem() const
330  {
331  return static_cast<zone_nodes_block*>(homogeneous_block::least_jem());
332  };
333 
334 protected:
335 
336 private:
337 
339 
340 
341  // ===========================================================
343  // ===========================================================
345 
346 public:
347 
353  {
354  return static_cast<zone_nodes_block*>(homogeneous_block::p_join(other));
355  };
356 
362  {
363  return static_cast<zone_nodes_block*>(homogeneous_block::p_meet(other));
364  };
365 
366 protected:
367 
368 private:
369 
371 
372 
373  // ===========================================================
375  // ===========================================================
377 
378 public:
379 
385  inline zone_nodes_block* l_join(abstract_poset_member* other, bool xnew_jem = true)
386  {
387  return static_cast<zone_nodes_block*>(homogeneous_block::l_join(other, xnew_jem));
388  };
389 
395  inline zone_nodes_block* l_meet(abstract_poset_member* other, bool xnew_jem = true)
396  {
397  return static_cast<zone_nodes_block*>(homogeneous_block::l_meet(other, xnew_jem));
398  };
399 
405  inline zone_nodes_block* l_not(bool xnew_jem = true) const
406  {
407  return static_cast<zone_nodes_block*>(homogeneous_block::l_not(xnew_jem));
408  };
409 
410 protected:
411 
412 private:
413 
415 
416 
417  // ===========================================================
419  // ===========================================================
421 
422 public:
423 
427  virtual bool is_ancestor_of(const any* other) const;
428 
432  virtual zone_nodes_block* clone() const;
433 
439  zone_nodes_block* clone(bool xnew_state, bool xauto_access = true) const;
440 
444  virtual bool invariant() const;
445 
446 protected:
447 
448 private:
449 
451 };
452 
453 } // namespace fiber_bundle
454 
455 #endif // ZONE_NODES_BLOCK_H
homogeneous_block * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
zone_nodes_block * l_meet(abstract_poset_member *other, bool xnew_jem=true)
lattice meet of this with other, auto-, pre-, and self-allocated versions the lattice meet is the gre...
homogeneous_block * l_join(abstract_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-, pre-, and self-allocated versions the lattice join is the lea...
zone_nodes_block * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
An abstract iterator over the ids of an id space.
zone_nodes_block * greatest_jem() const
The largest member which is join-equivalent to this.
zone_nodes_block * l_join(abstract_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-, pre-, and self-allocated versions the lattice join is the lea...
The default name space; a poset which contains other posets as members.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
homogeneous_block * least_jem() const
The smallest member which is join-equivalent to this.
homogeneous_block * greatest_jem() const
The largest member which is join-equivalent to this.
A path defined by a poset name and a member name separated by a forward slash (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
Zone to node connectivity relation for a block of zones of a given type.
A homogeneous collection of zones with nodal connectivity.
Abstract base class with useful features for all objects.
Definition: any.h:39
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
homogeneous_block * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
Struct representing the closed interval [_begin, _end].
Definition: interval_set.h:48
zone_nodes_block * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
A client handle for a base space member which represents a homgeneous collection of local cells...
homogeneous_block * l_meet(abstract_poset_member *other, bool xnew_jem=true)
lattice meet of thisposet with other, auto-, pre-, and self-allocated versions the lattice meet is th...
homogeneous_block * p_join(abstract_poset_member *other) const
poset join of this with other, auto-, pre-, and self-allocated versions the poset join is the least u...
Emulator for a interval of implicit base space members representing an unstructured block...
static_const_int
The dimension of this block; static const version.
zone_nodes_block * least_jem() const
The smallest member which is join-equivalent to this.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
Namespace for the sheaves component of the sheaf system.
An abstract client handle for a member of a poset.
Namespace for the fiber_bundles component of the sheaf system.
zone_nodes_block * p_join(abstract_poset_member *other) const
poset join of this with other, auto-, pre-, and self-allocated versions the poset join is the least u...