SheafSystem  0.0.0.0
point_block_1d.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_1D_H
22 #define POINT_BLOCK_1D_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_1D_H
33 #include "SheafSystem/chart_point_1d.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39 using namespace sheaf;
40 
41 
46 class SHEAF_DLL_SPEC point_block_1d : public homogeneous_block
47 {
48 
49  friend class point_block_crg_interval;
50 
51  // ===========================================================
53  // ===========================================================
55 
56 public:
57 
61  static const poset_path& static_prototype_path();
62 
67  static host_type& new_host(namespace_type& xns,
68  const poset_path& xhost_path,
69  const poset_path& xschema_path,
70  bool xauto_access);
71 
78  static host_type& standard_host(namespace_type& xns, const poset_path& xhost_path, bool xauto_access);
79 
80 protected:
81 
82 private:
83 
85 
86 
87  // ===========================================================
89  // ===========================================================
91 
92 public:
93 
98 
105  explicit point_block_1d(const abstract_poset_member& xother,
106  bool xnew_jem = false);
107 
111  virtual ~point_block_1d();
112 
113  // NEW HANDLE, NEW STATE CONSTRUCTORS:
114 
124  point_block_1d(poset* xhost,
125  const size_type& xi_size,
126  bool xauto_access);
127 
128  // NEW HANDLE, EXISTING STATE CONSTRUCTORS:
129 
134  point_block_1d(poset* xhost, pod_index_type xhub_id);
135 
140  point_block_1d(poset* xhost, const scoped_index& xid);
141 
146  point_block_1d(const poset* xhost, const std::string& xname);
147 
152  point_block_1d(const namespace_poset* xnamespace,
153  const poset_path& xpath,
154  bool xauto_access = true);
155 
160  point_block_1d(const namespace_poset* xnamespace,
161  const scoped_index& xposet_id,
162  const scoped_index& xmember_id);
163 
168  point_block_1d(const namespace_poset* xnamespace,
169  pod_index_type xposet_id,
170  pod_index_type xmember_id);
171 
172 
173  // EXISTING HANDLE, NEW STATE "CONSTRUCTORS":
174 
180  void new_state(const size_type& xi_size, bool xauto_access = true);
181 
186  void new_state(poset* xhost,
187  const size_type& xi_size,
188  bool xauto_access = true);
189 
190  // FEATURES:
191 
197  enum static_const_int {DB = 0};
198 
202  const size_type& i_size() const;
203 
207  void put_i_size(const size_type& xi_size);
208 
209 protected:
210 
211 // ///
212 // /// The type of row dof tuple for this.
213 // ///
214 // struct SHEAF_DLL_SPEC row_dof_tuple_type
215 // {
216 // ///
217 // /// The base space dimension.
218 // ///
219 // int db;
220 
221 // ///
222 // /// The cell type id.
223 // ///
224 // int type_id;
225 
226 // ///
227 // /// The cell type name.
228 // ///
229 // const char* type_name;
230 
231 // ///
232 // /// The refinement depth.
233 // ///
234 // int refinement_depth;
235 
236 // ///
237 // /// The local cell type id.
238 // ///
239 // int local_cell_type_id;
240 
241 // ///
242 // /// The local cell type name.
243 // ///
244 // const char * local_cell_type_name;
245 
246 // ///
247 // /// The number of local cell instances in this block.
248 // ///
249 // size_type size;
250 
251 // ///
252 // /// The upper bound for index_0.
253 // ///
254 // size_type i_size;
255 // };
256 
257 // ///
258 // /// The row dof tuple for this.
259 // ///
260 // inline row_dof_tuple_type* row_dof_tuple()
261 // {
262 // return reinterpret_cast<row_dof_tuple_type*>(dof_map().dof_tuple());
263 // }
264 
266 
270  static scoped_index new_row_dof_map(poset_state_handle& xhost,
271  size_type xi_size,
272  bool xauto_access);
273 
274 
275 
276 
277 private:
278 
280 
281 
282  // ===========================================================
284  // ===========================================================
286 
287 public:
288 
292  static const poset_path& static_local_cell_prototype_path();
293 
294 protected:
295 
296 private:
297 
299 
300 
301  // ===========================================================
303  // ===========================================================
305 
306 public:
307 
308 protected:
309 
310 private:
311 
313 
314 
315  // ===========================================================
317  // ===========================================================
319 
320 public:
321 
322 protected:
323 
324 private:
325 
327 
328 
329  // ===========================================================
331  // ===========================================================
333 
334 public:
335 
339  virtual point_block_1d* clone() const;
340 
346  inline point_block_1d* clone(bool xnew_state, bool xauto_access = true) const
347  {
348  return static_cast<point_block_1d*>(homogeneous_block::clone(xnew_state, xauto_access));
349  }
350 
351 protected:
352 
353 private:
354 
356 
357 
358  // ===========================================================
360  // ===========================================================
362 
363 public:
364 
368  inline point_block_1d* greatest_jem() const
369  {
370  return static_cast<point_block_1d*>(base_space_member::greatest_jem());
371  };
372 
376  inline point_block_1d* least_jem() const
377  {
378  return static_cast<point_block_1d*>(base_space_member::least_jem());
379  };
380 
381 protected:
382 
383 private:
384 
386 
387 
388  // ===========================================================
390  // ===========================================================
392 
393 public:
394 
400  {
401  return static_cast<point_block_1d*>(base_space_member::p_join(other));
402  };
403 
409  {
410  return static_cast<point_block_1d*>(base_space_member::p_meet(other));
411  };
412 
413 protected:
414 
415 private:
416 
418 
419 
420  // ===========================================================
422  // ===========================================================
424 
425 public:
426 
432  inline point_block_1d* l_join(abstract_poset_member* other, bool xnew_jem = true)
433  {
434  return static_cast<point_block_1d*>(base_space_member::l_join(other, xnew_jem));
435  };
436 
442  inline point_block_1d* l_meet(abstract_poset_member* other, bool xnew_jem = true)
443  {
444  return static_cast<point_block_1d*>(base_space_member::l_meet(other, xnew_jem));
445  };
446 
452  inline point_block_1d* l_not(bool xnew_jem = true) const
453  {
454  return static_cast<point_block_1d*>(base_space_member::l_not(xnew_jem));
455  };
456 
457 protected:
458 
459 private:
460 
462 
463 
464  // ===========================================================
466  // ===========================================================
468 
469 public:
470 
474  virtual bool invariant() const;
475 
479  virtual bool is_ancestor_of(const any* other) const;
480 
484  virtual point_block_1d& operator=(const abstract_poset_member& xother);
485 
489  point_block_1d& operator=(const point_block_1d& xother);
490 
491 protected:
492 
493 private:
494 
496 };
497 
498 } // namespace fiber_bundle
499 
500 #endif // POINT_BLOCK_1D_H
point_block_1d * 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 * 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.
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_1d * least_jem() const
The smallest member which is join-equivalent to this.
Abstract base class with useful features for all objects.
Definition: any.h:39
static_const_int
The dimension of this block; static const version.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
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_1d * 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...
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_1d * 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...
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
point_block_1d * 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_1d * 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...
point_block_1d * 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...
Namespace for the sheaves component of the sheaf system.
point_block_1d * greatest_jem() const
The largest member which is join-equivalent to this.
A homogeneous collection of i_size() disconnected points; similar to a structured_block_1d, but without the segments.
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.