SheafSystem  0.0.0.0
section_space_schema_poset_2.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_H
29 #include "SheafSystem/poset.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 SECTION_SPACE_SCHEMA_TABLE_DOFS_TYPE_H
45 #include "SheafSystem/section_space_schema_table_dofs_type.h"
46 #endif
47 
48 #ifndef SEC_REP_DESCRIPTOR_H
49 #include "SheafSystem/sec_rep_descriptor.h"
50 #endif
51 
52 #ifndef SUBPOSET_H
53 #include "SheafSystem/subposet.h"
54 #endif
55 
56 namespace sheaf
57 {
58 class namespace_poset;
59 }
60 
61 namespace fiber_bundle
62 {
63 
64 using namespace sheaf;
65 
66 class section_space_schema_crg_range;
67 class section_space_schema_member;
68 
72 class SHEAF_DLL_SPEC section_space_schema_poset : public poset
73 {
74  friend class namespace_poset;
75  friend class section_space_schema_member;
76 
77  // ===========================================================
79  // ===========================================================
81 
82 public:
83 
88 
93 
97  static const std::string& standard_schema_poset_name();
98 
102  static const poset_path& standard_schema_path();
103 
107  static void make_standard_schema(namespace_poset& xns);
108 
112  sec_rep_descriptor& rep();
113 
117  const sec_rep_descriptor& rep() const;
118 
124  static bool rep_is_valid(const sec_rep_descriptor& xrep, const poset_state_handle& xbase_space);
125 
132  bool rep_is_valid(const namespace_poset& xns, const arg_list& xaregs, bool xauto_access) const;
133 
137  int db() const;
138 
142  base_space_poset& base_space();
143 
147  const base_space_poset& base_space() const;
148 
152  int df() const;
153 
157  poset_state_handle& fiber_schema();
158 
162  const poset_state_handle& fiber_schema() const;
163 
167  poset& fiber_space();
168 
172  const poset& fiber_space() const;
173 
177  subposet& discretization();
178 
182  const subposet& discretization() const;
183 
187  subposet& evaluation();
188 
192  const subposet& evaluation() const;
193 
197  string evaluator_family_name() const;
198 
203  void tuple(const scoped_index& xindex,
204  scoped_index& xbase_space_id,
205  scoped_index& xfiber_schema_id) const;
206 
211  virtual void tuple(pod_index_type xindex,
212  pod_index_type& xbase_space_id,
213  pod_index_type& xfiber_schema_id) const = 0;
214 
219  void ordinal(const scoped_index& xbase_space_id,
220  const scoped_index& xfiber_schema_id,
221  scoped_index& xindex) const;
222 
227  virtual void ordinal(pod_index_type xbase_space_id,
228  pod_index_type xfiber_schema_id,
229  pod_index_type& xindex) const = 0;
230 
234  bool is_homogeneous(const scoped_index& xindex) const;
235 
239  virtual bool is_homogeneous(pod_index_type xindex) const = 0;
240 
245  bool contains_range_member(const scoped_index& xbase_space_id,
246  const scoped_index& xfiber_schema_id,
247  bool xauto_access) const;
248 
253  virtual bool contains_range_member(pod_index_type xbase_space_id,
254  pod_index_type xfiber_schema_id,
255  bool xauto_access) const = 0;
256 
260  virtual void update_hub_id_space(bool xauto_access) = 0;
261 
262 protected:
263 
267  virtual ~section_space_schema_poset();
268 
273 
279  void initialize_table_dof_subposet();
280 
284  sec_rep_descriptor _rep;
285 
289  base_space_poset* _base_space;
290 
291 // ///
292 // /// The fiber schema for section spaces on this schema.
293 // ///
294 // poset_state_handle _fiber_schema;
295 
301 
305  poset* _fiber_space;
306 
310  subposet _discretization;
311 
315  subposet _evaluation;
316 
317 private:
318 
320 
321 
322  // ===========================================================
324  // ===========================================================
326 
327 public:
328 
332  virtual poset_type type_id() const;
333 
337  virtual const char* class_name() const;
338 
342  virtual void get_read_access() const;
343 
350  virtual void get_read_write_access(bool xrelease_read_only_access = false);
351 
356  virtual void release_access(bool xall = false) const;
357 
358 protected:
359 
366  virtual void initialize_handle_data_members(const namespace_poset& xns);
367 
372  virtual void attach_handle_data_members();
373 
378  virtual void terminate_access();
379 
380 private:
381 
383 
384 
385  // ===========================================================
387  // ===========================================================
389 
390 public:
391 
392 protected:
393 
394 private:
395 
397 
398 
399  // ===========================================================
401  // ===========================================================
403 
404 public:
405 
406 protected:
407 
408 private:
409 
411 
412 
413  // ===========================================================
415  // ===========================================================
417 
418 public:
419 
421 
430  virtual pod_index_type new_member(bool xis_jim, const scoped_index& xdof_tuple_id);
431 
441  virtual pod_index_type new_member(bool xis_jim, poset_dof_map* xdof_map = 0, bool xcopy_dof_map = false);
442 
451  virtual pod_index_type new_member_range(const std::string& xrange_type,
452  size_type xsize,
453  const block<scoped_index>& xdof_tuple_ids,
454  const block<pod_index_type>& xdata);
455 
460 
464  const section_space_schema_member& top() const;
465 
469  section_space_schema_member& bottom();
470 
474  const section_space_schema_member& bottom() const;
475 
477 
482  pod_index_type member_id(const std::string& xbase_space_name,
483  const std::string& xfiber_schema_name) const;
484 
489  void member_id(const std::string& xbase_space_name,
490  const std::string& xfiber_schema_name,
491  scoped_index& result) const;
492 
500  bool is_new_member_available() const;
501 
502 protected:
503 
504 private:
505 
507 
508 
509  // ===========================================================
511  // ===========================================================
513 
514 public:
515 
516 protected:
517 
518 private:
519 
521 
523  // $$SCRIBBLE: Remove version hack.
524 
525  // ===========================================================
527  // ===========================================================
529 
530 public:
531 
532 // ///
533 // /// The number of versions.
534 // ///
535 // virtual int version_ct() const;
536 
537 // ///
538 // /// The current version
539 // ///
540 // virtual int version() const;
541 
542 // using poset_state_handle::version_index;
543 
544 // ///
545 // /// The subposet index of the whole() subposet for version xversion.
546 // ///
547 // virtual pod_index_type version_index(int xversion) const;
548 
549 // using poset_state_handle::version_jims_index;
550 
551 // ///
552 // /// The subposet index of the jims() subposet for version xversion.
553 // ///
554 // virtual pod_index_type version_jims_index(int xversion) const;
555 
556 protected:
557 
558 private:
559 
561 
562 
563  // ===========================================================
565  // ===========================================================
567 
568 public:
569 
578  virtual index_iterator* get_decomposition(pod_index_type xindex) const;
579 
583  virtual pod_index_type prereq_id(int xi) const;
584 
585 
586 protected:
587 
588 private:
589 
591 
592 
593  // ===========================================================
595  // ===========================================================
597 
598 public:
599 
603  virtual bool is_ancestor_of(const any* other) const;
604 
608  virtual bool invariant() const;
609 
610 protected:
611 
616  virtual section_space_schema_poset* clone() const = 0;
617 
621  section_space_schema_poset& operator=(const poset_state_handle& xother);
622 
623 private:
624 
626 };
627 
628 } // namespace fiber_bundle
629 
630 #endif // SECTION_SPACE_SCHEMA_POSET_H
A client handle for a subposet.
Definition: subposet.h:86
The default name space; a poset which contains other posets as members.
poset_type
Identifiers for poset types.
Definition: poset_type.h:41
pod_index_type ordinal(pod_index_type xi, pod_index_type xj, size_type xj_ub)
2-tuple to ordinal conversion.
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
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...
Table dofs type for class section_space_schema_poset.
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...
A whitespace separated list of arguments. Insertion operaters are used to insert arguments into the l...
Definition: arg_list.h:63
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
Iterates over the subset of Zn defined by the characteristic function host().
An abstract schema poset for a section space. A Cartesian product subspace of the tensor product of a...
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.
A client handle for a poset member which has been prepared for use as a schema for a section space...
void tuple(pod_index_type x, size_type xj_ub, pod_index_type &xi, pod_index_type &xj)
Ordinal to 2-tuple conversion.
Namespace for the fiber_bundles component of the sheaf system.
A description for a section representation scheme.
virtual const scoped_index & member_id(bool xauto_access) const
An id in the member hub id space; intended for copying to initialize ids to the member id space...