SheafSystem  0.0.0.0
point_block_3d.cc
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 #include "SheafSystem/point_block_3d.h"
22 
23 #include "SheafSystem/assert_contract.h"
24 #include "SheafSystem/arg_list.h"
25 //#include "SheafSystem/base_space_member_prototype.h"
26 #include "SheafSystem/chart_point_3d.h"
27 #include "SheafSystem/fiber_bundles_namespace.h"
28 #include "SheafSystem/namespace_poset.h"
29 #include "SheafSystem/point_block_crg_interval.h"
30 #include "SheafSystem/poset_path.h"
31 #include "SheafSystem/preorder_iterator.h"
32 #include "SheafSystem/tern.h"
33 #include "SheafSystem/wsv_block.h"
34 
35 using namespace fiber_bundle; // Workaround for MS C++ bug.
36 
37 // ===========================================================
38 // HOST FACTORY FACET
39 // ===========================================================
40 
41 // PUBLIC DATA MEMBERS
42 
43 const sheaf::poset_path&
46 {
47 
48  // Preconditions:
49 
50  // Body:
51 
52  static const poset_path
53  STATIC_PROTOTYPE_PATH(base_space_member::prototypes_poset_name(), "point_block_3d");
54 
55  const poset_path& result = STATIC_PROTOTYPE_PATH;
56 
57  // Postconditions:
58 
60  ensure(result.member_name() == "point_block_3d");
61 
62  // Exit
63 
64  return result;
65 }
66 
69 new_host(namespace_type& xns, const poset_path& xhost_path, const poset_path& xschema_path, bool xauto_access)
70 {
71  // cout << endl << "Entering point_block_3d::new_host." << endl;
72 
73  // Preconditions:
74 
75  require(xns.state_is_auto_read_write_accessible(xauto_access));
76 
77  require(!xhost_path.empty());
78  require(!xns.contains_path(xhost_path, xauto_access));
79 
80  require(xschema_path.full());
81  require(xns.path_is_auto_read_accessible(xschema_path, xauto_access));
82  require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path(), xauto_access));
83 
84  // Body:
85 
86  host_type& result =
87  host_type::new_table(xns, xhost_path, xschema_path, 0, xauto_access);
88 
89  // Postconditions:
90 
91  ensure(xns.owns(result, xauto_access));
92  ensure(result.path(true) == xhost_path);
93  ensure(result.state_is_not_read_accessible());
94  ensure(result.schema(true).path(xauto_access) == xschema_path);
95 
96  ensure(result.max_db() == 0);
97 
98  // Exit:
99 
100  // cout << "Leaving point_block_3d::new_host." << endl;
101  return result;
102 }
103 
106 standard_host(namespace_type& xns, const poset_path& xhost_path, bool xauto_access)
107 {
108  // cout << endl << "Entering point_block_3d::standard_host." << endl;
109 
110  // Preconditions:
111 
112  require(xns.state_is_auto_read_write_accessible(xauto_access));
113 
114  require(poset_path::is_valid_name(xhost_path.poset_name()));
115  require(xns.path_is_auto_read_write_available<host_type>(xhost_path.poset_name(), xauto_access));
116 
117  require(xns.path_is_auto_read_accessible(standard_schema_path(), xauto_access));
118 
119  // Body:
120 
121  host_type* result_ptr;
122  if(xns.contains_path(xhost_path.poset_name(), xauto_access))
123  {
124  result_ptr = &xns.member_poset<host_type>(xhost_path, xauto_access);
125  }
126  else
127  {
128  result_ptr = &new_host(xns, xhost_path, standard_schema_path(), xauto_access);
129  }
130 
131  host_type& result = *result_ptr;
132 
133  // Postconditions:
134 
135  ensure(xns.owns(result, xauto_access));
136  ensure(result.path(true) == xhost_path);
137  ensure(result.state_is_not_read_accessible());
138  ensure(result.schema(true).path(xauto_access) == standard_schema_path());
139 
140  ensure(result.max_db() == 0);
141 
142  // Exit:
143 
144  // cout << "Leaving point_block_3d::standard_host." << endl;
145  return result;
146 }
147 
148 // PROTECTED DATA MEMBERS
149 
150 // PRIVATE DATA MEMBERS
151 
152 
153 // ===========================================================
154 // POINT_BLOCK_3D FACET
155 // ===========================================================
156 
157 // PUBLIC DATA MEMBERS
158 
161 {
162  // Preconditions:
163 
164  // Body:
165 
166  // Postconditions:
167 
168  ensure(invariant());
169  ensure(! is_attached() );
170 }
171 
173 point_block_3d(const abstract_poset_member& xother, bool xnew_jem)
174 {
175  // Preconditions:
176 
177  require(xnew_jem ? xother.is_attached() : true);
178 
179  // Body:
180 
181  if(xnew_jem)
182  {
183  new_jem_state(const_cast<abstract_poset_member*>(&xother), true, true);
184  }
185  else
186  {
187  attach_to_state(&xother);
188  }
189 
190  // postconditions:
191 
192  ensure(invariant());
193  ensure(is_attached() == xother.is_attached() );
194 }
195 
198 {
199  // Preconditions:
200 
201  // Body:
202 
203  // Exit
204 
205  return;
206 }
207 
208 // NEW HANDLE, NEW STATE CONSTRUCTORS:
209 
212  const size_type& xi_size,
213  const size_type& xj_size,
214  const size_type& xk_size,
215  bool xauto_access)
216 {
217  // Preconditions:
218 
219  require(precondition_of(new_state(same args)));
220 
221  // Body:
222 
223  new_state(xhost, xi_size, xj_size, xk_size, xauto_access);
224 
225  // Postconditions:
226 
227  ensure(postcondition_of(new_state(same args)));
228 
229  // Exit:
230 
231  return;
232 }
233 
234 // NEW HANDLE, EXISTING STATE CONSTRUCTORS:
235 
237 point_block_3d(const poset* xhost, pod_index_type xhub_id)
238 {
239  // Preconditions:
240 
241  require(precondition_of(attach_to_state(xhost, xhub_id)));
242 
243  // Body:
244 
245  attach_to_state(xhost, xhub_id);
246 
247  // Postconditions:
248 
249  ensure(postcondition_of(attach_to_state(xhost, xhub_id)));
250 }
251 
253 point_block_3d(const poset* xhost, const scoped_index& xid)
254 {
255  // Preconditions:
256 
257  require(precondition_of(attach_to_state(xhost, xid)));
258 
259  // Body:
260 
261  attach_to_state(xhost, xid.hub_pod());
262 
263  // Postconditions:
264 
265  ensure(postcondition_of(attach_to_state(xhost, xid)));
266 }
267 
269 point_block_3d(const poset* xhost, const std::string& xname)
270 {
271  // Preconditions:
272 
273  require(precondition_of(attach_to_state(same args)));
274 
275  // Body:
276 
277  attach_to_state(xhost, xname);
278 
279  // Postconditions:
280 
281  ensure(postcondition_of(attach_to_state(same args)));
282 }
283 
285 point_block_3d(const namespace_poset* xnamespace,
286  const poset_path& xpath,
287  bool xauto_access)
288 {
289  // Preconditions:
290 
292 
293  require(precondition_of(attach_to_state(same args)));
294 
295  // Body:
296 
297  attach_to_state(xnamespace, xpath, xauto_access);
298 
299  // Postconditions:
300 
301  ensure(postcondition_of(attach_to_state(same args)));
302 
303  // Exit:
304 
305  return;
306 }
307 
309 point_block_3d(const namespace_poset* xnamespace,
310  pod_index_type xposet_id,
311  pod_index_type xmember_id)
312 {
313  // Preconditions:
314 
316 
317  require(precondition_of(attach_to_state(same args)));
318 
319  // Body:
320 
321  attach_to_state(xnamespace, xposet_id, xmember_id);
322 
323  // Postconditions:
324 
325  ensure(postcondition_of(attach_to_state(same args)));
326 
327  // Exit:
328 
329  return;
330 }
331 
333 point_block_3d(const namespace_poset* xnamespace,
334  const scoped_index& xposet_id,
335  const scoped_index& xmember_id)
336 {
337  // Preconditions:
338 
340 
341  require(precondition_of(attach_to_state(same args)));
342 
343  // Body:
344 
345  attach_to_state(xnamespace, xposet_id.hub_pod(), xmember_id.hub_pod());
346 
347  // Postconditions:
348 
349  ensure(postcondition_of(attach_to_state(same args)));
350 
351  // Exit:
352 
353  return;
354 }
355 
356 // EXISTING HANDLE, NEW STATE "CONSTRUCTORS":
357 
358 void
360 new_state(const size_type& xi_size,
361  const size_type& xj_size,
362  const size_type& xk_size,
363  bool xauto_access)
364 {
365  // Preconditions:
366 
367  require(precondition_of(new_state(host(), xi_size, xj_size, xk_size, xauto_access)));
368 
369  // Body:
370 
371  new_state(host(), xi_size, xj_size, xk_size, xauto_access);
372 
373  // Postconditions:
374 
375  ensure(postcondition_of(new_state(host(), xi_size, xj_size, xk_size, xauto_access)));
376 
377  // Exit:
378 
379  return;
380 }
381 
382 void
385  const size_type& xi_size,
386  const size_type& xj_size,
387  const size_type& xk_size,
388  bool xauto_access)
389 {
390  // Preconditions:
391 
392  require(xhost != 0);
393  require(xauto_access ? xhost->is_attached() : xhost->in_jim_edit_mode());
394  require(xauto_access || xhost->name_space()->state_is_read_accessible());
395  require(xhost->name_space()->contains_poset_member(static_prototype_path(), true));
396  require(xauto_access || xhost->name_space()->member_poset(prototypes_poset_name(), true).state_is_read_accessible());
397 
398  // Get access if auto access is requested. Need to do it here so the
399  // remaining preconditions can be executed.
400 
401  if(xauto_access)
402  {
403  xhost->begin_jim_edit_mode(true);
404  xhost->name_space()->get_read_access();
405  xhost->name_space()->member_poset(prototypes_poset_name(), false).get_read_access();
406  }
407 
408  require(namespace_is_ancestor_of(xhost->name_space()));
409  require(xhost->schema().row_conforms_to(standard_schema_path()));
410 
412 
413  require(dynamic_cast<base_space_poset*>(xhost) != 0);
414 
415  require(xi_size > 1);
416  require(xj_size > 1);
417  require(xk_size > 1);
418 
419  // Body:
420 
421  // Get the size for the interval.
422 
423  size_type lsize;
424  point_block_crg_interval::get_size(xi_size, xj_size, xk_size, lsize);
425 
426  // Get the dof tuple_ids.
427 
428  block<pod_index_type> ldof_tuple_ids;
429  point_block_crg_interval::get_dof_tuple_ids(*xhost, xi_size, xj_size, xk_size, ldof_tuple_ids);
430 
431  // Get the private data for the interval
432 
433  block<pod_index_type> ldata;
434  point_block_crg_interval::get_private_data(xi_size, xj_size, xk_size, ldata);
435 
436  // Create the implicit crg interval for the block.
437 
438  pod_index_type lindex =
439  xhost->new_member_interval("point_block_crg_interval", lsize, ldof_tuple_ids, ldata);
440 
441  // Attach this handle to it.
442 
443  attach_to_state(xhost, lindex);
444 
445  // Block is linked to bottom via implicit lower cover of vertices,
446  // but not linked to top; link it now.
447 
448  xhost->top().create_cover_link(this);
449 
450  // Postconditions:
451 
452  ensure(invariant());
453  ensure(host() == xhost);
454  ensure(is_attached());
455  ensure(db() == 0);
456  ensure(prototype_path() == static_prototype_path());
457  ensure(local_cell_type_name() == static_local_cell_prototype_path().member_name());
458  ensure(i_size() == xi_size);
459  ensure(j_size() == xj_size);
460  ensure(k_size() == xk_size);
461 
462  // Release access if auto access was requested.
463 
464  if(xauto_access)
465  {
466  xhost->name_space()->member_poset(prototypes_poset_name(), false).release_access();
467  xhost->name_space()->release_access();
468 
469  // End jim edit mode without ensure_lattice_invariant;
470  // the check is unnecessary and expensive.
471 
472  xhost->end_jim_edit_mode(false, true);
473  }
474 
475  // Exit:
476 
477  return;
478 }
479 
480 // FEATURES:
481 
482 const sheaf::size_type&
484 i_size() const
485 {
486  // Preconditions:
487 
488  require(state_is_read_accessible());
489 
490  // Body:
491 
492  point_block_3d* cthis = const_cast<point_block_3d*>(this);
493  const size_type& result = cthis->row_dof_tuple()->i_size;
494 
495  // Postconditions:
496 
497  // Exit
498 
499  return result;
500 }
501 
502 void
504 put_i_size(const size_type& xsize)
505 {
506  // Preconditions:
507 
508  require(state_is_read_accessible());
509 
510  // Body:
511 
512  row_dof_tuple()->i_size = xsize;
513 
514  // Postconditions:
515 
516  ensure(i_size() == xsize);
517 
518  // Exit
519 
520  return;
521 }
522 
523 const sheaf::size_type&
525 j_size() const
526 {
527  // Preconditions:
528 
529  require(state_is_read_accessible());
530 
531  // Body:
532 
533  point_block_3d* cthis = const_cast<point_block_3d*>(this);
534  const size_type& result = cthis->row_dof_tuple()->j_size;
535 
536  // Postconditions:
537 
538  // Exit
539 
540  return result;
541 }
542 
543 void
545 put_j_size(const size_type& xsize)
546 {
547  // Preconditions:
548 
549  require(state_is_read_accessible());
550 
551  // Body:
552 
553  row_dof_tuple()->j_size = xsize;
554 
555  // Postconditions:
556 
557  ensure(j_size() == xsize);
558 
559  // Exit
560 
561  return;
562 }
563 
564 const sheaf::size_type&
566 k_size() const
567 {
568  // Preconditions:
569 
570  require(state_is_read_accessible());
571 
572  // Body:
573 
574  point_block_3d* cthis = const_cast<point_block_3d*>(this);
575  const size_type& result = cthis->row_dof_tuple()->k_size;
576 
577  // Postconditions:
578 
579  // Exit
580 
581  return result;
582 }
583 
584 void
586 put_k_size(const size_type& xsize)
587 {
588  // Preconditions:
589 
590  require(state_is_read_accessible());
591 
592  // Body:
593 
594  row_dof_tuple()->k_size = xsize;
595 
596  // Postconditions:
597 
598  ensure(k_size() == xsize);
599 
600  // Exit
601 
602  return;
603 }
604 
605 // PROTECTED DATA MEMBERS
606 
610  size_type xi_size,
611  size_type xj_size,
612  size_type xk_size,
613  bool xauto_access)
614 {
615  // Preconditions:
616 
617  require(xhost.state_is_auto_read_write_accessible(xauto_access));
618 
619  require(xauto_access || xhost.name_space()->poset_state_is_read_accessible(static_prototype_path()));
620  require(xhost.name_space()->contains_poset_member(static_prototype_path()));
621  require(xhost.name_space()->contains_poset_member(static_local_cell_prototype_path()));
622 
623  require(xi_size > 0);
624  require(xj_size > 0);
625  require(xk_size > 0);
626 
627  // Body:
628 
629  if(xauto_access)
630  {
631  xhost.get_read_write_access(true);
632  xhost.name_space()->get_read_access();
633  xhost.name_space()->member_poset(prototypes_poset_name(), false).get_read_access();
634  }
635 
636  // Calcualate the number of cells.
637 
638  size_type lsize = xi_size*xj_size*xk_size;
639 
640  // Create the map and initialize inherited dofs.
641 
642  scoped_index result =
643  new_row_dof_map(xhost,
644  static_prototype_path().member_name(),
645  static_local_cell_prototype_path().member_name(),
646  lsize,
647  false);
648 
649  row_dof_tuple_type* ltuple =
650  reinterpret_cast<row_dof_tuple_type*>(xhost.row_dof_map(result, true).dof_tuple());
651 
652  // Set the size in the i, j and k directions.
653 
654  ltuple->i_size = xi_size;
655  ltuple->j_size = xj_size;
656  ltuple->k_size = xk_size;
657 
658  if(xauto_access)
659  {
660  xhost.name_space()->member_poset(prototypes_poset_name(), false).release_access();
661  xhost.name_space()->release_access();
662  xhost.release_access();
663  }
664 
665  // Postconditions:
666 
667  // Exit:
668 
669  return result;
670 }
671 
672 // PRIVATE DATA MEMBERS
673 
674 
675 // ===========================================================
676 // HOMOGENEOUS_BLOCK FACET
677 // ===========================================================
678 
679 // PUBLIC DATA MEMBERS
680 
681 const sheaf::poset_path&
684 {
685 
686  // Preconditions:
687 
688  // Body:
689 
692 
693  static const poset_path
694  STATIC_LOCAL_CELL_PROTOTYPE_PATH(base_space_member::prototypes_poset_name(),
695  "point");
696 
697  const poset_path& result = STATIC_LOCAL_CELL_PROTOTYPE_PATH;
698 
699  // Postconditions:
700 
702  ensure(result.member_name() == "point");
703 
704  // Exit
705 
706  return result;
707 }
708 
709 // PROTECTED DATA MEMBERS
710 
711 // PRIVATE DATA MEMBERS
712 
713 
714 // ===========================================================
715 // BASE_SPACE_MEMBER FACET
716 // ===========================================================
717 
718 // PUBLIC DATA MEMBERS
719 
720 // PROTECTED DATA MEMBERS
721 
722 // PRIVATE DATA MEMBERS
723 
724 
725 // ===========================================================
726 // TOTAL_POSET_MEMBER FACET
727 // ===========================================================
728 
729 // PUBLIC DATA MEMBERS
730 
731 // PROTECTED DATA MEMBERS
732 
733 // PRIVATE DATA MEMBERS
734 
735 
736 // ===========================================================
737 // ABSTRACT_POSET_MEMBER FACET
738 // ===========================================================
739 
740 // PUBLIC DATA MEMBERS
741 
744 clone() const
745 {
746 
747  // Preconditions:
748 
749  // Body:
750 
751  // create new handle of the current class.
752 
753  point_block_3d *result = new point_block_3d();
754 
755  // Postconditions:
756 
757  ensure(result != 0);
758  ensure(result->invariant());
759 
760  // Exit:
761 
762  return result;
763 
764 }
765 
766 // PROTECTED DATA MEMBERS
767 
768 // PRIVATE DATA MEMBERS
769 
770 
771 // ===========================================================
772 // ANY FACET
773 // ===========================================================
774 
775 // PUBLIC DATA MEMBERS
776 
777 bool
779 invariant() const
780 {
781  // Preconditions:
782 
783  // Body:
784 
785  // Must satisfy base class invariant
786 
787  invariance(total_poset_member::invariant());
788 
789  if(invariant_check())
790  {
791  // Prevent recursive calls to invariant
792 
793  disable_invariant_check();
794 
795  // Invariants for this class:
796 
797  invariance(state_is_read_accessible() ? is_jim(false) : true);
798  invariance(state_is_read_accessible() ?
799  size() == (i_size()*j_size()*k_size()) : true);
800 
801  // Finished, turn invariant checking back on.
802 
803  enable_invariant_check();
804  }
805 
806  // Postconditions:
807 
808  // Exit
809 
810  return true;
811 }
812 
813 bool
815 is_ancestor_of(const any* xother) const
816 {
817  bool result;
818 
819  // Preconditions:
820 
821  // Body:
822 
823  result = dynamic_cast<const point_block_3d*>(xother) != 0;
824 
825  // Postconditions:
826 
827  // Exit
828 
829  return result;
830 }
831 
835 {
836  // Preconditions:
837 
838  // Body:
839 
840  attach_to_state(&xother);
841 
842  // Postconditions:
843 
844  ensure(is_same_state(&xother));
845 
846  // Exit
847 
848  return *this;
849 }
850 
853 operator=(const point_block_3d& xother)
854 {
855 
856  // Preconditions:
857 
858  require(is_ancestor_of(&xother));
859 
860  // Body
861 
862  not_implemented();
863 
864  // Postconditions
865 
866  ensure(invariant());
867 
868  // Exit
869 
870  return *this;
871 
872 }
873 
874 // PROTECTED DATA MEMBERS
875 
876 // PRIVATE DATA MEMBERS
877 
878 
virtual void get_read_write_access(bool xrelease_read_only_access=false)
Get read write access to the state associated with this. If release_read_only_access is requested...
virtual bool invariant() const
Class invariant.
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
bool state_is_auto_read_write_accessible(bool xauto_access) const
True if state is auto accessible for read and write, that is, if the state is already accessible for ...
bool path_is_auto_read_write_available(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath does not exist or exists and is auto read-write accessible...
virtual void create_cover_link(abstract_poset_member *xlesser)
Insert a link from this to lesser; make lesser <= this.
bool full() const
True if both poset name and member name are not empty.
Definition: poset_path.cc:311
abstract_poset_member & top()
The top member of the poset (mutable version)
static void get_dof_tuple_ids(poset_state_handle &xhost, size_type xi_size, block< pod_index_type > &result)
The dof tuple ids for an instance created with parameter xi_size.
point_block_3d()
Default constructor; creates a new, unattached point_block_3d handle.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
const size_type & i_size() const
The upper bound for index_0; the number of "vertices" in the 0-th direction in the conceptual array t...
poset_path path(bool xauto_access=true) const
A path to this component.
bool conforms_to(const schema_poset_member &xother) const
True if the dofs defined by this agree in type and in order with the dofs defined by xother...
The default name space; a poset which contains other posets as members.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
bool path_is_auto_read_accessible(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath exists and is auto read accessible.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
const size_type & j_size() const
The upper bound for index_1; the number of "vertices" in the 1-th direction in the conceptual array t...
bool contains_poset_member(pod_index_type xposet_hub_id, pod_index_type xmember_hub_id, bool xauto_access=true) const
True if this contains a poset with hub id xposet_hub_id which contains a member with hub id xmember_h...
A client handle for a general, abstract partially order set.
virtual void * dof_tuple()=0
The dof tuple (mutable version).
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
void new_state(const size_type &xi_size, const size_type &xj_size, const size_type &xk_size, bool xauto_access=true)
Creates a new homogeneous_block_1d state in host() with i_size() == xi_size, j_size() == xj_size...
virtual bool invariant() const
Class invariant.
poset_state_handle & member_poset(pod_index_type xhub_id, bool xauto_access=true) const
The poset_state_handle object referred to by hub id xhub_id.
static void get_private_data(size_type xi_size, block< pod_index_type > &result)
The private data for an instance with parameter xi_size.
static const std::string & prototypes_poset_name()
The name of the prototypes poset.
virtual ~point_block_3d()
Destructor; deletes a poset member and its attached state, if any.
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...
size_type k_size
The upper bound on the z direction index for structured blocks.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
size_type i_size
The upper bound on the x direction index for structured blocks.
static const poset_path & static_prototype_path()
The path of the prototype required by this class.
A client handle for a mutable partially ordered set.
Definition: poset.h:40
bool owns(const poset_state_handle &xposet, bool xauto_access) const
True if and only if this contains the poset xposet. synonym for contains_poset(xposet.poset_path(true), xauto_access)
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
virtual bool is_attached() const
True if this handle is attached to a non-void state.
virtual void get_read_access() const
Get read access to the state associated with this.
void put_j_size(const size_type &xsize)
Sets j_size() to xsize.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
void put_k_size(const size_type &xsize)
Sets k_size() to xsize.
std::string poset_name() const
The poset name part of the path.
Definition: poset_path.cc:473
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
bool empty() const
True if both poset name and member name are empty.
Definition: poset_path.cc:291
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
size_type j_size
The upper bound on the y direction index for structured blocks.
bool poset_state_is_read_accessible(const poset_path &xpath, bool xauto_access=true) const
True if the poset referred to by xpath is read accessible.
virtual poset_dof_map & row_dof_map(pod_index_type xtuple_hub_id, bool xrequire_write_access=false) const
The map from row dof client_ids to row dof values for dof tuple hub id xtuple_hub_id.
namespace_poset * name_space() const
The namespace this poset resides in.
virtual bool is_attached() const
True if this is attached to a state.
static void get_size(size_type xi_size, size_type &result)
The size for an instance created with parameters xi_size, xj_size, xk_size.
static host_type & standard_host(namespace_type &xns, const poset_path &xhost_path, bool xauto_access)
The host with path xhost_path. Returns the host if it already exists, otherwise, creates it in namesp...
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
std::string member_name() const
The member name part of the path.
Definition: poset_path.cc:511
virtual void end_jim_edit_mode(bool xensure_lattice_invariant=true, bool xauto_access=true)
Prevent editing of jims and jim order relation.
Definition: poset.cc:253
virtual pod_index_type new_member_interval(const std::string &xinterval_type, size_type xsize, const block< pod_index_type > &xtuple_hub_ids, const block< pod_index_type > &xdata)
Create a disconnected member interval of type xinterval_type with size xsize, dof tuple ids xtuple_hu...
static bool is_valid_name(const std::string &xname)
True if xname is not empty and contains only name legal characters.
Definition: poset_path.cc:331
static scoped_index new_row_dof_map(poset_state_handle &xhost, size_type xi_size, size_type xj_size, size_type xk_size, bool xauto_access)
Creates a new row dof map and initializes it.
virtual void get_read_access() const
Get read access to the state associated with this.
int max_db() const
The maximum dimension of the members of this base space.
An abstract client handle for a member of a poset.
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, bool xauto_access)
Creates a new host poset for members of this type. The poset is created in namespace xns with path xh...
bool row_conforms_to(const schema_poset_member &xother) const
True if the row dofs defined by this agree in type and in order with the dofs defined by xother...
The type of row dof tuple for base_space_member.
bool in_jim_edit_mode() const
True if editing jims and jim order relation is allowed.
virtual point_block_3d & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
Namespace for the fiber_bundles component of the sheaf system.
A homogeneous collection of i_size()*j_size()*k_size() disconnected points similar to a structured_bl...
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
virtual point_block_3d * clone() const
Make a new handle, no state instance of current.
void put_i_size(const size_type &xsize)
Sets i_size() to xsize.
static const poset_path & static_local_cell_prototype_path()
The path of the local cell prototype required by this class.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
row_dof_tuple_type * row_dof_tuple(bool xrequire_write_access=false)
The row dof tuple for this.
const size_type & k_size() const
The upper bound for index_2; the number of "vertices" in the 2-th direction in the conceptual array t...
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
Definition: scoped_index.h:710
virtual void begin_jim_edit_mode(bool xauto_access=true)
Allow editing of jims and jim order relation.
Definition: poset.cc:230