SheafSystem  0.0.0.0
section_space_schema_poset.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 SECTION_SPACE_SCHEMA_POSET_H
22 #define SECTION_SPACE_SCHEMA_POSET_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef POSET_STATE_HANDLE_H
29 #include "SheafSystem/poset_state_handle.h"
30 #endif
31 
32 #ifndef ARRAY_POSET_DOF_MAP_H
33 #include "SheafSystem/array_poset_dof_map.h"
34 #endif
35 
36 #ifndef BASE_SPACE_POSET_H
37 #include "SheafSystem/base_space_poset.h"
38 #endif
39 
40 #ifndef NAMESPACE_RELATIVE_MEMBER_INDEX_H
41 #include "SheafSystem/namespace_relative_member_index.h"
42 #endif
43 
44 #ifndef POSET_H
45 #include "SheafSystem/poset.h"
46 #endif
47 
48 #ifndef SECTION_SPACE_SCHEMA_TABLE_DOFS_TYPE_H
49 #include "SheafSystem/section_space_schema_table_dofs_type.h"
50 #endif
51 
52 #ifndef SEC_REP_DESCRIPTOR_H
53 #include "SheafSystem/sec_rep_descriptor.h"
54 #endif
55 
56 #ifndef SUBPOSET_H
57 #include "SheafSystem/subposet.h"
58 #endif
59 
60 namespace sheaf
61 {
62 class ij_product_structure;
63 class namespace_poset;
64 class namespace_poset_member;
65 }
66 
67 namespace fiber_bundle
68 {
69 
70 using namespace sheaf;
71 
72 class fiber_bundles_namespace;
73 class section_space_schema_member;
74 
80 class SHEAF_DLL_SPEC section_space_schema_poset : public poset_state_handle
81 {
82  friend class namespace_poset;
83 
84  // ===========================================================
86  // ===========================================================
88 
89 public:
90 
91  // Typedefs:
92 
97 
102 
107 
111  static const poset_path& standard_schema_path();
112 
116  poset_path rep_path(bool xauto_access) const;
117 
121  sec_rep_descriptor& rep();
122 
126  const sec_rep_descriptor& rep() const;
127 
133  static bool rep_is_valid(const sec_rep_descriptor& xrep, const poset_state_handle& xbase_space);
134 
139  pod_index_type base_space_member_id_ub() const;
140 
144  virtual pod_index_type get_base_space_id_from_index(pod_index_type xmbr_hub_id) const;
145 
149  void get_base_space_id_from_index(const scoped_index& xmbr_id,
150  scoped_index& result) const;
151 
156  int base_space_stride() const;
157 
161  int db() const;
162 
166  poset_path base_space_path(bool xauto_access) const;
167 
171  base_space_poset& base_space();
172 
176  const base_space_poset& base_space() const;
177 
182  pod_index_type fiber_schema_member_id_ub() const;
183 
187  virtual pod_index_type get_fiber_schema_id_from_index(pod_index_type xmbr_hub_id) const;
188 
192  void get_fiber_schema_id_from_index(const scoped_index& xmbr_id,
193  scoped_index& result) const;
194 
199  int fiber_schema_stride() const;
200 
204  int df() const;
205 
209  poset_state_handle& fiber_schema();
210 
214  const poset_state_handle& fiber_schema() const;
215 
219  poset_path fiber_space_path(bool xauto_access) const;
220 
224  poset& fiber_space();
225 
229  const poset& fiber_space() const;
230 
234  subposet& discretization();
235 
239  const subposet& discretization() const;
240 
244  bool is_multivalued() const;
245 
249  subposet& multivalued();
250 
254  const subposet& multivalued() const;
255 
259  subposet& evaluation();
260 
264  const subposet& evaluation() const;
265 
269  std::string evaluator_family_name() const;
270 
274  const ij_product_structure& product_structure() const;
275 
280  virtual pod_index_type
281  get_index_from_components(pod_index_type xbase_space_id,
282  pod_index_type xfiber_schema_id) const = 0;
283 
288  void get_index_from_components(const scoped_index& xbase_space_id,
289  const scoped_index& xfiber_schema_id,
290  scoped_index& result) const;
291 
295  void update_hub_id_space(bool xauto_access);
296 
297 protected:
298 
303 
308 
309 // ///
310 // /// The fiber schema for section spaces on this schema.
311 // ///
312 // poset_state_handle _fiber_schema;
313 
319 
324 
329 
334 
339 
344 
349 
353  virtual ~section_space_schema_poset();
354 
359 
360 private:
361 
363 
364 
365  // ===========================================================
367  // ===========================================================
369 
370 public:
371 
375  virtual poset_type type_id() const;
376 
380  virtual const char* class_name() const;
381 
385  virtual void get_read_access() const;
386 
393  virtual void get_read_write_access(bool xrelease_read_only_access = false);
394 
399  virtual void release_access(bool xall = false) const;
400 
401 protected:
402 
409  virtual void initialize_handle_data_members(const namespace_poset& xns);
410 
415  virtual void attach_handle_data_members();
416 
421  virtual void terminate_access();
422 
423 private:
424 
426 
427 
428  // ===========================================================
430  // ===========================================================
432 
433 public:
434 
435 protected:
436 
441  inline table_dofs_type* table_dof_tuple_ptr()
442  {
443  return reinterpret_cast<table_dofs_type*>(table_dof_map().dof_tuple());
444  };
445 
450  inline const table_dofs_type* table_dof_tuple_ptr() const
451  {
452  return reinterpret_cast<const table_dofs_type*>(table_dof_map().dof_tuple());
453  };
454 
455 private:
456 
458 
459  // ===========================================================
461  // ===========================================================
463 
464 public:
465 
467 
472  virtual bool is_schematized(bool xauto_access) const;
473 
478  virtual void schematize(subposet* xtable_dof_subposet,
479  subposet* xrow_dof_subposet,
480  bool xall_members = false);
481 
482 protected:
483 
484 private:
485 
487 
488 
489  // ===========================================================
491  // ===========================================================
493 
494 public:
495 
500 
504  const section_space_schema_member& top() const;
505 
509  section_space_schema_member& bottom();
510 
514  const section_space_schema_member& bottom() const;
515 
519  virtual int member_ct() const;
520 
525  virtual int standard_member_ct() const;
526 
530  virtual scoped_index member_index_ub() const;
531 
535  index_iterator member_iterator() const;
536 
538 
543  virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access = true) const;
544 
549  virtual bool contains_member(pod_index_type xmbr_hub_id, int xversion, bool xauto_access = true) const;
550 
552 
556  virtual bool is_jim(pod_index_type xmbr_hub_id, bool xin_current_version = true) const;
557 
559 
563  virtual bool is_atom(pod_index_type xmbr_hub_id) const;
564 
565 // using poset_state_handle::member_name;
566 
567 // ///
568 // /// The name of the member with hub id xmbr_hub_id
569 // ///
570 // virtual string member_name(pod_index_type xmbr_hub_id, bool xauto_access = false) const;
571 
572 protected:
573 
577  virtual void initialize_standard_members();
578 
585  void new_standard_member_hack(standard_member_index xindex);
586 
588 
594  virtual pod_index_type new_member(bool xis_jim, pod_index_type xdof_tuple_id);
595 
601  virtual pod_index_type new_member(bool xis_jim, poset_dof_map* xdof_map = 0, bool xcopy_dof_map = false);
602 
604 
610  virtual void delete_member(pod_index_type xmbr_hub_id);
611 
612 private:
613 
615 
616 
617  // ===========================================================
619  // ===========================================================
621 
622 public:
623 
625 
631  virtual void new_link(pod_index_type xgreater, pod_index_type xlesser);
632 
634 
640  virtual void delete_link(pod_index_type xgreater, pod_index_type xlesser);
641 
642 protected:
643 
644 private:
645 
647 
648  // ===========================================================
650  // ===========================================================
652 
653 public:
654 
656 
663  virtual pod_index_type new_subposet(const block<pod_index_type>& xmembers);
664 
666 
670  virtual void delete_subposet(pod_index_type xsubposet_hub_id);
671 
675  virtual int version_ct() const;
676 
680  virtual int version() const;
681 
683 
687  virtual pod_index_type version_index(int xversion) const;
688 
690 
694  virtual pod_index_type version_jims_index(int xversion) const;
695 
696 protected:
697 
698 private:
699 
701 
702 
703  // ===========================================================
705  // ===========================================================
707 
708 public:
709 
718  virtual index_iterator* get_decomposition(pod_index_type xindex) const;
719 
721 
726  virtual bool is_valid_int_id(pod_index_type xint_id,
727  const std::string& xid_space_name,
728  bool xauto_access) const;
729 
731 
736  virtual pod_index_type get_ext_id(pod_index_type xint_id,
737  const std::string& xid_space_name,
738  bool xauto_access) const;
739 
743  virtual pod_index_type prereq_id(int xi) const;
744 
745 
746 protected:
747 
748 private:
749 
751 
752 
753  // ===========================================================
755  // ===========================================================
757 
758 public:
759 
763  virtual bool is_ancestor_of(const any* other) const;
764 
768  virtual bool invariant() const;
769 
770 protected:
771 
776  virtual section_space_schema_poset* clone() const = 0;
777 
782  {
783  return const_cast<section_space_schema_poset&>(*this);
784  };
785 
786 private:
787 
789 };
790 
791 } // namespace fiber_bundle
792 
793 #endif // SECTION_SPACE_SCHEMA_POSET_H
virtual void delete_link(pod_index_type xgreater, pod_index_type xlesser)
Delete the cover link between hub id xgreater and hub id xlesser.
A client handle for a subposet.
Definition: subposet.h:86
virtual void new_link(pod_index_type xgreater, pod_index_type xlesser)
Insert a cover link from greater to lesser (that is, hub id xgreater covers hub id xlesser)...
table_dofs_type * table_dof_tuple_ptr()
OBSOLETE: use table_dofs(). Pointer to the storage for the table dofs.
The default name space; a poset which contains other posets as members.
standard_member_index
Ids for standard poset members.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
ij_product_structure * _product
The Cartisian product subspace structure.
poset_type
Identifiers for poset types.
Definition: poset_type.h:41
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 bool is_atom(pod_index_type xmbr_hub_id) const
True if the member with hub id xmbr_hub_id covers the bottom.
section_space_schema_member member_type
The type of member associated with this space.
The general, abstract map from dof ids to dof values.
Definition: poset_dof_map.h:59
section_space_schema_table_dofs_type table_dofs_type
The table dofs type defined by the standard schema.
virtual pod_index_type new_member(bool xis_jim, pod_index_type xtuple_hub_id)
Create a disconnected member with is_jim == xis_jim and the dof tuple identified by hub id xtuple_hub...
virtual pod_index_type version_jims_index(int xversion) const
The subposet hub id of the jims() subposet for version xversion.
Table dofs type for class section_space_schema_poset.
Abstract base class with useful features for all objects.
Definition: any.h:39
section_space_schema_poset()
Default constructor; disabled.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
virtual pod_index_type version_index(int xversion) const
The subposet hub id of the whole() subposet for version xversion.
virtual bool is_valid_int_id(pod_index_type xint_id, const std::string &xid_space_name, bool xauto_access) const
True if xint_id can be translated to an external id using the equivalence map with name xid_space_nam...
virtual pod_index_type get_ext_id(pod_index_type xint_id, const std::string &xid_space_name, bool xauto_access) const
Translates xint_id to an external id using the equivalence map with name xid_space_name.
virtual void delete_subposet(pod_index_type xsubposet_hub_id)
Deletes the subposet with hub id xsubposet_hub_id.
A client handle for a mutable partially ordered set.
Definition: poset.h:40
virtual pod_index_type new_subposet(bool xinitialize=true)
Creates a new subposet. If xinitialize, make the subposet empty,.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
subposet _evaluation
The evaluation subposet for section spaces on this schema.
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
Iterates over the subset of Zn defined by the characteristic function host().
section_space_schema_poset & operator=(const poset_state_handle &xother)
Assignment operator; disabled.
An abstract schema poset for a section space. A Cartesian product subspace of the tensor product of a...
virtual bool is_schematized(bool xauto_access) const
True if this poset has been prepared for use as a schema, that is, if the top member has been schemat...
fiber_bundles_namespace namespace_type
The type of namespace for this type of member.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A 2D implementation of abstract_product_structure.
Namespace for the sheaves component of the sheaf system.
sec_rep_descriptor _rep
The representation for section spaces on this schema.
A client handle for a poset member which has been prepared for use as a schema for a section space...
virtual bool is_jim(pod_index_type xmbr_hub_id, bool xin_current_version=true) const
True if the member with hub id xmbr_hub_id is a jim in the current version (xin_current_version == tr...
virtual void delete_member(pod_index_type xmbr_hub_id)
Delete the member with hub id xmbr_hub_id. Warning: this routine does not delete links; it will leave...
subposet _discretization
The discretization subposet for section spaces on this schema.
poset * _fiber_space
The fiber space for section spaces on this schema.
const table_dofs_type * table_dof_tuple_ptr() const
OBSOLETE: use table_dofs(). Pointer to the storage for the table dofs.
Namespace for the fiber_bundles component of the sheaf system.
subposet _multivalued
The multivalued subposet for section spaces on this schema.
A description for a section representation scheme.
base_space_poset * _base_space
The base space for section spaces on this schema.