SheafSystem  0.0.0.0
product_section_space_schema_member.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 PRODUCT_SECTION_SPACE_SCHEMA_MEMBER_H
22 #define PRODUCT_SECTION_SPACE_SCHEMA_MEMBER_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SECTION_SPACE_SCHEMA_MEMBER_H
29 #include "SheafSystem/section_space_schema_member.h"
30 #endif
31 
32 namespace fiber_bundle
33 {
34 
35 class product_section_space_schema_poset;
36 class sec_rep_descriptor;
37 
47 {
48  // ===========================================================
50  // ===========================================================
52 
53 public:
54 
59 
65 
69  virtual product_section_space_schema_member& operator=(const abstract_poset_member& xother);
70 
75 
80 
86  inline product_section_space_schema_member* clone(bool xnew_state,
87  bool xauto_access = true) const
88  {
89  return static_cast<product_section_space_schema_member*>
90  (section_space_schema_member::clone(xnew_state, xauto_access));
91  }
92 
93  // NEW HANDLE, NEW STATE CONSTRUCTORS
94 
101  array_poset_dof_map* xdof_map = 0,
102  bool xcopy_dof_map = false,
103  bool xauto_access = true);
104 
110  const scoped_index& xdof_tuple_id,
111  bool xauto_access);
112 
119  scoped_index* xexpansion,
120  int xexpansion_ct,
121  const tern& xnew_jem,
122  bool xauto_access);
123 
124  // NEW HANDLE, EXISTING STATE CONSTRUCTORS
125 
131  pod_index_type xhub_id);
132 
138  const scoped_index& xid);
139 
145  const std::string& xname);
146 
152  pod_index_type xbase_space_id,
153  pod_index_type xfiber_schema_id);
154 
155 
161  const scoped_index& xbase_space_id,
162  const scoped_index& xfiber_schema_id);
163 
164 
170  const poset_path& xbase_path,
171  const poset_path& xfiber_schema_path);
172 
178  const poset_path& xpath,
179  bool xauto_access = true);
180 
181 
182  // EXISTING HANDLE, NEW STATE "CONSTRUCTORS"
183 
184  // None - section_space_schema_member is immutable
185 
186 protected:
187 
191  void update_row_cache_without_disc_id_space() const;
192 
196  void update_row_cache_with_disc_id_space() const;
197 
201  void update_row_dof_id_space() const;
202 
203 private:
204 
206 
207 
208  // ===========================================================
210  // ===========================================================
212 
213 public:
214 
215 protected:
216 
217 private:
218 
220 
221 
222  // ===========================================================
224  // ===========================================================
226 
227 public:
228 
230 // ///
231 // /// The type of table dofs (xis_table_dof == true) or
232 // /// row dofs (xis_table_dof == false) defined by this schema.
233 // /// Returns NOT_A_PRIMITIVE_TYPE if the dofs are
234 // /// not all the same type.
235 // ///
236 // virtual primitive_type dof_tuple_type(bool xis_table_dof) const;
237 
238 // ///
239 // /// The number of bytes in this dof
240 // ///
241 // virtual size_t size() const;
242 
243 // ///
244 // /// The alignment for this dof
245 // ///
246 // virtual size_t alignment() const;
247 
248 // ///
249 // /// The primitive type index of the dof defined by this.
250 // ///
251 // virtual sheaf::primitive_type type() const;
252 
253 // ///
254 // /// True if this is in the table dofs part (xin_table_dofs == true)
255 // /// or in the row dofs part (xin_table_dofs == false) of some schema.
256 // ///
257 // virtual bool is_dof(bool xin_table_dofs) const;
258 
264  virtual poset_dof_iterator* dof_iterator(bool xis_table_dofs,
265  int xversion = CURRENT_MEMBER_VERSION) const;
266 
267 protected:
268 
279  virtual dof_descriptor_array* dof_descriptors(bool xis_table_dof) const;
280 
284  virtual void update_row_cache(bool xupdate_id_space = false) const;
285 
286 private:
287 
289 
290 
291  // ===========================================================
293  // ===========================================================
295 
296 public:
297 
299 
304  virtual size_type size(pod_index_type xdof_id,
305  bool xis_table_dof) const;
306 
316  virtual size_type size(pod_index_type xdisc_id,
317  pod_index_type xfiber_dof_id,
318  bool xis_table_dof) const;
319 
324  virtual size_type size(const scoped_index& xdisc_id,
325  const scoped_index& xfiber_dof_id,
326  bool xis_table_dof,
327  bool xauto_access) const;
328 
330 
335  virtual size_type alignment(pod_index_type xdof_id,
336  bool xis_table_dof) const;
337 
342  virtual size_type alignment(pod_index_type xdisc_id,
343  pod_index_type xfiber_dof_id,
344  bool xis_table_dof) const;
345 
350  virtual size_type alignment(const scoped_index& xdisc_id,
351  const scoped_index& xfiber_dof_id,
352  bool xis_table_dof,
353  bool xauto_access) const;
354 
356 
361  virtual primitive_type type(pod_index_type xdof_id,
362  bool xis_table_dof) const;
363 
368  virtual primitive_type type(pod_index_type xdisc_id,
369  pod_index_type xfiber_dof_id,
370  bool xis_table_dof) const;
371 
376  virtual primitive_type type(const scoped_index& xdisc_id,
377  const scoped_index& xfiber_dof_id,
378  bool xis_table_dof,
379  bool xauto_access) const;
380 
382 
387  virtual size_type offset(pod_index_type xdof_id,
388  bool xis_table_dof) const;
389 
394  virtual size_type offset(pod_index_type xdisc_id,
395  pod_index_type xfiber_dof_id,
396  bool xis_table_dof) const;
397 
402  virtual size_type offset(const scoped_index& xdisc_id,
403  const scoped_index& xfiber_dof_id,
404  bool xis_table_dof,
405  bool xauto_access) const;
406 
407 protected:
408 
409 private:
410 
412 
413 
414  // ===========================================================
416  // ===========================================================
418 
419 public:
420 
426  virtual index_iterator* get_decomposition(pod_index_type xindex) const;
427 
430 
431 // ///
432 // /// Gets the internal id corresponding to xext_id in the id space
433 // /// with name xid_space_name.
434 // /// @hack the product subposet hack, version 2.
435 // /// This member exists only to encapsulate the hack.
436 // ///
437 // virtual pod_index_type get_int_id(pod_index_type xext_id,
438 // const std::string& xid_space_name) const;
439 
446  virtual void get_ext_ids(const std::string& xid_space_name,
447  pod_index_type& xschema_poset_ext_id,
448  pod_index_type& xschema_member_ext_id,
449  pod_index_type& xbase_space_ext_id,
450  pod_index_type& xfiber_schema_ext_id,
451  pod_index_type& xlocal_schema_ext_id) const;
452 
453 
457  virtual schema_poset_member& ext_data_type_schema();
458 
463  virtual size_t ext_data_type_ct(bool xis_table_schema) const;
464 
465 protected:
466 
467 private:
468 
470 
471 
472  // ===========================================================
474  // ===========================================================
476 
477 public:
478 
483  virtual primitives_poset_dof_map& dof_map(bool xrequire_write_access = false);
484 
489  virtual const primitives_poset_dof_map& dof_map(bool xrequire_write_access = false) const;
490 
491 protected:
492 
493 private:
494 
496 
497 
498  // ===========================================================
500  // ===========================================================
502 
503 public:
504 
509  {
511  };
512 
517  {
519  };
520 
521 protected:
522 
523 private:
524 
526 
527 
528  // ===========================================================
530  // ===========================================================
532 
533 public:
534 
540  {
542  };
543 
549  {
551  };
552 
553 protected:
554 
555 private:
556 
558 
559 
560  // ===========================================================
562  // ===========================================================
564 
565 public:
566 
573  {
574  return static_cast<product_section_space_schema_member*>(abstract_poset_member::l_join(other, xnew_jem));
575  };
576 
583  {
584  return static_cast<product_section_space_schema_member*>(abstract_poset_member::l_meet(other, xnew_jem));
585  };
586 
592  inline product_section_space_schema_member* l_not(bool xnew_jem = true) const
593  {
595  };
596 
597 protected:
598 
599 private:
600 
602 
603 
604  // ===========================================================
606  // ===========================================================
608 
609 public:
610 
615  {
617  }
618 
622  virtual bool host_is_ancestor_of(const poset_state_handle* other) const;
623 
624 protected:
625 
626 private:
627 
629 
630 
631  // ===========================================================
633  // ===========================================================
635 
636 public:
637 
641  virtual bool is_ancestor_of(const any* other) const;
642 
646  virtual product_section_space_schema_member* clone() const;
647 
651  virtual bool invariant() const;
652 
653 protected:
654 
655 private:
656 
658 };
659 
660 } // namespace fiber_bundle
661 
662 #endif // PRODUCT_SECTION_SPACE_SCHEMA_MEMBER_H
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
abstract_poset_member * p_join(abstract_poset_member *other) const
poset join of this with other, auto-allocated the poset join is the least upper bound in the poset ...
abstract_poset_member * greatest_jem() const
The largest member which is join-equivalent to this.
virtual size_t size() const
The number of bytes in this dof.
product_section_space_schema_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...
The default name space; a poset which contains other posets as members.
A client handle for a general, abstract partially order set.
A three state "bool". Does not provide the operations of ternary logic and is intended for use mostly...
Definition: tern.h:45
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 section_space_schema_member * clone() const =0
Make a new handle, no state instance of current.
product_section_space_schema_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...
virtual primitive_type type() const
The primitive type index of the dof defined by this.
An schema poset for a section space represented by a Cartesian product subspace of the tensor product...
product_section_space_schema_member * 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...
product_section_space_schema_member * 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
virtual size_t alignment() const
The alignment for this dof.
primitive_type
Type ids for sheaf primitives.
A client handle for a mutable partially ordered set.
Definition: poset.h:40
A map from schema poset member ids to dof values for primitives_poset members.
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
abstract_poset_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-allocated The lattice pseudo-complement is the largest latt...
abstract_poset_member * least_jem() const
The smallest member which is join-equivalent to this.
An array for storing structs which describe the size, alignment, and offset of dofs within a dof tupl...
abstract_poset_member * l_meet(abstract_poset_member *other, bool xnew_jem=true)
lattice meet of this with other, auto-allocated the lattice meet is the greatest lower bound in the...
Iterates over the subset of Zn defined by the characteristic function host().
Iterates in postorder over dofs of a schema member anchor. Attaches a handle of type schema_poset_mem...
product_section_space_schema_member * greatest_jem() const
The largest member which is join-equivalent to this.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A client handle for a poset member which has been prepared for use as a schema for a section space...
product_section_space_schema_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...
virtual size_type offset(pod_index_type xdof_id, bool xis_table_dof) const
The offset for the table dof (xis_table_dof true) or row dof referred to by xdof_id in the schema def...
An abstract client handle for a member of a poset.
abstract_poset_member * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-allocated the poset meet is the greatest lower bound in the pos...
An array representation of abstract class poset_dof_map.
Namespace for the fiber_bundles component of the sheaf system.
A client handle for a poset member which has been prepared for use as a schema.
product_section_space_schema_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...
product_section_space_schema_poset * host() const
The poset which this is a handle to a component of.
product_section_space_schema_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
abstract_poset_member * l_join(abstract_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-allocated the lattice join is the least upper bound in the la...
A client handle for a poset member which has been prepared for use as a schema for a section space...