SheafSystem  0.0.0.0
point_block_2d.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_2D_H
22 #define POINT_BLOCK_2D_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_2D_H
33 #include "SheafSystem/chart_point_2d.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39  using namespace sheaf;
40 
45 class SHEAF_DLL_SPEC point_block_2d : 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_2d(const abstract_poset_member& xother,
105  bool xnew_jem = false);
106 
110  virtual ~point_block_2d();
111 
112  // NEW HANDLE, NEW STATE CONSTRUCTORS:
113 
119  point_block_2d(poset* xhost,
120  const size_type& xi_size,
121  const size_type& xj_size,
122  bool xauto_access);
123 
124  // NEW HANDLE, EXISTING STATE CONSTRUCTORS:
125 
130  point_block_2d(const poset* xhost, pod_index_type xhub_id);
131 
136  point_block_2d(const poset* xhost, const scoped_index& xid);
137 
142  point_block_2d(const poset* xhost, const std::string& xname);
143 
148  point_block_2d(const namespace_poset* xnamespace,
149  const poset_path& xpath,
150  bool xauto_access = true);
151 
156  point_block_2d(const namespace_poset* xnamespace,
157  const scoped_index& xposet_id,
158  const scoped_index& xmember_id);
159 
164  point_block_2d(const namespace_poset* xnamespace,
165  pod_index_type xposet_id,
166  pod_index_type xmember_id);
167 
168 
169  // EXISTING HANDLE, NEW STATE "CONSTRUCTORS":
170 
176  void new_state(const size_type& xi_size, const size_type& xj_size,
177  bool xauto_access = true);
178 
184  void new_state(poset* xhost, const size_type& xi_size,
185  const size_type& xj_size, bool xauto_access = true);
186 
187  // FEATURES:
188 
194  enum static_const_int {DB = 0};
195 
200  const size_type& i_size() const;
201 
205  void put_i_size(const size_type& xsize);
206 
211  const size_type& j_size() const;
212 
216  void put_j_size(const size_type& xsize);
217 
218 protected:
219 
220 // ///
221 // /// The type of row dof tuple for this.
222 // ///
223 // struct SHEAF_DLL_SPEC row_dof_tuple_type
224 // {
225 // ///
226 // /// The base space dimension.
227 // ///
228 // int db;
229 
230 // ///
231 // /// The cell type id.
232 // ///
233 // int type_id;
234 
235 // ///
236 // /// The cell type name.
237 // ///
238 // const char* type_name;
239 
240 // ///
241 // /// The refinement depth.
242 // ///
243 // int refinement_depth;
244 
245 // ///
246 // /// The local cell type id.
247 // ///
248 // int local_cell_type_id;
249 
250 // ///
251 // /// The local cell type name.
252 // ///
253 // const char * local_cell_type_name;
254 
255 // ///
256 // /// The number of local cell instances in this block.
257 // ///
258 // size_type size;
259 
260 // ///
261 // /// The upper bound for index 0.
262 // ///
263 // size_type i_size;
264 
265 // ///
266 // /// The upper bound for index 1.
267 // ///
268 // size_type j_size;
269 // };
270 
271 
272 // ///
273 // /// The row dof tuple for this.
274 // ///
275 // inline row_dof_tuple_type* row_dof_tuple()
276 // {
277 // return reinterpret_cast<row_dof_tuple_type*>(dof_map().dof_tuple());
278 // }
279 
281 
285  static scoped_index new_row_dof_map(poset_state_handle& xhost,
286  size_type xi_size,
287  size_type xj_size,
288  bool xauto_access);
289 
290 
291 
292 private:
293 
295 
296 
297  // ===========================================================
299  // ===========================================================
301 
302 public:
303 
307  static const poset_path& static_local_cell_prototype_path();
308 
309 protected:
310 
311 private:
312 
314 
315 
316  // ===========================================================
318  // ===========================================================
320 
321 public:
322 
323 protected:
324 
325 private:
326 
328 
329 
330  // ===========================================================
332  // ===========================================================
334 
335 public:
336 
337 protected:
338 
339 private:
340 
342 
343 
344  // ===========================================================
346  // ===========================================================
348 
349 public:
350 
354  virtual point_block_2d* clone() const;
355 
361  inline point_block_2d* clone(bool xnew_state, bool xauto_access = true) const
362  {
363  return static_cast<point_block_2d*>(homogeneous_block::clone(xnew_state, xauto_access));
364  }
365 
366 protected:
367 
368 private:
369 
371 
372 
373  // ===========================================================
375  // ===========================================================
377 
378 public:
379 
383  inline point_block_2d* greatest_jem() const
384  {
385  return static_cast<point_block_2d*>(base_space_member::greatest_jem());
386  };
387 
391  inline point_block_2d* least_jem() const
392  {
393  return static_cast<point_block_2d*>(base_space_member::least_jem());
394  };
395 
396 protected:
397 
398 private:
399 
401 
402 
403  // ===========================================================
405  // ===========================================================
407 
408 public:
409 
415  {
416  return static_cast<point_block_2d*>(base_space_member::p_join(other));
417  };
418 
424  {
425  return static_cast<point_block_2d*>(base_space_member::p_meet(other));
426  };
427 
428 protected:
429 
430 private:
431 
433 
434 
435  // ===========================================================
437  // ===========================================================
439 
440 public:
441 
447  inline point_block_2d* l_join(abstract_poset_member* other, bool xnew_jem = true)
448  {
449  return static_cast<point_block_2d*>(base_space_member::l_join(other, xnew_jem));
450  };
451 
457  inline point_block_2d* l_meet(abstract_poset_member* other, bool xnew_jem = true)
458  {
459  return static_cast<point_block_2d*>(base_space_member::l_meet(other, xnew_jem));
460  };
461 
467  inline point_block_2d* l_not(bool xnew_jem = true) const
468  {
469  return static_cast<point_block_2d*>(base_space_member::l_not(xnew_jem));
470  };
471 
472 protected:
473 
474 private:
475 
477 
478 
479  // ===========================================================
481  // ===========================================================
483 
484 public:
485 
489  virtual bool invariant() const;
490 
494  virtual bool is_ancestor_of(const any* other) const;
495 
499  virtual point_block_2d& operator=(const abstract_poset_member& xother);
500 
504  point_block_2d& operator=(const point_block_2d& xother);
505 
506 protected:
507 
508 private:
509 
511 };
512 
513 } // namespace fiber_bundle
514 
515 #endif // POINT_BLOCK_2D_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...
point_block_2d * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
The default name space; a poset which contains other posets as members.
point_block_2d * greatest_jem() const
The largest member which is join-equivalent to this.
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...
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...
point_block_2d * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
Emulator for a interval of implicit base space members representing a homogeneous collection of uncon...
point_block_2d * least_jem() const
The smallest member which is join-equivalent to this.
A client handle for a mutable partially ordered set.
Definition: poset.h:40
point_block_2d * 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...
A homogeneous collection of i_size() * j_size() disconnected points similar to a structured_block_2d...
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...
point_block_2d * 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...
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...
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...
static_const_int
The dimension of this block; static const version.
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_2d * 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 * 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.
point_block_2d * 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...