SheafSystem  0.0.0.0
field_refinement_buffer.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/field_refinement_buffer.h"
22 
23 #include "SheafSystem/assert_contract.h"
24 #include "SheafSystem/array_section_dof_map.h"
25 #include "SheafSystem/base_space_member.h"
26 #include "SheafSystem/base_space_poset.h"
27 #include "SheafSystem/binary_section_space_schema_member.h"
28 #include "SheafSystem/postorder_iterator.h"
29 #include "SheafSystem/local_field_refiner.h"
30 #include "SheafSystem/section_evaluator.h"
31 #include "SheafSystem/sec_ed_invertible.h"
32 #include "SheafSystem/sec_vd.h"
33 
34 using namespace std;
35 using namespace fields; // Workaround for MS C++ bug.
36 
37 // ===========================================================
38 // CANONICAL FACET
39 // ===========================================================
40 
41 // PUBLIC MEMBER FUNCTIONS
42 
43 bool
45 invariant() const
46 {
47  bool result = true;
48 
49  invariance(target.same_evaluation());
50 
51  // Exit
52 
53  return result;
54 }
55 
56 
57 // ===========================================================
58 // FIELD_REFINEMENT_BUFFER FACET
59 // ===========================================================
60 
61 // PUBLIC MEMBER FUNCTIONS
62 
63 fields::field_refinement_buffer::
64 field_refinement_buffer(const field_vd& xsource,
65  field_vd& xtarget,
66  const block<scoped_index>& xcoord_disc_ids,
67  const block<scoped_index>& xprop_disc_ids,
68  int xdepth_ub)
69  : source(xsource),
70  target(xtarget),
71  coord_disc_ids(xcoord_disc_ids),
72  prop_disc_ids(xprop_disc_ids),
73  has_been_pushed(xtarget.base_space().host()->member_index_ub().pod()),
74  base_space(dynamic_cast<base_space_poset*>(xtarget.base_space().host())),
75  evaluation(xtarget.coordinates().schema().evaluation()),
76  coord_discretization(xtarget.coordinates().schema().discretization()),
77  prop_discretization(xtarget.property().schema().discretization()),
78  coord_dofs(xcoord_disc_ids.ub()*xtarget.dc()),
79  coord_value(xtarget.dc()),
80  prop_dofs(xprop_disc_ids.ub()*xtarget.dp()),
81  prop_value(xtarget.dp()),
82  source_prop_value(xsource.dp()),
83  local_coords(xtarget.db()),
84  local_coords2(xtarget.db()),
85  same_discretization(xtarget.same_discretization()),
86  depth_ub(xdepth_ub),
87  parent_prop_dofs(new block<sec_vd_dof_type>[xdepth_ub]),
88  parent_prop_evaluator(new section_evaluator*[xdepth_ub]),
89  parent_subzone_id(new int[xdepth_ub])
90 
91 {
92  // Preconditions:
93 
94  require(xsource.state_is_read_accessible());
95  require(xtarget.state_is_read_accessible());
96  require(xtarget.name_space().state_is_read_accessible());
97  require(xsource.dc() == xtarget.dc());
98  require(xsource.dp() == xtarget.dp());
99  require(xtarget.same_evaluation());
100 
101  // Body:
102 
108 
113 
114  coord_value.set_ct(xtarget.dc());
115  prop_value.set_ct(xtarget.dp());
116 
117  for(size_type i=0; i<depth_ub; ++i)
118  {
120  }
121 
122  // Postconditions:
123 
124  ensure(invariant());
125 
126  return;
127 }
128 
129 
130 fields::field_refinement_buffer::
131 field_refinement_buffer(field_vd& xtarget,
132  const block<scoped_index>& xcoord_disc_ids,
133  const block<scoped_index>& xprop_disc_ids,
134  int xdepth_ub)
135  : source(xtarget),
136  target(xtarget),
137  coord_disc_ids(xcoord_disc_ids),
138  prop_disc_ids(xprop_disc_ids),
139  has_been_pushed(xtarget.base_space().host()->member_index_ub().pod()),
140  base_space(dynamic_cast<base_space_poset*>(xtarget.base_space().host())),
141  evaluation(xtarget.coordinates().schema().evaluation()),
142  coord_discretization(xtarget.coordinates().schema().discretization()),
143  prop_discretization(xtarget.property().schema().discretization()),
144  coord_dofs(xcoord_disc_ids.ub()*xtarget.dc()),
145  coord_value(xtarget.dc()),
146  prop_dofs(xprop_disc_ids.ub()*xtarget.dp()),
147  prop_value(xtarget.dp()),
148  source_prop_value(xtarget.dp()),
149  local_coords(xtarget.db()),
150  local_coords2(xtarget.db()),
152  depth_ub(xdepth_ub),
153  parent_prop_dofs(new block<sec_vd_dof_type>[xdepth_ub]),
154  parent_prop_evaluator(new section_evaluator*[xdepth_ub]),
155  parent_subzone_id(new int[xdepth_ub])
156 
157 {
158  // Preconditions:
159 
160  require(xtarget.state_is_read_accessible());
161  require(xtarget.name_space().state_is_read_accessible());
162  require(xtarget.same_evaluation());
163 
164  // Body:
165 
171 
176 
177  coord_value.set_ct(xtarget.dc());
178  prop_value.set_ct(xtarget.dp());
179 
180  for(size_type i=0; i<depth_ub; ++i)
181  {
183  }
184 
185  // Mark all existing disc members as already evaluated.
186 
188  while(!litr.is_done())
189  {
190  has_been_pushed.put(litr.index().pod(), true);
191 
192  litr.next();
193  }
194 
195 
196  // Postconditions:
197 
198  ensure(invariant());
199 
200  return;
201 }
202 
203 
206 {
207  // Preconditions:
208 
209 
210  // Body:
211 
212  delete [] parent_prop_dofs;
213  delete [] parent_prop_evaluator;
214  delete [] parent_subzone_id;
215 
216  // Postconditions:
217 
218  // Exit:
219 
220  return;
221 }
222 
223 
224 void
227 {
228  // Preconditions:
229 
230  require(target.state_is_read_accessible());
231 
232  // Indexing below only correct for binary schema.
234 
235  require(dynamic_cast<binary_section_space_schema_member*>(&target.coordinates().schema()) != 0);
236 
237  // Body:
238 
239  size_type ldc = target.dc();
240  size_type ldofs_ct = 0;
241  size_type ldisc_ct = coord_disc_ids.ct();
242  size_type ldofs_ub = ldisc_ct*ldc;
243  coord_dofs.reserve(ldofs_ub);
244  sec_vd_dof_type* ldofs = coord_dofs.base();
245 
246  sec_vd& lcoords = target.coordinates();
247 
248  for(size_type i=0; i<ldisc_ct; ++i)
249  {
250  lcoords.get_fiber(coord_disc_ids[i], ldofs,
251  ldofs_ub*sizeof(sec_vd_dof_type), false);
252 
253  ldofs += ldc;
254  ldofs_ct += ldc;
255  ldofs_ub -= ldc;
256  }
257 
258  coord_dofs.set_ct(ldofs_ct);
259 
260  // Postconditions:
261 
262  ensure(coord_dofs.ct() == coord_disc_ids.ct()*target.dc());
263 
264  // Exit:
265 
266  return;
267 }
268 
269 
270 void
273 {
274  // Preconditions:
275 
276  require(target.state_is_read_accessible());
277 
278  // Indexing below only correct for binary schema.
280 
281  require(dynamic_cast<binary_section_space_schema_member*>(&target.property().schema()) != 0);
282 
283  // Body:
284 
285  size_type ldp = target.dp();
286  size_type ldofs_ct = 0;
287  size_type ldisc_ct = prop_disc_ids.ct();
288  size_type ldofs_ub = ldisc_ct*ldp;
289  prop_dofs.reserve(ldofs_ub);
290  sec_vd_dof_type* ldofs = prop_dofs.base();
291 
292  sec_vd& lprop = target.property();
293 
294  for(size_type i=0; i<ldisc_ct; ++i)
295  {
296  lprop.get_fiber(prop_disc_ids[i], ldofs,
297  ldofs_ub*sizeof(sec_vd_dof_type), false);
298 
299  ldofs += ldp;
300  ldofs_ct += ldp;
301  ldofs_ub -= ldp;
302  }
303 
304  prop_dofs.set_ct(ldofs_ct);
305 
306  // Postconditions:
307 
308  ensure(prop_dofs.ct() == prop_disc_ids.ct()*target.dp());
309 
310  // Exit:
311 
312  return;
313 }
314 
315 void
318 {
319  // Preconditions:
320 
321  require(target.same_evaluation());
322  require(coord_value.ub() >= target.dc());
323 
324  // Body:
325 
326  // Make sure has_been_pushed has enough capacity for
327  // any changes we've made to the base space.
328 
330 
331  size_type ldc = target.dc();
332 
333  size_type ldisc_ct = prop_disc_ids.ct();
334  for(size_type i=0; i<ldisc_ct; ++i)
335  {
336  scoped_index ldisc_id = prop_disc_ids[i];
337 
338  if(!has_been_pushed[ldisc_id.pod()])
339  {
340  // This property disc member has not been pushed
341  // from the source yet; do it now.
342 
344 
345  // Put the dofs in the property section.
346 
347  reserve_prop_fiber(ldisc_id);
348 
349  target.property().put_fiber(ldisc_id,
352  false);
353 
354  // Mark the disc mbr as pushed.
355 
356  has_been_pushed.put(ldisc_id.pod(), true);
357  }
358  }
359 
360  // Postconditions:
361 
362  ensure_for_all(i, 0, prop_disc_ids.ct(), has_been_pushed[prop_disc_ids[i].pod()]);
363 
364  // Exit:
365 
366  return;
367 }
368 
369 void
372 {
373  // Preconditions:
374 
375  require(xrefiner != 0);
376  require(depth > 0);
377  require(parent_subzone_id[depth-1] < xrefiner->refined_zone_ct());
378 
379  // Body:
380 
381  int lparent_depth = depth - 1;
382  section_evaluator* lparent_prop_evaluator = parent_prop_evaluator[lparent_depth];
383  block<sec_vd_dof_type>& lparent_prop_dofs = parent_prop_dofs[lparent_depth];
384  int lparent_subzone_id = parent_subzone_id[lparent_depth];
385  const chart_point_coord_type* lmap =
386  xrefiner->local_coordinates_map(lparent_subzone_id);
387 
388  sec_vd& lprop = target.property();
389 
390  // Make sure has_been_pushed has enough capacity for
391  // any changes we've made to the base space.
392 
394 
395  size_type ldisc_ct = prop_disc_ids.ct();
396  for(size_type i=0; i<ldisc_ct; ++i)
397  {
398  scoped_index ldisc_id = prop_disc_ids[i];
399 
400 
401  if(!has_been_pushed[ldisc_id.pod()])
402  {
403  // This property disc member has not been evaluated
404  // from the parent zone yet; do it now.
405 
406  // Get the local coordinates of the disc member in the current zone
407 
409 
410  // Map the local coordinates to the local coordinates of the parent zone.
411 
412  // Affine transformation u'[i] = T[i][j]*u[j] + T[i][db];
413  // with sum convention over 0 <= j < db.
414 
415  size_type lmap_index = 0;
416  size_type ldb = local_coords2.ct();
417  for(size_type k = 0; k<ldb; ++k)
418  {
419  local_coords[k] = 0.0;
420  for(size_type l = 0; l<ldb; ++l)
421  {
422  local_coords[k] += lmap[lmap_index++]*local_coords2[l];
423  }
424 
425  local_coords[k] += lmap[lmap_index++];
426  }
427 
428  // Evaluate the property in the parent zone.
429 
430  lparent_prop_evaluator->value_at_coord(lparent_prop_dofs,
431  local_coords,
432  prop_value);
433 
434  // Make sure the property dof map has enough capacity for the new point.
435 
436  reserve_prop_fiber(ldisc_id);
437 
438  // Put the value into the property section.
439 
440  lprop.put_fiber(ldisc_id, prop_value.base(), prop_value.ct()*sizeof(sec_vd_dof_type), false);
441 
442  // Mark the disc mbr as pushed.
443 
444  has_been_pushed.put(ldisc_id.pod(), true);
445  }
446  }
447 
448  // We're finished with this zone; increment the subzone id in the parent
449 
450  parent_subzone_id[lparent_depth]++;
451 
452  // Postconditions:
453 
454  ensure_for_all(i, 0, prop_disc_ids.ct(), has_been_pushed[prop_disc_ids[i].pod()]);
455 
456  // Exit:
457 
458  return;
459 }
460 
461 void
464 {
465  // Preconditions:
466 
467 
468  // Body:
469 
470  // Set the local coordinates to the center of the zone.
471 
473 
474  // Evaluate property at center.
475 
477 
478  // Evaluate the coordinates at the center
480 
482 
483  // Evaluate the source field at the global coordinates of the center.
484 
486 
487  // Postconditions:
488 
489 
490  // Exit:
491 
492  return;
493 }
494 
495 void
498 {
499  // Preconditions:
500 
501  require(target.state_is_read_accessible());
502  require(unexecutable("dofs have been gathered for this zone"));
503 
504 
505  // Body:
506 
507  size_type ldc = target.dc();
508 
510  {
511  // Property dofs co-located with coordinate dofs.
512  // Don't have to evaluate the coordinates, just grab dofs.
513 
515 
516  for(size_type j=0; j<ldc; ++j)
517  {
518  coord_value[j] = coord_dofs[xi*ldc + j];
519  }
520  coord_value.set_ct(ldc);
521  }
522  else
523  {
524  // Must evaluate the global coordinate section at
525  // the local coordinates of the property disc member.
526 
527  // Set the local coordinates to the position of the disc member.
528 
530 
531  // Evaluate the global coordinates at the local coordinates.
533 
535  }
536 
537  // Evaluate the source field at the global coordinates of
538  // the property disc member..
539 
541 
542  // Postconditions:
543 
544 
545  // Exit:
546 
547  return;
548 }
549 
550 
551 void
554 {
555  // Preconditions:
556 
557  require(depth < depth_ub);
558 
559  // Body:
560 
564 
565  // Postconditions:
566 
567  ensure(unexecutable(parent_prop_dofs[depth] == prop_dofs));
569  ensure(parent_subzone_id[depth] == 0);
570 
571  // Exit:
572 
573  return;
574 }
575 
576 void
579 {
580  // Preconditions:
581 
582  require(dynamic_cast<array_section_dof_map*>(&target.coordinates().dof_map(true)) != 0);
583  require(coord_disc_seq_id_space->contains(xdisc_id));
584 
585  // Body:
586 
587  pod_index_type ldisc_id = coord_disc_seq_id_space->pod(xdisc_id);
588 
589  array_section_dof_map* lcoord_dof_map =
590  dynamic_cast<array_section_dof_map*>(&target.coordinates().dof_map(true));
591 
592  lcoord_dof_map->reserve_fiber(ldisc_id);
593 
594  // Postconditions:
595 
596  ensure(unexecutable("coord dof map has enough capacity for the fiber associated with xdisc_id"));
597 
598  // Exit:
599 
600  return;
601 }
602 
603 void
606 {
607  // Preconditions:
608 
609  require(dynamic_cast<array_section_dof_map*>(&target.property().dof_map(true)) != 0);
610  require(prop_disc_seq_id_space->contains(xdisc_id));
611 
612  // Body:
613 
614  pod_index_type ldisc_id = prop_disc_seq_id_space->pod(xdisc_id);
615 
616  array_section_dof_map* lcoord_dof_map =
617  dynamic_cast<array_section_dof_map*>(&target.property().dof_map(true));
618 
619  lcoord_dof_map->reserve_fiber(ldisc_id);
620 
621  // Postconditions:
622 
623  ensure(unexecutable("coord dof map has enough capacity for the fiber associated with xdisc_id"));
624 
625  // Exit:
626 
627  return;
628 }
629 
630 // PRIVATE MEMBER FUNCTIONS
631 
632 fields::field_refinement_buffer::
633 field_refinement_buffer()
634  : source(*(new field_vd())), // All these inits just to keep compiler happy.
635  target(*(new field_vd())),
638  has_been_pushed(*(new zn_to_bool())),
639  base_space(0),
640  evaluation(*(new subposet())),
641  coord_discretization(*(new subposet())),
642  prop_discretization(*(new subposet()))
643 {
644 
645  // Preconditions:
646 
647 
648  // Body:
649 
650  // Above initializations just to keep compiler happy.
651  // This routine should never be called.
652 
653  not_implemented();
654 
655  // Postconditions:
656 
657  ensure(invariant());
658 
659  // Exit:
660 
661  return;
662 }
663 
664 
665 fields::field_refinement_buffer::
666 field_refinement_buffer(const field_refinement_buffer& xother)
667  : source(xother.source), // All these inits just to keep compiler happy.
668  target(xother.target),
672  base_space(xother.base_space),
673  evaluation(xother.evaluation),
676 {
677 
678  // Preconditions:
679 
680  // Body:
681 
682  // The above initializations just to make compiler happy.
683  // If we want to enable copy construction, just delete this routine
684  // and the declaration in the .h file; default memberwise copy
685  // construction will do fine.
686 
687  not_implemented();
688 
689  // Postconditions:
690 
691  ensure(invariant());
692 
693  // Exit:
694 
695  return;
696 }
697 
698 
699 
700 // ===========================================================
701 // NON-MEMBER FUNCTIONS
702 // ===========================================================
703 
double chart_point_coord_type
The type of local coordinate in the base space; the scalar type for the local coordinate vector space...
Definition: fiber_bundle.h:57
A client handle for a subposet.
Definition: subposet.h:86
section_evaluator * coord_evaluator
The section evaluator for the coordinates section of the target.
index_type ub() const
The upper bound on the storage array. The number of items current allocated in the storage array...
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
section_evaluator ** parent_prop_evaluator
The property section evaluators for the parent zones.
virtual const chart_point_coord_type * local_coordinates_map(size_type xi) const =0
The affine map from the local coordinates of refined zone xi the the local coordinates of the parent ...
block< sec_vd_dof_type > * parent_prop_dofs
A buffer for property dofs of the parent zones.
scattered_insertion_index_space_handle * coord_disc_seq_id_space
The discretization sequence id space of the target coordinates.
A buffer for data which is used by both a local_field_refiner object and its associated field_refinem...
subposet & coord_discretization
The discretization subposet of the coordinate section of the target.
namespace_poset & name_space() const
The namespace this resides in.
Definition: field_vd.cc:331
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...
void get_fiber(pod_index_type xdisc_id, vd_lite &xfiber) const
Sets xfiber to the fiber referred to by discretization id xdisc_id.
Definition: sec_vd.cc:1087
const block< scoped_index > & prop_disc_ids
A buffer for gathering the property discretization members for the current zone.
virtual size_type refined_zone_ct() const =0
The number of refined zones created by this.
int dc() const
The dimension of the coordinates (independent variable) space.
Definition: field_vd.cc:254
STL namespace.
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
void put(int i, bool value)
Sets i-th member to value.
Definition: zn_to_bool.cc:537
block< sec_vd_value_type > coord_value
A buffer for computing coordinates at a point.
~field_refinement_buffer()
Destructor; not virtual, this can not be used as a base class.
void property_at_coordinates(const vd_lite &xcoord, vd_lite &xprop) const
The value of the property at the given global coordinates.
Definition: field_vd.cc:873
Dperecated. Use postorder_itr. Specialization of the filtered depth-first iterator which exposes the ...
bool same_discretization
True if target property uses same discretization as target coordinates.
virtual dof_type value_at_coord(const dof_type xdofs[], size_type xdofs_ub, const dof_type xlocal_coords[], size_type xlocal_coords_ub) const
Value at a specified local_coordinate. Single component version.
virtual pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
block< sec_vd_dof_type > coord_dofs
A buffer for gathering coordinate dofs.
int depth_ub
The upper bound for the refinement depth.
void gather_property_dofs()
Gathers the property dofs from the target for the current zone.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
Definition: zn_to_bool.h:52
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
void reserve_coord_fiber(const scoped_index &xdisc_id)
Ensures the coordinate dofs have enough capacity for discretization id xdisc.
void gather_coordinate_dofs()
Gathers the coordinate dofs from the target for the current zone.
const bool NOT_STRICT
Iteration strictness control.
Definition: sheaf.h:102
const bool DOWN
Iteration directions.
Definition: sheaf.h:77
A contiguous tuple, contiguous fiber representation of the abstract map from section dof ids to secti...
scattered_insertion_index_space_handle * elements_id_space
The sequence id space used by the elements subposet.
subposet & vertices()
The subposet containing all the vertices, that is, the cells of dimension 0 (mutable version)...
pointer_type base() const
The underlying storage array.
void set_ct(size_type xct)
Sets ct() == xct.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
void refine_prop_dofs(local_field_refiner *xrefiner)
Evaluates the property dofs of the target in the parent zone for any discretization members that have...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
A vd-valued property as a function of global coordinates.
Definition: field_vd.h:69
sec_vd & property() const
The dependent variable of this field.
Definition: field_vd.cc:357
subposet & prop_discretization
The discretization subposet of the property section of the target.
const block< scoped_index > & coord_disc_ids
A buffer for gathering the coordinate discretization members for the current zone.
virtual void center(coord_type xresult[], size_type xresult_ub) const
The local coordinates at the center of the evaluator.
field_vd & target
The field being refined.
base_space_member & base_space() const
The base space of this field.
Definition: field_vd.cc:373
block< sec_vd_value_type > prop_value
A buffer for computing target property at a point.
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
int * parent_subzone_id
The index of the current subzone of the parent zones.
A section of a fiber bundle with a d-dimensional vector space fiber.
Definition: sec_vd.h:54
scattered_insertion_index_space_handle * vertices_id_space
The sequence id space used by the vertices subposet.
block< sec_vd_value_type > source_prop_value
A buffer for computing source property at a point.
bool same_evaluation() const
True if the coordinates and property sections both use the same evaluation subposet.
Definition: field_vd.cc:822
const scattered_insertion_index_space_handle & id_space() const
The id space for the members of with this (const version).
Definition: subposet.cc:508
section_evaluator * prop_evaluator
The section evaluator for the property section of the target.
An abstract refiner for a field over a local region (primitive cell) in the base space.
void put_fiber(pod_index_type xdisc_id, const vd_lite &xfiber)
Sets the fiber referred to by discretization id xdisc_id to xfiber.
Definition: sec_vd.cc:1144
void evaluate_at_center()
Evaluates the property, the coordinates, and the source property at the center of the zone...
const index_space_handle & discretization_id_space() const
The id space for the discretization members in the down set of the base space of this (const version)...
virtual section_space_schema_member & schema()
The restricted schema for this (mutable version).
void reserve_fiber(pod_index_type xdisc_id)
Ensures this has the capacity to store the fiber with discretization id xdisc_id. ...
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
const field_vd & source
The reference field.
virtual scoped_index member_index_ub() const
The upper bound on the member_index;.
bool invariant() const
Class invariant.
void save_parent()
Saves the prop_dofs and prop_evaluator of the current zone into the parent buffers.
A handle for a scattered_insertion_index_space_state.
sec_ed_invertible & coordinates() const
The independent variable of this field.
Definition: field_vd.cc:339
subposet & evaluation
The evaluation subposet used by both the coordinates and property sections of the target...
bool state_is_read_accessible() const
True if this is attached and if the coordinates and property are accessible for read or access contro...
Definition: field_vd.cc:1380
subposet & elements()
The subposet containing the elements or zones, that is, the cells of maximal dimension.
void reserve_prop_fiber(const scoped_index &xdisc_id)
Ensures the property dofs have enough capacity for discretization id xdisc.
block< chart_point_coord_type > local_coords
A buffer for the local coordinates of a point.
int dp() const
The dimension of the property (dependent variable) space.
Definition: field_vd.cc:278
void push_prop_dofs()
Pushes the source property dofs to the target for any discretization members that have not already be...
void extend_to(int xub)
Make the upper bound at least xub.
Definition: zn_to_bool.cc:362
block< chart_point_coord_type > local_coords2
Another buffer for the local coordinates of a point.
base_space_poset * base_space
The current base space.
double sec_vd_dof_type
The type of degree of freedom in the section space.
Definition: fiber_bundle.h:78
virtual void local_coordinates(pod_index_type xindex, coord_type xresult[], size_type xresult_ub) const =0
The local coordinates of the dof with local index xindex.
scattered_insertion_index_space_handle * prop_disc_seq_id_space
The discretization sequence id space of the target coordinates.
block< sec_vd_dof_type > prop_dofs
A buffer for gathering property dofs.
virtual section_dof_map & dof_map(bool xrequire_write_access=false)
The map from client_ids to dof values for this poset member (mutable version)
zn_to_bool has_been_pushed
True if i-th member has been pused.
virtual bool contains(pod_type xid) const
True if this space contains id xid.
void evaluate_source_at_disc(size_type xi)
Evaluates the coordinates and the source property at the position of the xi-th (local indexing) prope...
int depth
The refinement depth of the current zone.