SheafSystem  0.0.0.0
point_block_2d.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_2d.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/poset_path.h"
30 #include "SheafSystem/preorder_iterator.h"
31 #include "SheafSystem/point_block_crg_interval.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_2d");
54 
55  const poset_path& result = STATIC_PROTOTYPE_PATH;
56 
57  // Postconditions:
58 
60  ensure(result.member_name() == "point_block_2d");
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_2d::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_2d::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_2d::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_2d::standard_host." << endl;
145  return result;
146 }
147 
148 // PROTECTED DATA MEMBERS
149 
150 // PRIVATE DATA MEMBERS
151 
152 
153 // ===========================================================
154 // POINT_BLOCK_2D 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_2d(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  bool xauto_access)
215 {
216  // Preconditions:
217 
218  require(precondition_of(new_state(same args)));
219 
220  // Body:
221 
222  new_state(xhost, xi_size, xj_size, xauto_access);
223 
224  // Postconditions:
225 
226  ensure(postcondition_of(new_state(same args)));
227 
228  // Exit:
229 
230  return;
231 }
232 
233 // NEW HANDLE, EXISTING STATE CONSTRUCTORS:
234 
236 point_block_2d(const poset* xhost, pod_index_type xhub_id)
237 {
238  // Preconditions:
239 
240  require(precondition_of(attach_to_state(xhost, xhub_id)));
241 
242  // Body:
243 
244  attach_to_state(xhost, xhub_id);
245 
246  // Postconditions:
247 
248  ensure(postcondition_of(attach_to_state(xhost, xhub_id)));
249 }
250 
252 point_block_2d(const poset* xhost, const scoped_index& xid)
253 {
254  // Preconditions:
255 
256  require(precondition_of(attach_to_state(xhost, xid)));
257 
258  // Body:
259 
260  attach_to_state(xhost, xid.hub_pod());
261 
262  // Postconditions:
263 
264  ensure(postcondition_of(attach_to_state(xhost, xid)));
265 }
266 
268 point_block_2d(const poset* xhost, const std::string& xname)
269 {
270  // Preconditions:
271 
272  require(precondition_of(attach_to_state(same args)));
273 
274  // Body:
275 
276  attach_to_state(xhost, xname);
277 
278  // Postconditions:
279 
280  ensure(postcondition_of(attach_to_state(same args)));
281 }
282 
284 point_block_2d(const namespace_poset* xnamespace,
285  const poset_path& xpath,
286  bool xauto_access)
287 {
288  // Preconditions:
289 
291 
292  require(precondition_of(attach_to_state(same args)));
293 
294  // Body:
295 
296  attach_to_state(xnamespace, xpath, xauto_access);
297 
298  // Postconditions:
299 
300  ensure(postcondition_of(attach_to_state(same args)));
301 
302  // Exit:
303 
304  return;
305 }
306 
308 point_block_2d(const namespace_poset* xnamespace,
309  pod_index_type xposet_id,
310  pod_index_type xmember_id)
311 {
312  // Preconditions:
313 
315 
316  require(precondition_of(attach_to_state(same args)));
317 
318  // Body:
319 
320  attach_to_state(xnamespace, xposet_id, xmember_id);
321 
322  // Postconditions:
323 
324  ensure(postcondition_of(attach_to_state(same args)));
325 
326  // Exit:
327 
328  return;
329 }
330 
332 point_block_2d(const namespace_poset* xnamespace,
333  const scoped_index& xposet_id,
334  const scoped_index& xmember_id)
335 {
336  // Preconditions:
337 
339 
340  require(precondition_of(attach_to_state(same args)));
341 
342  // Body:
343 
344  attach_to_state(xnamespace, xposet_id.hub_pod(), xmember_id.hub_pod());
345 
346  // Postconditions:
347 
348  ensure(postcondition_of(attach_to_state(same args)));
349 
350  // Exit:
351 
352  return;
353 }
354 
355 // EXISTING HANDLE, NEW STATE "CONSTRUCTORS":
356 
357 void
359 new_state(const size_type& xi_size,
360  const size_type& xj_size,
361  bool xauto_access)
362 {
363  // Preconditions:
364 
365  require(precondition_of(new_state(host(), xi_size, xj_size, xauto_access)));
366 
367  // Body:
368 
369  new_state(host(), xi_size, xj_size, xauto_access);
370 
371  // Postconditions:
372 
373  ensure(postcondition_of(new_state(host(), xi_size, xj_size, xauto_access)));
374 
375  // Exit:
376 
377  return;
378 }
379 
380 void
383  const size_type& xi_size,
384  const size_type& xj_size,
385  bool xauto_access)
386 {
387  // Preconditions:
388 
389  require(xhost != 0);
390  require(xauto_access ? xhost->is_attached() : xhost->in_jim_edit_mode());
391  require(xauto_access || xhost->name_space()->state_is_read_accessible());
392  require(xhost->name_space()->contains_poset_member(static_prototype_path(), true));
393  require(xauto_access || xhost->name_space()->member_poset(prototypes_poset_name(), true).state_is_read_accessible());
394 
395  // Get access if auto access is requested. Need to do it here so the
396  // remaining preconditions can be executed.
397 
398  if(xauto_access)
399  {
400  xhost->begin_jim_edit_mode(true);
401  xhost->name_space()->get_read_access();
402  xhost->name_space()->member_poset(prototypes_poset_name(), false).get_read_access();
403  }
404 
405  require(namespace_is_ancestor_of(xhost->name_space()));
406  require(xhost->schema().row_conforms_to(standard_schema_path()));
407 
409 
410  require(dynamic_cast<base_space_poset*>(xhost) != 0);
411 
412  // A 1x1 block isn't a block; causes trouble with vertex_ct vs zone_ct;
413 
414  require(xi_size > 1);
415  require(xj_size > 1);
416 
417  // Body:
418 
419  // Get the size for the interval.
420 
421  size_type lsize;
422  point_block_crg_interval::get_size(xi_size, xj_size, lsize);
423 
424  // Get the dof tuple_ids.
425 
426  block<pod_index_type> ldof_tuple_ids;
427  point_block_crg_interval::get_dof_tuple_ids(*xhost, xi_size, xj_size, ldof_tuple_ids);
428 
429  // Get the private data for the interval
430 
431  block<pod_index_type> ldata;
432  point_block_crg_interval::get_private_data(xi_size, xj_size, ldata);
433 
434  // Create the implicit crg interval for the block.
435 
436  pod_index_type lindex =
437  xhost->new_member_interval("point_block_crg_interval", lsize, ldof_tuple_ids, ldata);
438 
439  // Attach this handle to it.
440 
441  attach_to_state(xhost, lindex);
442 
443  // Block is linked to bottom via implicit lower cover of vertices,
444  // but not linked to top; link it now.
445 
446  xhost->top().create_cover_link(this);
447 
448  // Postconditions:
449 
450  ensure(invariant());
451  ensure(host() == xhost);
452  ensure(is_attached());
453  ensure(db() == 0);
454  ensure(prototype_path() == static_prototype_path());
455  ensure(local_cell_type_name() ==
456  static_local_cell_prototype_path().member_name());
457  ensure(i_size() == xi_size);
458  ensure(j_size() == xj_size);
459 
460  // Release access if auto access was requested.
461 
462  if(xauto_access)
463  {
464  xhost->name_space()->member_poset(prototypes_poset_name(), false).release_access();
465  xhost->name_space()->release_access();
466 
467  // End jim edit mode without ensure_lattice_invariant;
468  // the check is unnecessary and expensive.
469 
470  xhost->end_jim_edit_mode(false, true);
471  }
472 
473  // Exit:
474 
475  return;
476 }
477 
478 // FEATURES:
479 
480 const sheaf::size_type&
482 i_size() const
483 {
484  // Preconditions:
485 
486  require(state_is_read_accessible());
487 
488  // Body:
489 
490  point_block_2d* cthis = const_cast<point_block_2d*>(this);
491  const size_type& result = cthis->row_dof_tuple()->i_size;
492 
493  // Postconditions:
494 
495  // Exit
496 
497  return result;
498 }
499 
500 void
502 put_i_size(const size_type& xsize)
503 {
504  // Preconditions:
505 
506  require(state_is_read_accessible());
507 
508  // Body:
509 
510  row_dof_tuple()->i_size = xsize;
511 
512  // Postconditions:
513 
514  ensure(i_size() == xsize);
515 
516  // Exit
517 
518  return;
519 }
520 
521 const sheaf::size_type&
523 j_size() const
524 {
525  // Preconditions:
526 
527  require(state_is_read_accessible());
528 
529  // Body:
530 
531  point_block_2d* cthis = const_cast<point_block_2d*>(this);
532  const size_type& result = cthis->row_dof_tuple()->j_size;
533 
534  // Postconditions:
535 
536  // Exit
537 
538  return result;
539 }
540 
541 void
543 put_j_size(const size_type& xsize)
544 {
545  // Preconditions:
546 
547  require(state_is_read_accessible());
548 
549  // Body:
550 
551  row_dof_tuple()->j_size = xsize;
552 
553  // Postconditions:
554 
555  ensure(j_size() == xsize);
556 
557  // Exit
558 
559  return;
560 }
561 
562 // PROTECTED DATA MEMBERS
563 
566 new_row_dof_map(poset_state_handle& xhost, size_type xi_size, size_type xj_size, bool xauto_access)
567 {
568  // Preconditions:
569 
570  require(xhost.state_is_auto_read_write_accessible(xauto_access));
571 
572  require(xauto_access || xhost.name_space()->poset_state_is_read_accessible(static_prototype_path()));
573  require(xhost.name_space()->contains_poset_member(static_prototype_path()));
574  require(xhost.name_space()->contains_poset_member(static_local_cell_prototype_path()));
575 
576  require(xi_size > 0);
577  require(xj_size > 0);
578 
579  // Body:
580 
581  if(xauto_access)
582  {
583  xhost.get_read_write_access(true);
584  xhost.name_space()->get_read_access();
585  xhost.name_space()->member_poset(prototypes_poset_name(), false).get_read_access();
586  }
587 
588  // Calcualate the number of cells.
589 
590  size_type lsize = xi_size*xj_size;
591 
592  // Create the map and initialize inherited dofs.
593 
594  scoped_index result =
595  new_row_dof_map(xhost,
596  static_prototype_path().member_name(),
597  static_local_cell_prototype_path().member_name(),
598  lsize,
599  false);
600 
601  row_dof_tuple_type* ltuple =
602  reinterpret_cast<row_dof_tuple_type*>(xhost.row_dof_map(result, true).dof_tuple());
603 
604  // Set the size in the i, j directions.
605 
606  ltuple->i_size = xi_size;
607  ltuple->j_size = xj_size;
608 
609  if(xauto_access)
610  {
611  xhost.name_space()->member_poset(prototypes_poset_name(), false).release_access();
612  xhost.name_space()->release_access();
613  xhost.release_access();
614  }
615 
616  // Postconditions:
617 
618  // Exit:
619 
620  return result;
621 }
622 
623 // PRIVATE DATA MEMBERS
624 
625 
626 // ===========================================================
627 // HOMOGENEOUS_BLOCK FACET
628 // ===========================================================
629 
630 // PUBLIC DATA MEMBERS
631 
632 const sheaf::poset_path&
635 {
636  // Preconditions:
637 
638  // Body:
639 
642 
643  static const poset_path result(base_space_member::prototypes_poset_name(), "point");
644 
645  // Postconditions:
646 
648  ensure(result.member_name() == "point");
649 
650  // Exit
651 
652  return result;
653 }
654 
655 // PROTECTED DATA MEMBERS
656 
657 // PRIVATE DATA MEMBERS
658 
659 
660 // ===========================================================
661 // BASE_SPACE_MEMBER FACET
662 // ===========================================================
663 
664 // PUBLIC DATA MEMBERS
665 
666 // PROTECTED DATA MEMBERS
667 
668 // PRIVATE DATA MEMBERS
669 
670 
671 // ===========================================================
672 // TOTAL_POSET_MEMBER FACET
673 // ===========================================================
674 
675 // PUBLIC DATA MEMBERS
676 
677 // PROTECTED DATA MEMBERS
678 
679 // PRIVATE DATA MEMBERS
680 
681 
682 // ===========================================================
683 // ABSTRACT_POSET_MEMBER FACET
684 // ===========================================================
685 
686 // PUBLIC DATA MEMBERS
687 
690 clone() const
691 {
692 
693  // Preconditions:
694 
695  // Body:
696 
697  // create new handle of the current class.
698 
699  point_block_2d *result = new point_block_2d();
700 
701  // Postconditions:
702 
703  ensure(result != 0);
704  ensure(result->invariant());
705 
706  // Exit:
707 
708  return result;
709 
710 }
711 
712 // PROTECTED DATA MEMBERS
713 
714 // PRIVATE DATA MEMBERS
715 
716 
717 // ===========================================================
718 // ANY FACET
719 // ===========================================================
720 
721 // PUBLIC DATA MEMBERS
722 
723 bool
725 invariant() const
726 {
727  // Preconditions:
728 
729  // Body:
730 
731  // Must satisfy base class invariant
732 
733  invariance(homogeneous_block::invariant());
734 
735  if(invariant_check())
736  {
737  // Prevent recursive calls to invariant
738 
739  disable_invariant_check();
740 
741  // Invariants for this class:
742 
743  invariance(state_is_read_accessible() ? is_jim(false) : true);
744  invariance(state_is_read_accessible() ? size() == (i_size()*j_size()) : true);
745 
746  // Finished, turn invariant checking back on.
747 
748  enable_invariant_check();
749  }
750 
751  // Postconditions:
752 
753  // Exit
754 
755  return true;
756 }
757 
758 bool
760 is_ancestor_of(const any* xother) const
761 {
762  bool result;
763 
764  // Preconditions:
765 
766  // Body:
767 
768  result = dynamic_cast<const point_block_2d*>(xother) != 0;
769 
770  // Postconditions:
771 
772  // Exit
773 
774  return result;
775 }
776 
780 {
781  // Preconditions:
782 
783  // Body:
784 
785  attach_to_state(&xother);
786 
787  // Postconditions:
788 
789  ensure(is_same_state(&xother));
790 
791  // Exit
792 
793  return *this;
794 }
795 
798 operator=(const point_block_2d& xother)
799 {
800 
801  // Preconditions:
802 
803  require(is_ancestor_of(&xother));
804 
805  // Body
806 
807  not_implemented();
808 
809  // Postconditions
810 
811  ensure(invariant());
812 
813  // Exit
814 
815  return *this;
816 
817 }
818 
819 // PROTECTED DATA MEMBERS
820 
821 // PRIVATE DATA MEMBERS
822 
823 
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 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 ...
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
void new_state(const size_type &xi_size, const size_type &xj_size, bool xauto_access=true)
Creates a new point_block_2d state in host() with i_size() == xi_size and j_size() == xj_size and att...
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.
virtual point_block_2d & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
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...
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.
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...
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
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.
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...
virtual ~point_block_2d()
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...
virtual bool invariant() const
Class invariant.
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.
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)
A homogeneous collection of i_size() * j_size() disconnected points similar to a structured_block_2d...
static const poset_path & static_local_cell_prototype_path()
The path of the local cell prototype required by this class.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
static const poset_path & static_prototype_path()
The path of the prototype required by this class.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
point_block_2d()
Default constructor; creates a new, unattached point_block_2d handle.
virtual void get_read_access() const
Get read access to the state associated with this.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
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.
void put_i_size(const size_type &xsize)
Sets i_size() to xsize.
void put_j_size(const size_type &xsize)
Sets j_size() to xsize.
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.
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...
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.
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...
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 scoped_index new_row_dof_map(poset_state_handle &xhost, size_type xi_size, size_type xj_size, bool xauto_access)
Creates a new row dof map and initializes it.
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 bool invariant() const
Class invariant.
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
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.
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.
Namespace for the fiber_bundles component of the sheaf system.
virtual point_block_2d * clone() const
Make a new handle, no state instance of current.
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 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.
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