SheafSystem  0.0.0.0
point_block_3d.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 POINT_BLOCK_3D_H
22 #define POINT_BLOCK_3D_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 CHART_POINT_3D_H
33 #include "SheafSystem/chart_point_3d.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39  using namespace sheaf;
40 
45 class SHEAF_DLL_SPEC point_block_3d : public homogeneous_block
46 {
47 
48  friend class point_block_crg_interval;
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  bool xauto_access);
70 
77  static host_type& standard_host(namespace_type& xns, const poset_path& xhost_path, bool xauto_access);
78 
79 protected:
80 
81 private:
82 
84 
85 
86  // ===========================================================
88  // ===========================================================
90 
91 public:
92 
97 
104  explicit point_block_3d(const abstract_poset_member& xother,
105  bool xnew_jem = false);
106 
110  virtual ~point_block_3d();
111 
112  // NEW HANDLE, NEW STATE CONSTRUCTORS:
113 
119  point_block_3d(poset* xhost,
120  const size_type& xi_size,
121  const size_type& xj_size,
122  const size_type& xk_size,
123  bool xauto_access);
124 
125  // NEW HANDLE, EXISTING STATE CONSTRUCTORS:
126 
131  point_block_3d(const poset* xhost, pod_index_type xhub_id);
132 
137  point_block_3d(const poset* xhost, const scoped_index& xid);
138 
143  point_block_3d(const poset* xhost, const std::string& xname);
144 
149  point_block_3d(const namespace_poset* xnamespace,
150  const poset_path& xpath,
151  bool xauto_access = true);
152 
157  point_block_3d(const namespace_poset* xnamespace,
158  const scoped_index& xposet_id,
159  const scoped_index& xmember_id);
160 
165  point_block_3d(const namespace_poset* xnamespace,
166  pod_index_type xposet_id,
167  pod_index_type xmember_id);
168 
169 
170  // EXISTING HANDLE, NEW STATE "CONSTRUCTORS":
171 
177  void new_state(const size_type& xi_size,
178  const size_type& xj_size,
179  const size_type& xk_size,
180  bool xauto_access = true);
181 
187  void new_state(poset* xhost,
188  const size_type& xi_size,
189  const size_type& xj_size,
190  const size_type& xk_size,
191  bool xauto_access = true);
192 
193 
194  // FEATURES:
195 
201  enum static_const_int {DB = 0};
202 
207  const size_type& i_size() const;
208 
212  void put_i_size(const size_type& xsize);
213 
218  const size_type& j_size() const;
219 
223  void put_j_size(const size_type& xsize);
224 
229  const size_type& k_size() const;
230 
234  void put_k_size(const size_type& xsize);
235 
236 protected:
237 
238 // ///
239 // /// The type of row dof tuple for this.
240 // ///
241 // struct SHEAF_DLL_SPEC row_dof_tuple_type
242 // {
243 // ///
244 // /// The base space dimension.
245 // ///
246 // int db;
247 
248 // ///
249 // /// The cell type id.
250 // ///
251 // int type_id;
252 
253 // ///
254 // /// The cell type name.
255 // ///
256 // const char* type_name;
257 
258 // ///
259 // /// The refinement depth.
260 // ///
261 // int refinement_depth;
262 
263 // ///
264 // /// The local cell type id.
265 // ///
266 // int local_cell_type_id;
267 
268 // ///
269 // /// The local cell type name.
270 // ///
271 // const char * local_cell_type_name;
272 
273 // ///
274 // /// The number of local cell instances in this block.
275 // ///
276 // size_type size;
277 
278 // ///
279 // /// The upper bound for index 0.
280 // ///
281 // size_type i_size;
282 
283 // ///
284 // /// The upper bound for index 1.
285 // ///
286 // size_type j_size;
287 
288 // ///
289 // /// The upper bound for index 2.
290 // ///
291 // size_type k_size;
292 // };
293 
294 // ///
295 // /// The row dof tuple for this.
296 // ///
297 // inline row_dof_tuple_type* row_dof_tuple()
298 // {
299 // return reinterpret_cast<row_dof_tuple_type*>(dof_map().dof_tuple());
300 // }
301 
303 
307  static scoped_index new_row_dof_map(poset_state_handle& xhost,
308  size_type xi_size,
309  size_type xj_size,
310  size_type xk_size,
311  bool xauto_access);
312 
313 
314 
315 
316 private:
317 
319 
320 
321  // ===========================================================
323  // ===========================================================
325 
326 public:
327 
331  static const poset_path& static_local_cell_prototype_path();
332 
333 protected:
334 
335 private:
336 
338 
339 
340  // ===========================================================
342  // ===========================================================
344 
345 public:
346 
347 protected:
348 
349 private:
350 
352 
353 
354  // ===========================================================
356  // ===========================================================
358 
359 public:
360 
361 protected:
362 
363 private:
364 
366 
367 
368  // ===========================================================
370  // ===========================================================
372 
373 public:
374 
378  virtual point_block_3d* clone() const;
379 
385  inline point_block_3d* clone(bool xnew_state, bool xauto_access = true) const
386  {
387  return static_cast<point_block_3d*>(homogeneous_block::clone(xnew_state, xauto_access));
388  }
389 
390 protected:
391 
392 private:
393 
395 
396 
397  // ===========================================================
399  // ===========================================================
401 
402 public:
403 
407  inline point_block_3d* greatest_jem() const
408  {
409  return static_cast<point_block_3d*>(base_space_member::greatest_jem());
410  };
411 
415  inline point_block_3d* least_jem() const
416  {
417  return static_cast<point_block_3d*>(base_space_member::least_jem());
418  };
419 
420 protected:
421 
422 private:
423 
425 
426 
427  // ===========================================================
429  // ===========================================================
431 
432 public:
433 
439  {
440  return static_cast<point_block_3d*>(base_space_member::p_join(other));
441  };
442 
448  {
449  return static_cast<point_block_3d*>(base_space_member::p_meet(other));
450  };
451 
452 protected:
453 
454 private:
455 
457 
458 
459  // ===========================================================
461  // ===========================================================
463 
464 public:
465 
471  inline point_block_3d* l_join(abstract_poset_member* other, bool xnew_jem = true)
472  {
473  return static_cast<point_block_3d*>(base_space_member::l_join(other, xnew_jem));
474  };
475 
481  inline point_block_3d* l_meet(abstract_poset_member* other, bool xnew_jem = true)
482  {
483  return static_cast<point_block_3d*>(base_space_member::l_meet(other, xnew_jem));
484  };
485 
491  inline point_block_3d* l_not(bool xnew_jem = true) const
492  {
493  return static_cast<point_block_3d*>(base_space_member::l_not(xnew_jem));
494  };
495 
496 protected:
497 
498 private:
499 
501 
502 
503  // ===========================================================
505  // ===========================================================
507 
508 public:
509 
513  virtual bool invariant() const;
514 
518  virtual bool is_ancestor_of(const any* other) const;
519 
523  virtual point_block_3d& operator=(const abstract_poset_member& xother);
524 
528  point_block_3d& operator=(const point_block_3d& xother);
529 
530 protected:
531 
532 private:
533 
535 };
536 
537 } // namespace fiber_bundle
538 
539 #endif // POINT_BLOCK_3D_H
base_space_member * 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...
base_space_member * 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...
array_poset_dof_map * new_row_dof_map(const poset *xhost, const std::string &xprototype_name, const std::string &xlocal_cell_name, size_type xsize)
OBSOLETE: use scoped_index new_row_dof_map(poset_state_handle& ...) Creates a new row dof map and ini...
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...
A client handle for a general, abstract partially order set.
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
virtual homogeneous_block * clone() const =0
Make a new handle, no state instance of current.
base_space_member * least_jem() const
The smallest member which is join-equivalent to this.
point_block_3d * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
base_space_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
point_block_3d * 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...
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...
static_const_int
The dimension of this block; static const version.
point_block_3d * 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...
point_block_3d * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
Emulator for a interval of implicit base space members representing a homogeneous collection of uncon...
A client handle for a mutable partially ordered set.
Definition: poset.h:40
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
A client handle for a base space member which represents a homgeneous collection of local cells...
base_space_member * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
point_block_3d * greatest_jem() const
The largest member which is join-equivalent to this.
base_space_member * 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...
point_block_3d * 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...
point_block_3d * clone(bool xnew_state, bool xauto_access=true) const
Make a new handle instance of current. Attach the new instance to a new state if xnew_state is true...
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.
point_block_3d * least_jem() const
The smallest member which is join-equivalent to this.
base_space_member * greatest_jem() const
The largest member which is join-equivalent to this.
An abstract client handle for a member of a poset.
Namespace for the fiber_bundles component of the sheaf system.
A homogeneous collection of i_size()*j_size()*k_size() disconnected points similar to a structured_bl...