SheafSystem  0.0.0.0
body_pusher.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/body_pusher.h"
22 
23 #include "SheafSystem/assert_contract.h"
24 #include "SheafSystem/base_space_member.h"
25 #include "SheafSystem/base_space_poset.h"
26 #include "SheafSystem/binary_section_space_schema_member.h"
27 #include "SheafSystem/binary_section_space_schema_poset.h"
28 #include "SheafSystem/discretization_context.h"
29 #include "SheafSystem/index_iterator.h"
30 #include "SheafSystem/poset_joiner.h"
31 #include "SheafSystem/postorder_itr.h"
32 #include "SheafSystem/property_disc_iterator.h"
33 #include "SheafSystem/sec_ed_invertible.h"
34 #include "SheafSystem/sec_rep_descriptor.h"
35 #include "SheafSystem/section_evaluator.h"
36 #include "SheafSystem/tern.h"
37 
38 using namespace std;
39 using namespace unordered;
40 using namespace fields; // Workaround for MS C++ bug.
41 
42 //#define DIAGNOSTIC_OUTPUT 1
43 
44 
45 // =============================================================================
46 // BODY_PUSHER FACET
47 // =============================================================================
48 
49 // PUBLIC MEMBER FUNCTIONS
50 
52 body_pusher(const geometry::sec_ed_invertible& xdomain_coord, const sec_ed& xrange_coord,
53  bool xauto_access)
54 {
55  // Preconditions:
56 
57  require(xauto_access || xdomain_coord.state_is_read_accessible());
58  require(xauto_access || xrange_coord.state_is_read_accessible());
59  require(same_fiber(xdomain_coord, xrange_coord, xauto_access));
60 
61  // Body:
62 
63  define_old_variable(int old_domain_coord_access_request_depth = xdomain_coord.access_request_depth());
64  define_old_variable(int old_range_coord_access_request_depth = xrange_coord.access_request_depth());
65 
66  if(xauto_access)
67  {
68  xdomain_coord.get_read_access();
69  xrange_coord.get_read_access();
70  }
71 
72  _domain = &xdomain_coord.schema().host()->base_space();
73  _domain_coord = xdomain_coord.clone();
74  _domain_coord->attach_to_state(&xdomain_coord);
75  _range = &xrange_coord.schema().host()->base_space();
76  _range_coord.attach_to_state(&xrange_coord);
77 
78  _push_name = true;
79 
80  define_old_variable(int old_range_access_request_depth = range().access_request_depth());
81 
82  // Create a temporary section space schema with eval == elements and
83  // disc == vertices.
84 
85  string lschema_name =
86  poset_path::make_name(poset_path::reserved_prefix() + _range->name(),
87  xrange_coord.index().pod(),
88  "body_pusher_schema" );
89 
90  string lschema_poset_name =
91  sec_rep_space_member::standard_schema_poset_name(lschema_name);
92 
93  poset_path lschema_path(lschema_poset_name, lschema_name);
94 
95  fiber_bundles_namespace& lns = dynamic_cast<fiber_bundles_namespace&>(*_range->name_space());
96 
97  if(!lns.contains_poset_member(lschema_path, true))
98  {
99  // Schema doesn't exist; create it.
100 
101  poset_path lrep_path;
102  lrep_path.put_poset_name("sec_rep_descriptors");
103 
104  if(xrange_coord.schema().rep().name() == "vertex_vertex_constant")
105  {
109 
111 
112  lrep_path.put_member_name("vertex_vertex_constant");
113  }
114  else
115  {
116  lrep_path.put_member_name("vertex_element_dlinear");
117  }
118 
120  binary_section_space_schema_poset::new_table(lns,
121  lschema_path.poset_name(),
122  binary_section_space_schema_poset::standard_schema_path(),
123  xrange_coord.schema().base_space().path(true),
124  xdomain_coord.schema().fiber_space().path(true),
125  lrep_path,
126  true);
127 
128  _body_schema = new binary_section_space_schema_member(&lhost, xrange_coord.schema().base_space().path(true),
129  lhost.fiber_space().schema(true).path(true));
130  _body_schema->put_name(lschema_path.member_name(), true, true);
131  }
132  else
133  {
134  _body_schema = new binary_section_space_schema_member(lns, lschema_path, true);
135  }
136 
137  // Pull the discretization points from the range back to the domain.
138 
139  pull_back_range_disc();
140 
141  // Postconditions:
142 
143  ensure(invariant());
144  ensure(domain().is_same_state(xdomain_coord.schema().base_space().host()));
145  ensure(range().is_same_state(xrange_coord.schema().base_space().host()));
146  ensure(push_name());
147  ensure(name_prefix().empty());
148  ensure(name_suffix().empty());
149 
150  ensure(range().access_request_depth() == old_range_access_request_depth );
151 
152  if(xauto_access)
153  {
154  xdomain_coord.release_access();
155  xrange_coord.release_access();
156  }
157 
158  ensure(xdomain_coord.access_request_depth() == old_domain_coord_access_request_depth);
159  ensure(xrange_coord.access_request_depth() == old_range_coord_access_request_depth);
160 
161  // Exit:
162 }
163 
166 domain() const
167 {
168  // Preconditions:
169 
170  // Body:
171 
172  const base_space_poset& result = *_domain;
173 
174  // Postconditions:
175 
176  // Exit
177 
178  return result;
179 }
180 
184 {
185  // Preconditions:
186 
187  // Body:
188 
189  const geometry::sec_ed_invertible& result = *_domain_coord;
190 
191  // Postconditions:
192 
193  // Exit
194 
195  return result;
196 
197 }
198 
201 range() const
202 {
203  // Preconditions:
204 
205  // Body:
206 
207  const base_space_poset& result = *_range;
208 
209  // Postconditions:
210 
211  // Exit
212 
213  return result;
214 }
215 
218 range_coord() const
219 {
220  // Preconditions:
221 
222  // Body:
223 
224  const sec_ed& result = _range_coord;
225 
226  // Postconditions:
227 
228  // Exit
229 
230  return result;
231 
232 }
233 
236 push(const base_space_member& xinput, bool xcompute_upper_bound, bool xauto_access)
237 {
238  base_space_member* result = 0;
239 
240  // Preconditions:
241 
242  require(xauto_access || domain_coord().state_is_read_accessible());
243  require(domain().contains_member(&xinput, xauto_access));
244  require(xauto_access || range_coord().state_is_read_accessible());
245  require(xauto_access || range().state_is_read_write_accessible());
246 
247 
248  // Body:
249 
250  result = xinput.clone();
251  push_pa(xinput, *result, xcompute_upper_bound, xauto_access);
252 
253  // Postconditions:
254 
255  ensure(result != 0);
256  ensure(postcondition_of(push_pa));
257 
258  // Exit
259 
260  return result;
261 }
262 
263 void
266  base_space_member& result,
267  bool xcompute_upper_bound,
268  bool xauto_access)
269 {
270 #ifdef DIAGNOSTIC_OUTPUT
271  cout << endl
272  << "body_pusher::push_pa"
273  << endl
274  << endl;
275 #endif
276 
277  // Preconditions:
278 
279  require(xauto_access || domain_coord().state_is_read_accessible());
280  require(domain().contains_member(&xinput, xauto_access));
281  require(xauto_access || range().state_is_read_write_accessible());
282  require(xauto_access || range_coord().state_is_read_accessible());
283 
284  // Body:
285 
286  define_old_variable(int old_domain_coord_access_request_depth = domain_coord().access_request_depth());
287  define_old_variable(int old_range_coord_access_request_depth = range_coord().access_request_depth());
288  define_old_variable(int old_range_access_request_depth = range().access_request_depth());
289 
290 
291  if(xauto_access)
292  {
293  _domain_coord->get_read_access();
294  _range->get_read_write_access(true);
295  _range_coord.get_read_access();
296  }
297 
298  // Allocate a set to contain the range vertices which have
299  // a pullback in xinput.
300 
301  unordered_set<scoped_index> lvertices;
302 
303  // Iterate over the down set of the input;
304  // process all the pullbacks contained in each element.
305 
306  unordered_set_postorder_itr litr(xinput, _domain->elements(), DOWN, NOT_STRICT);
307  while(!litr.is_done())
308  {
309  // Insert all the range vertex pullbacks contained in this element
310  // into the result vertices subposet.
311 
312  pb_map_range_type litr_range = _pb_map.equal_range(pb_type(litr.index()));
313  for(pb_map_itr_type lpb_itr = litr_range.first;
314  lpb_itr != litr_range.second;
315  ++lpb_itr)
316  {
317  lvertices.insert(lpb_itr->disc_id);
318  }
319 
320  // Move to the next member of the down set of xinput.
321 
322  litr.next();
323  }
324 
325  // The range vertex list now contains all range vertices with pullbacks
326  // contained in the input, if there are any.
327 
328  // Allocate a set to contain upper bound of zones in the result.
329 
330  unordered_set<scoped_index> lelements;
331 
332  // Create the element iterator using the top of the range. The
333  // iterator must be initialized so that the anchor can be set within
334  // the loop.
335 
336  unordered_set_postorder_itr lelem_itr(_range->top(),
337  &_range->elements(),
338  sheaf::UP);
339 
340  for(unordered_set<scoped_index>::const_iterator lvertex_itr = lvertices.begin();
341  lvertex_itr != lvertices.end();
342  ++lvertex_itr)
343  {
344  // Reinitialize the iterator to the next vertex.
345 
346  lelem_itr.put_anchor(*lvertex_itr);
347  lelem_itr.reset();
348 
349  while(!lelem_itr.is_done())
350  {
351  // Add the zone to the result.
352 
353  lelements.insert(lelem_itr.index());
354 
355  // Move to the next member in the upset of the vertex.
356 
357  lelem_itr.next();
358  }
359  }
360 
361  // Allocate a subposet to contain the elements in the result.
362 
363  block<scoped_index> lelement_ids;
364  bool lhas_zones = false;
365 
366  // Reset the element iterator to descend down and only return at the
367  // verticies.
368 
369  lelem_itr.put_filter(_range->vertices());
370  lelem_itr.put_descending(sheaf::DOWN);
371 
372  // Loop over the elements of the upper bound and insert them into
373  // the result subposet.
374 
375  for(unordered_set<scoped_index>::const_iterator lub_elem_itr = lelements.begin();
376  lub_elem_itr != lelements.end();
377  ++lub_elem_itr)
378  {
379  bool lis_lb = true;
380 
381  if(!xcompute_upper_bound)
382  {
383  // Determine if the element is in the lower bound.
384 
385  lelem_itr.put_anchor(*lub_elem_itr);
386  lelem_itr.reset();
387 
388  while(!lelem_itr.is_done())
389  {
390  if(lvertices.find(lelem_itr.index()) == lvertices.end())
391  {
392  // Vertex is not in the set of verticies, element is not
393  // part of the lower bound.
394 
395  lis_lb = false;
396  break;
397  }
398 
399  // Move to the next vertex in the element.
400 
401  lelem_itr.next();
402  }
403  }
404 
405  if(xcompute_upper_bound || lis_lb)
406  {
407  // Insert the element into the result subposet.
408 
409  lelement_ids.push_back(*lub_elem_itr);
410  lhas_zones = true;
411  }
412  }
413 
414  if(lhas_zones)
415  {
418 
419  poset_joiner ljoiner(_range);
420  ljoiner.join(lelement_ids.base(), lelement_ids.ct(), tern::TRUE, result);
421 
422  if(push_name() && !xinput.name().empty())
423  {
424  result.put_name(name_prefix() + xinput.name() + name_suffix(), false, false);
425  }
426  }
427 
428  // Postconditions:
429 
430  ensure(result.is_attached() ? range().is_same_state(result.host()) : true);
431  ensure((result.is_attached() && !xinput.name().empty() && push_name()) ?
432  result.name() == name_prefix() + xinput.name() + name_suffix() :
433  true);
434 
435  if(xauto_access)
436  {
437  _range_coord.release_access();
438  _range->release_access();
439  _domain_coord->release_access();
440  }
441 
442  ensure(domain_coord().access_request_depth() == old_domain_coord_access_request_depth);
443  ensure(range_coord().access_request_depth() == old_range_coord_access_request_depth);
444  ensure(range().access_request_depth() == old_range_access_request_depth );
445 
446  // Exit
447 
448  return;
449 }
450 
453 push(const subposet& xinput, bool xcompute_upper_bound, bool xauto_access)
454 {
455  subposet* result = 0;
456 
457  // Preconditions:
458 
459  require(precondition_of(push_pa(xinput, *result, xcompute_upper_bound, xauto_access)));
460 
461  if(xauto_access)
462  {
463  domain_coord().get_read_access();
464  range_coord().get_read_access();
465 
466  _range->get_read_write_access(true);
467  }
468 
469  require(!xinput.name().empty());
470 
471  // Body:
472 
473  result = xinput.clone();
474 
475  // Get the destination subposet.
476 
477  string lresult_name(name_prefix() + xinput.name() + name_suffix());
478  if(range().includes_subposet(lresult_name))
479  {
480  // Already exists, just attach to it.
481 
482  result->attach_to_state(_range, lresult_name);
483  }
484  else
485  {
486  // Doesn't already exist, create it.
487 
488  result->new_state(_range, false, false);
489  result->put_name(lresult_name, false, false);
490  }
491 
492  push_pa(xinput, *result, xcompute_upper_bound, xauto_access);
493 
494  // Postconditions:
495 
496  if(xauto_access)
497  {
498  domain_coord().release_access();
499  range_coord().release_access();
500  range().release_access();
501  }
502 
503  ensure(result != 0);
504  ensure(postcondition_of(push_pa(xinput, *result, xcompute_upper_bound, xauto_access)));
505 
506  // Exit
507 
508  return result;
509 }
510 
511 void
513 push_pa(const subposet& xinput,
514  subposet& result,
515  bool xcompute_upper_bound,
516  bool xauto_access)
517 {
518  // Preconditions:
519 
520  require(xauto_access || domain_coord().state_is_read_accessible());
521  require(domain().includes_subposet(&xinput, xauto_access));
522  require(xauto_access || range_coord().state_is_read_accessible());
523  require(xauto_access || range().state_is_read_write_accessible());
524  require(range().includes_subposet(&result, xauto_access));
525 
526  if(xauto_access)
527  {
528  domain_coord().get_read_access();
529  range_coord().get_read_access();
530 
531  _range->get_read_write_access(true);
532  }
533 
534  // Body:
535 
536  base_space_member lsrc_body(_domain->top()); // Any member of domain will do.
537  base_space_member ldst_body;
538 
539  index_iterator litr = xinput.indexed_member_iterator();
540  while(!litr.is_done())
541  {
542  lsrc_body.attach_to_state(litr.index());
543 
544  push_pa(lsrc_body, ldst_body, xcompute_upper_bound, false);
545  if(ldst_body.is_attached())
546  {
547  result.insert_member(ldst_body.index());
548  ldst_body.detach_from_state();
549  }
550  litr.next();
551  }
552 
553  // Clean up.
554 
555  lsrc_body.detach_from_state();
556 
557  if(xauto_access)
558  {
559  domain_coord().release_access();
560  range_coord().release_access();
561  range().release_access();
562  }
563 
564  // Postconditions:
565 
566  // Exit
567 
568  return;
569 }
570 
571 const bool&
573 push_name() const
574 {
575  return _push_name;
576 }
577 
578 std::string&
581 {
582  return _name_prefix;
583 }
584 
585 std::string&
588 {
589  return _name_suffix;
590 }
591 
592 bool
594 same_fiber(const sec_ed& xcoord1, const sec_ed& xcoord2, bool xauto_access) const
595 {
596  bool result;
597 
598  // Preconditions:
599 
600  require(xauto_access || xcoord1.state_is_read_accessible());
601  require(xauto_access || xcoord2.state_is_read_accessible());
602 
603  // Body:
604 
605  if(xauto_access)
606  {
607  xcoord1.get_read_access();
608  xcoord2.get_read_access();
609  }
610 
611 
612  result =
613  xcoord1.schema().fiber_schema().is_same_state(&xcoord2.schema().fiber_schema())
614  && (xcoord1.schema().df() == xcoord2.schema().df());
615 
616  // Postconditions:
617 
618  ensure(result ==
619  (xcoord1.schema().fiber_schema().is_same_state(&xcoord2.schema().fiber_schema())
620  && (xcoord1.schema().df() == xcoord2.schema().df())));
621 
622  if(xauto_access)
623  {
624  xcoord1.release_access();
625  xcoord2.release_access();
626  }
627 
628  // Exit:
629 
630  return result;
631 }
632 
633 void
634 fields::body_pusher::
635 pull_back_range_disc()
636 {
637  // Preconditions:
638 
639  require(_range_coord.state_is_read_accessible());
640 
641  // Body:
642 
643  int ldf = _range_coord.schema().df();
644  pb_type lpb;
645  block<chart_point_3d> ldomain_pts(32); // Arbitrary size.
646 
647  _body_schema->get_read_access();
648 
649  if(!_domain_coord->is_invertible())
650  {
651  // Initialize inversion using defaults.
652 
653  _domain_coord->initialize_point_locator(false);
654  }
655 
656  // Iterate over the property disc.
657 
658  property_disc_iterator* litr =
659  property_disc_iterator::new_property_disc_iterator(_range_coord.schema(),
660  *_body_schema);
661  while(!litr->is_done())
662  {
663  // Get the conext for all the property disc members associated
664  // with the current iteration.
665 
666  litr->get_prop_disc_values(_range_coord);
667 
668  // Iterate over all the property disc members.
669 
670  const block<discretization_context>& lprop_mbrs =
672  size_type lct = lprop_mbrs.ct();
673  for(size_type i=0; i<lct; ++i)
674  {
675  // Get the context for this disc member.
676 
677  discretization_context& lcontext = lprop_mbrs[i];
678 
679  // Get all the domain chart points that correspond to the
680  // global coordinates of this range disc pt.
681 
682  ldomain_pts.set_ct(0);
683  _domain_coord->all_points_at_value_ua(lcontext.values, ldf, ldomain_pts);
684 
685  // Store the domain chart points in the pullback map.
686 
687  lpb.disc_id = lcontext.disc_id;
688  for(size_type i=0; i<ldomain_pts.ct(); ++i)
689  {
690  lpb.domain_pt = ldomain_pts[i];
691  _pb_map.insert(lpb);
692  }
693  }
694 
695  litr->next();
696  }
697 
698  delete litr;
699  _body_schema->release_access();
700 
701  // Postconditions:
702 
703 
704  // Exit:
705 
706  return;
707 }
708 
709 
710 // PROTECTED MEMBER FUNCTIONS
711 
714 {
715  // Preconditions:
716 
717  // Body:
718 
719  not_implemented();
720 
721  // Postconditions:
722 
723  // Exit:
724 
725  return;
726 }
727 
728 // =============================================================================
729 // ANY FACET
730 // =============================================================================
731 
732 // PUBLIC MEMBER FUNCTIONS
733 
735 body_pusher(const body_pusher& xother)
736 {
737  // Preconditions:
738 
739  // Body:
740 
741  not_implemented();
742 
743  // Postconditions:
744 
745  ensure(invariant());
746 
747  // Exit:
748 }
749 
752 {
753  // Preconditions:
754 
755  // require(range().name_space()->in_jim_edit_mode());
756 
757  // Body:
758 
759  _range_coord.detach_from_state();
760  _body_schema->detach_from_state();
761 
762  delete _body_schema;
763 
764  // Postconditions:
765 
766  // Exit:
767 }
768 
769 
770 bool
772 invariant() const
773 {
774  bool result = true;
775 
776  // Preconditions:
777 
778  // Body:
779 
780  invariance(any::invariant());
781 
782  if(invariant_check())
783  {
784  disable_invariant_check();
785 
786  // Finished, turn invariant checking back on.
787 
788  enable_invariant_check();
789  }
790 
791  // Postconditions:
792 
793  // Exit
794 
795  return result;
796 }
797 
798 
799 
800 // ===========================================================
801 // NONMEMBER FUNCTIONS
802 // ===========================================================
803 
const base_space_poset & domain() const
The domain of the push-forward map.
Definition: body_pusher.cc:166
poset_state_handle * host() const
The poset which this is a handle to a component of.
std::string name() const
Definition: subposet.h:796
A context for discretization members. Intended for implementing various iterators, especially concurrent iterations over multiple sections.
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
A client handle for a subposet.
Definition: subposet.h:86
scoped_index disc_id
The global index of the disc member.
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
A client handle for a poset member which has been prepared for use as a schema for a section space...
size_type ct() const
The number of items currently in use.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
Definition: scoped_index.h:672
virtual void get_prop_disc_values(const sec_vd &xsec)=0
The gets the values of xsec at the property discretization points.
schema_poset_member & fiber_schema()
The fiber schema component of this (mutable version).
poset_path path(bool xauto_access=true) const
A path to this component.
Namespace for fields component of sheaf system.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
const base_space_poset & range() const
The range of the push-forward map.
Definition: body_pusher.cc:201
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...
const scoped_index & index() const
The current item in the subset.
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
const geometry::sec_ed_invertible & domain_coord() const
The coordinate field for the domain.
Definition: body_pusher.cc:183
STL namespace.
bool is_same_state(const poset_state_handle *xhost, pod_index_type xhub_id) const
True is this is attached to state with hub id xhub_id in host xhost.
Specialization of the filtered depth-first iterator which exposes the POSTVISIT_ACTION to the client...
Definition: postorder_itr.h:40
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
virtual void get_read_access() const
Get read access to the state associated with this.
const scoped_index & index() const
The index of the component state this handle is attached to.
std::string name() const
A name for this.
A client handle for a member of a base space poset.
void next()
Makes item the next member of the subset.
void attach_to_state(const poset_state_handle *xhost, pod_index_type xhub_id)
Attach this handle to the state with hub id xhub_id in the current version of host xhost...
void push_pa(const base_space_member &xinput, base_space_member &result, bool xcompute_upper_bound, bool xauto_access)
Pushes member xinput from base_space_poset domain() to base_space_poset range(), pre-allocated.
Definition: body_pusher.cc:265
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...
A section of a fiber bundle with a d-dimensional Euclidean vector space fiber.
Definition: sec_ed.h:47
poset & fiber_space()
The fiber space for section spaces on this schema.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
const bool NOT_STRICT
Iteration strictness control.
Definition: sheaf.h:102
const bool DOWN
Iteration directions.
Definition: sheaf.h:77
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
void push_back(const_reference_type item)
Insert item at the end of the items in the auto_block.
An abstract invertible section of a fiber bundle with a d-dimensional base space and a d-dimensional ...
virtual ~body_pusher()
Destructor.
Definition: body_pusher.cc:751
poset * host() const
The poset which this is a handle to a member of.
void put_member_name(const std::string &xname)
Sets member_name() to xname.
Definition: poset_path.cc:526
pointer_type base() const
The underlying storage array.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
body_pusher()
Default constructor; protected to prevent default construction.
Definition: body_pusher.cc:713
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
virtual void insert_member(pod_index_type xmbr_hub_id)
Inserts the member of host() with hub id xmbr_hub_id.
Definition: subposet.cc:1091
void join(const scoped_index *xexpansion, int xexpansion_ct, const tern &xgreatest, abstract_poset_member &xresult)
The join of the members of xexpansion.
bool same_fiber(const sec_ed &xcoord1, const sec_ed &xcoord2, bool xauto_access) const
True if and only if xcoord1 and xcoord2 have the same fiber type and dimension.
Definition: body_pusher.cc:594
virtual void put_name(const std::string &xname, bool xunique, bool xauto_access)
Make xname a name for this; if xunique, make xname the only name.
void next()
Makes this the next member of the subset.
void attach_to_state(const poset_state_handle *xother)
Attach this handle to the same state as xother.
const bool UP
Iteration directions.
Definition: sheaf.h:82
void put_poset_name(const std::string &xname)
Sets poset_name() to xname.
Definition: poset_path.cc:489
An entry in a discretization map.
Definition: pullback_map.h:44
sec_vd_value_type values[values_ub]
The values of another section (typically the global coordinates) at this disc point.
const block< discretization_context > & property_discretization_members() const
The property discretization members in the downset of the current evaluation member.
chart_point_3d domain_pt
The location of the discretization member.
Definition: pullback_map.h:62
virtual subposet * clone() const
Virtual constructor; makes a new instance of the same type as this.
Definition: subposet.cc:2942
const bool & push_name() const
True if destination body should be named from the source body.
Definition: body_pusher.cc:573
base_space_member * push(const base_space_member &xinput, bool xcompute_upper_bound, bool xauto_access)
Pushes member xinput from domain() to base_space_poset range(), auto-allocated.
Definition: body_pusher.cc:236
bool is_done() const
True if iteration finished.
Iterates over the subset of Zn defined by the characteristic function host().
base_space_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...
virtual void put_anchor(const abstract_poset_member *xanchor)
Set anchor() to xanchor.
virtual bool invariant() const
Class invariant.
Definition: body_pusher.cc:772
int access_request_depth() const
The number of times access has been requested and granted without being released. ...
total_poset_member & base_space()
The base space component of this (mutable version).
virtual section_space_schema_member & schema()
The restricted schema for this (mutable version).
poset & fiber_space()
The fiber space for section spaces on this schema (mutable version).
std::string member_name() const
The member name part of the path.
Definition: poset_path.cc:511
bool is_done() const
True if iteration finished.
virtual sec_ed_invertible * clone() const
Make a new handle, no state instance of current.
The general push-forward operator for base space members; moves a base space member from one base spa...
Definition: body_pusher.h:73
const sec_ed & range_coord() const
The coordinate field for the range.
Definition: body_pusher.cc:218
int df() const
The dimension of the fiber space component.
void attach_to_state(const namespace_poset *xns, const poset_path &xpath, bool xauto_access=true)
Attach to the state specified by path xpath in the namespace xns.
scoped_index disc_id
The id of a discretization member.
Definition: pullback_map.h:57
sec_rep_descriptor & rep()
The representation for section spaces on this schema (mutable version).
Computes the join of given poset members.
Definition: poset_joiner.h:43
std::string & name_prefix()
Prefix for destination name.
Definition: body_pusher.cc:580
Abstract iterator over the discretization of the property section of a field_vd. Concurrently travers...
virtual index_iterator indexed_member_iterator() const
An iterator for members of this poset; index version.
Definition: subposet.cc:934
base_space_poset & base_space()
The base space for section spaces on this schema.
std::string & name_suffix()
Suffix for destination name.
Definition: body_pusher.cc:587