SheafSystem  0.0.0.0
product_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 PRODUCT_SECTION_SPACE_SCHEMA_POSET_H
22 #define PRODUCT_SECTION_SPACE_SCHEMA_POSET_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SECTION_SPACE_SCHEMA_POSET_H
29 #include "SheafSystem/section_space_schema_poset.h"
30 #endif
31 
32 #ifndef NAMESPACE_RELATIVE_MEMBER_INDEX_H
33 #include "SheafSystem/namespace_relative_member_index.h"
34 #endif
35 
36 namespace sheaf
37 {
38 class ij_product_structure;
39 }
40 
41 namespace fiber_bundle
42 {
43 
44 using namespace sheaf;
45 
46 class product_section_space_schema_crg_range;
47 class product_section_space_schema_member;
48 class section_space_schema_table_dof_crg_range;
49 
56 {
57  friend class fiber_bundles_namespace;
58  friend class ij_product_structure;
61  friend class sec_rep_space;
63 
64  // ===========================================================
66  // ===========================================================
68 
69 public:
70 
74  static arg_list make_arg_list(const poset_path& xrep_path,
75  const poset_path& xbase_space_path,
76  const poset_path& xfiber_space_path);
77 
84  const std::string& xname,
85  const arg_list& xargs,
86  const poset_path& xschema_path,
87  bool xauto_access);
88 
89 protected:
90 
95 
100 
105 
109  virtual void initialize_arg_list(const namespace_poset& xns,
110  const std::string& xname,
111  arg_list& xargs,
112  const poset_path& xschema_path,
113  bool xauto_access);
114 
118  const ij_product_structure& product_structure() const;
119 
124  void initialize_row_dof_subposet();
125 
129  section_space_schema_table_dof_crg_range& table_dof_range();
130 
134  void put_table_dof_range(section_space_schema_table_dof_crg_range& xtable_dof_range);
135 
140 
144  void put_product_range(product_section_space_schema_crg_range& xproduct_range);
145 
149  static bool make_prototype();
150 
155 
160 
161 private:
162 
164 
165 
166  // ===========================================================
168  // ===========================================================
170 
171 public:
172 
176  static const poset_path& standard_schema_path();
177 
181  static void make_standard_schema(namespace_poset& xns);
182 
184 
189  virtual void tuple(pod_index_type xindex,
190  pod_index_type& xbase_space_id,
191  pod_index_type& xfiber_schema_id) const;
192 
194 
199  virtual void ordinal(pod_index_type xbase_space_id,
200  pod_index_type xfiber_schema_id,
201  pod_index_type& xindex) const;
202 
203  using section_space_schema_poset::is_homogeneous;
204 
208  virtual bool is_homogeneous(pod_index_type xindex) const;
209 
214  virtual bool contains_range_member(pod_index_type xbase_space_id,
215  pod_index_type xfiber_schema_id,
216  bool xauto_access) const;
217 
221  virtual void update_hub_id_space(bool xauto_access);
222 
223 protected:
224 
225 private:
226 
228 
229 
230  // ===========================================================
232  // ===========================================================
234 
235 public:
236 
240  virtual poset_type type_id() const;
241 
245  virtual const char* class_name() const;
246 
247 protected:
248 
254  void new_state(namespace_poset& xhost,
255  const std::string& xname,
256  const arg_list& xargs,
257  const poset_path& xschema_path,
258  bool xauto_access);
259 
265  virtual void new_state(const schema_poset_member& xschema,
266  array_poset_dof_map& xdof_map);
267 
268 private:
269 
271 
272 
273  // ===========================================================
275  // ===========================================================
277 
278 public:
279 
280 protected:
281 
282 private:
283 
285 
286 
288 // // ===========================================================
289 // /// @name SCHEMATIZATION FACET
290 // // ===========================================================
291 // //@{
292 
293 // public:
294 
295 // using poset_state_handle::is_schematized;
296 
297 // ///
298 // /// True if this poset has been prepared for use as a schema,
299 // /// that is, if the top member has been schematized.
300 // ///
301 // virtual bool is_schematized(bool xauto_access) const;
302 
303 // ///
304 // /// True if the member with index xindex has been prepared for use as a schema.
305 // ///
306 // virtual bool is_schematized(pod_index_type xindex, bool xauto_access) const;
307 
308 // ///
309 // /// Prepare this poset and its top member for use as a schema.
310 // /// If xall_members = true, schematize all other members as well.
311 // ///
312 // virtual void schematize(subposet* xtable_dof_subposet,
313 // subposet* xrow_dof_subposet,
314 // bool xall_members = false);
315 
316 // protected:
317 
318 // private:
319 
320 // //@}
321 
322 
323  // ===========================================================
325  // ===========================================================
327 
328 public:
329 
334 
338  const product_section_space_schema_member& top() const;
339 
344 
348  const product_section_space_schema_member& bottom() const;
349 
351 
355  virtual bool is_jim(pod_index_type xindex, bool xin_current_version = true) const;
356 
358 
362  virtual string member_name(pod_index_type xindex, bool xauto_access = false) const;
363 
364 protected:
365 
369  virtual void initialize_standard_members();
370 
371 private:
372 
374 
375 
376  // ===========================================================
378  // ===========================================================
380 
381 public:
382 
384 // using poset_state_handle::is_valid_int_id;
385 
386 // ///
387 // /// True if xint_id can be translated to an external id using
388 // /// the equivalence map with name xid_space_name.
389 // ///
390 // virtual bool is_valid_int_id(pod_index_type xint_id,
391 // const std::string& xid_space_name,
392 // bool xauto_access) const;
393 
394 // using poset_state_handle::get_ext_id;
395 
396 // ///
397 // /// Translates xint_id to an external id using
398 // /// the equivalence map with name xid_space_name.
399 // ///
400 // virtual pod_index_type get_ext_id(pod_index_type xint_id,
401 // const std::string& xid_space_name,
402 // bool xauto_access) const;
403 
410  virtual schema_poset_member*
411  new_schema_handle(const std::string& xid_space_name,
412  pod_index_type xschema_member_ext_id,
413  pod_index_type xbase_space_ext_id,
414  pod_index_type xfiber_schema_ext_id,
415  pod_index_type xlocal_schema_ext_id);
416 
417  // Note that we can not covariantly redefine the return type
418  // of new_schema_handle without including product_section_space_schema_member.h,
419  // which causes a cyclic dependency between the poset and member classes.
420 
421 protected:
422 
423 private:
424 
426 
427 
428  // ===========================================================
430  // ===========================================================
432 
433 public:
434 
438  virtual bool is_ancestor_of(const any* other) const;
439 
443  virtual bool invariant() const;
444 
445 protected:
446 
451  virtual product_section_space_schema_poset* clone() const;
452 
456  product_section_space_schema_poset& operator=(const poset_state_handle& xother);
457 
458 private:
459 
461 };
462 
463 } // namespace fiber_bundle
464 
465 #endif // PRODUCT_SECTION_SPACE_SCHEMA_POSET_H
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...
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 ('/'). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
An schema poset for a section space represented by a Cartesian product subspace of the tensor product...
Abstract base class with useful features for all objects.
Definition: any.h:39
A whitespace separated list of arguments. Insertion operaters are used to insert arguments into the l...
Definition: arg_list.h:63
Abstract emulator for a range of implicit section space schema members.
virtual std::string member_name(pod_index_type xmbr_hub_id, bool xauto_access=false) const
A name for the member with hub id xmbr_hub_id.
product_section_space_schema_crg_range * _product_range
The implicit crg range that represents the product members of this poset.
An abstract schema poset for a section space. A Cartesian product subspace of the tensor product of a...
Emulator for a range of implicit section space schema members representing the Cartesian product the ...
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.
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...
void tuple(pod_index_type x, size_type xj_ub, pod_index_type &xi, pod_index_type &xj)
Ordinal to 2-tuple conversion.
An array representation of abstract class poset_dof_map.
Namespace for the fiber_bundles component of the sheaf system.
section_space_schema_table_dof_crg_range * _table_dof_range
The implicit crg range that represents the table dof members of this poset.
A client handle for a poset member which has been prepared for use as a schema.
A client handle for a poset member which has been prepared for use as a schema for a section space...
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61