SheafSystem
0.0.0.0
|
Iterates over the evaluation members of a section space schema anchor; gathers the dof ids for each evaluation member. More...
#include <section_eval_iterator.h>
Public Member Functions | |
section_eval_iterator (const section_space_schema_member &xanchor) | |
Creates a new instance anchored at xanchor. More... | |
virtual section_eval_iterator & | operator= (const section_eval_iterator &xother) |
Assignment operator. More... | |
section_eval_iterator (const section_eval_iterator &xother) | |
Copy constructor; attaches this to the same anchor as xother. More... | |
section_eval_iterator () | |
Default constructor; creates an unattached iterator. More... | |
virtual | ~section_eval_iterator () |
Destructor. More... | |
virtual bool | is_ancestor_of (const any *xother) const |
True if other conforms to this. More... | |
virtual section_eval_iterator * | clone () const |
Make a new instance of the same type as this. More... | |
bool | invariant () const |
The class invariant. More... | |
bool | is_initialized () const |
True if this has been initialized for iteration with respect to a specific anchor. More... | |
section_space_schema_member & | anchor () |
The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More... | |
const section_space_schema_member & | anchor () const |
The schema member whose downset is being iterated over; the top member of the domain of iteration (const version). More... | |
virtual bool | anchor_is_ancestor_of (const section_space_schema_member &xmbr) const |
True if xmbr conforms to the type of item of this. More... | |
virtual void | reset (bool xreset_markers=RESET) |
Restarts the iteration over the down set of anchor() If xreset_markers, set !has_visited for all members. More... | |
virtual void | reset (pod_index_type xhub_id, bool xreset_markers=RESET) |
Sets anchor to member with hub id xhub_id and restarts the iteration If xreset_markers, set !has_visited for all members. More... | |
void | reset (const scoped_index &xid, bool xreset_markers=RESET) |
Sets anchor to member with id xid and restarts the iteration If xreset_markers, set !has_visited for all members. More... | |
virtual void | reset (const section_space_schema_member &xanchor) |
Restarts iteration in schema xanchor. More... | |
virtual void | reset_components () |
Restarts iteration at first component of current evaluator. More... | |
virtual int | ct (bool xreset=false) |
The number of members of the iteration set, from the current member to the end, inclusive. If xreset, reset before computing the count. More... | |
virtual bool | has_visited (pod_index_type xhub_id) const |
True if this has already visited hub id xhub_id. More... | |
bool | has_visited (const scoped_index &xid) const |
True if this has already visited id xid. More... | |
virtual bool | has_visited (const section_space_schema_member &xmbr) const |
True if this has already visited xmbr. More... | |
virtual void | put_has_visited (pod_index_type xhub_id, bool xvalue) |
Set the visited marker for hub id xhub_id to xvalue. Intended for use reseting iterator without having to reset entire collection of markers. More... | |
void | put_has_visited (const scoped_index &xid, bool xvalue) |
Set the visited marker for id xid to xvalue. Intended for use reseting iterator without having to reset entire collection of markers. More... | |
const scoped_index & | evaluator_id () const |
The id of the current evaluation member. More... | |
section_evaluator & | evaluator () |
The evaluator (local section) associated with the current evaluation member (mutable version). More... | |
const section_evaluator & | evaluator () const |
The evaluator (local section) associated with the current evaluation member (const version). More... | |
bool | evaluators_done () const |
True if iteration over the evaluation set is finished. More... | |
virtual void | next_evaluator () |
Makes the next member of the evaluation set the current evaluation member. More... | |
bool | components_done () const |
True if iteration over fiber components is finished. More... | |
virtual void | next_component () |
Makes the next fiber component the current fiber component. More... | |
block< scoped_index > & | discretization_members () |
The ids of the discretization members in the down set of the current evaluation member (mutable version). More... | |
const block< scoped_index > & | discretization_members () const |
The ids of the discretization members in the down set of the current evaluation member (const version). More... | |
const scoped_index & | fiber_id () const |
The id of the fiber schema member associated with the current component. More... | |
void | gather_dofs (const sec_vd &xsec, block< sec_vd::dof_type > &xdofs) |
Gathers the dofs for the current evalaution member from section xsec and appends them to the back of xdofs. More... | |
void | scatter_dofs (sec_vd &xsec, const block< sec_vd::dof_type > &xdofs, size_type xindex) |
Scatters the dofs for the current evalaution member from the location xindex and following of xdofs into section xsec. More... | |
Public Member Functions inherited from sheaf::any | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Protected Member Functions | |
void | reset_anchor (const section_space_schema_member &xanchor) |
Creates anchor if needed and attaches it to xanchor. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes | |
section_space_schema_member * | _anchor |
The schema member whose downset is being iterated over; the top member of the domain of iteration. More... | |
postorder_iterator | _fiber_schema_itr |
The iterator for the fiber schema component. More... | |
eval_iterator | _evaluation_itr |
The iterator for the base space component. More... | |
Iterates over the evaluation members of a section space schema anchor; gathers the dof ids for each evaluation member.
Definition at line 58 of file section_eval_iterator.h.
fiber_bundle::section_eval_iterator::section_eval_iterator | ( | const section_space_schema_member & | xanchor | ) |
Creates a new instance anchored at xanchor.
Definition at line 878 of file section_eval_iterator.cc.
References _anchor, anchor(), fiber_bundle::section_space_schema_member::clone(), fiber_bundle::section_space_schema_member::host(), invariant(), is_initialized(), sheaf::any::is_same_type(), fiber_bundle::section_space_schema_poset::is_schematized(), reset(), reset_components(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
fiber_bundle::section_eval_iterator::section_eval_iterator | ( | const section_eval_iterator & | xother | ) |
Copy constructor; attaches this to the same anchor as xother.
Definition at line 824 of file section_eval_iterator.cc.
References _fiber_schema_itr, anchor(), invariant(), is_initialized(), and reset_anchor().
fiber_bundle::section_eval_iterator::section_eval_iterator | ( | ) |
Default constructor; creates an unattached iterator.
Definition at line 719 of file section_eval_iterator.cc.
References gather_dofs(), invariant(), and is_initialized().
Referenced by fiber_id(), reset_anchor(), and scatter_dofs().
|
virtual |
Destructor.
Definition at line 79 of file section_eval_iterator.cc.
References is_ancestor_of().
Referenced by operator=().
fiber_bundle::section_space_schema_member & fiber_bundle::section_eval_iterator::anchor | ( | ) |
The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version).
Definition at line 173 of file section_eval_iterator.cc.
Referenced by is_initialized(), operator=(), reset_anchor(), and section_eval_iterator().
const fiber_bundle::section_space_schema_member & fiber_bundle::section_eval_iterator::anchor | ( | ) | const |
The schema member whose downset is being iterated over; the top member of the domain of iteration (const version).
Definition at line 192 of file section_eval_iterator.cc.
References anchor_is_ancestor_of().
|
virtual |
True if xmbr conforms to the type of item of this.
Definition at line 211 of file section_eval_iterator.cc.
References reset().
Referenced by anchor(), and reset_anchor().
|
virtual |
Make a new instance of the same type as this.
Not Implemented.
Reimplemented from sheaf::any.
Definition at line 931 of file section_eval_iterator.cc.
References sheaf::any::is_same_type().
Referenced by reset_components().
bool fiber_bundle::section_eval_iterator::components_done | ( | ) | const |
True if iteration over fiber components is finished.
Definition at line 606 of file section_eval_iterator.cc.
References next_component().
Referenced by next_evaluator(), and operator=().
|
virtual |
The number of members of the iteration set, from the current member to the end, inclusive. If xreset, reset before computing the count.
Definition at line 362 of file section_eval_iterator.cc.
References has_visited().
Referenced by reset().
sheaf::block< sheaf::scoped_index > & fiber_bundle::section_eval_iterator::discretization_members | ( | ) |
The ids of the discretization members in the down set of the current evaluation member (mutable version).
Definition at line 655 of file section_eval_iterator.cc.
Referenced by gather_dofs(), next_component(), and scatter_dofs().
const sheaf::block< sheaf::scoped_index > & fiber_bundle::section_eval_iterator::discretization_members | ( | ) | const |
The ids of the discretization members in the down set of the current evaluation member (const version).
Definition at line 675 of file section_eval_iterator.cc.
References fiber_id().
fiber_bundle::section_evaluator & fiber_bundle::section_eval_iterator::evaluator | ( | ) |
The evaluator (local section) associated with the current evaluation member (mutable version).
Definition at line 518 of file section_eval_iterator.cc.
Referenced by evaluator_id().
const fiber_bundle::section_evaluator & fiber_bundle::section_eval_iterator::evaluator | ( | ) | const |
The evaluator (local section) associated with the current evaluation member (const version).
Definition at line 540 of file section_eval_iterator.cc.
References evaluators_done().
const sheaf::scoped_index & fiber_bundle::section_eval_iterator::evaluator_id | ( | ) | const |
The id of the current evaluation member.
Definition at line 497 of file section_eval_iterator.cc.
References evaluator().
Referenced by put_has_visited().
bool fiber_bundle::section_eval_iterator::evaluators_done | ( | ) | const |
True if iteration over the evaluation set is finished.
Definition at line 561 of file section_eval_iterator.cc.
References next_evaluator().
Referenced by evaluator(), gather_dofs(), operator=(), and scatter_dofs().
const sheaf::scoped_index & fiber_bundle::section_eval_iterator::fiber_id | ( | ) | const |
The id of the fiber schema member associated with the current component.
Definition at line 695 of file section_eval_iterator.cc.
References section_eval_iterator().
Referenced by discretization_members().
void fiber_bundle::section_eval_iterator::gather_dofs | ( | const sec_vd & | xsec, |
block< sec_vd::dof_type > & | xdofs | ||
) |
Gathers the dofs for the current evalaution member from section xsec and appends them to the back of xdofs.
Definition at line 739 of file section_eval_iterator.cc.
References sheaf::auto_block< T, un_block_initialization_policy< T > >::ct(), sheaf::auto_block< T, S >::ct(), fiber_bundle::section_space_schema_member::df(), discretization_members(), evaluators_done(), fiber_bundle::sec_vd::get_fiber(), sheaf::auto_block< T, un_block_initialization_policy< T > >::reserve(), scatter_dofs(), fiber_bundle::sec_rep_space_member::schema(), sheaf::auto_block< T, un_block_initialization_policy< T > >::set_ct(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
Referenced by fields::body_builder::build_pa(), and section_eval_iterator().
|
virtual |
True if this has already visited hub id xhub_id.
Definition at line 387 of file section_eval_iterator.cc.
Referenced by ct(), and has_visited().
bool fiber_bundle::section_eval_iterator::has_visited | ( | const scoped_index & | xid | ) | const |
True if this has already visited id xid.
Definition at line 410 of file section_eval_iterator.cc.
References has_visited(), and sheaf::scoped_index::hub_pod().
|
virtual |
True if this has already visited xmbr.
Definition at line 425 of file section_eval_iterator.cc.
References fiber_bundle::section_space_schema_member::base_space_id(), fiber_bundle::section_space_schema_member::fiber_schema_id(), fiber_bundle::section_space_schema_member::host(), sheaf::poset_component::is_attached(), and put_has_visited().
|
virtual |
The class invariant.
Reimplemented from sheaf::any.
Definition at line 120 of file section_eval_iterator.cc.
References is_initialized().
Referenced by is_ancestor_of(), reset_components(), and section_eval_iterator().
|
virtual |
True if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 102 of file section_eval_iterator.cc.
References invariant().
Referenced by ~section_eval_iterator().
bool fiber_bundle::section_eval_iterator::is_initialized | ( | ) | const |
True if this has been initialized for iteration with respect to a specific anchor.
Definition at line 156 of file section_eval_iterator.cc.
References anchor().
Referenced by invariant(), operator=(), reset_anchor(), reset_components(), and section_eval_iterator().
|
virtual |
Makes the next fiber component the current fiber component.
Definition at line 627 of file section_eval_iterator.cc.
References discretization_members().
Referenced by components_done().
|
virtual |
Makes the next member of the evaluation set the current evaluation member.
Definition at line 582 of file section_eval_iterator.cc.
References components_done().
Referenced by evaluators_done().
|
virtual |
Assignment operator.
Definition at line 35 of file section_eval_iterator.cc.
References _anchor, anchor(), fiber_bundle::section_space_schema_member::attach_to_state(), fiber_bundle::section_space_schema_member::clone(), components_done(), evaluators_done(), is_initialized(), and ~section_eval_iterator().
|
virtual |
Set the visited marker for hub id xhub_id to xvalue. Intended for use reseting iterator without having to reset entire collection of markers.
Definition at line 448 of file section_eval_iterator.cc.
Referenced by has_visited().
void fiber_bundle::section_eval_iterator::put_has_visited | ( | const scoped_index & | xid, |
bool | xvalue | ||
) |
Set the visited marker for id xid to xvalue. Intended for use reseting iterator without having to reset entire collection of markers.
Definition at line 473 of file section_eval_iterator.cc.
References evaluator_id(), and sheaf::scoped_index::hub_pod().
|
virtual |
Restarts the iteration over the down set of anchor() If xreset_markers, set !has_visited for all members.
Definition at line 234 of file section_eval_iterator.cc.
Referenced by anchor_is_ancestor_of(), reset(), and section_eval_iterator().
|
virtual |
Sets anchor to member with hub id xhub_id and restarts the iteration If xreset_markers, set !has_visited for all members.
Definition at line 258 of file section_eval_iterator.cc.
References reset().
void fiber_bundle::section_eval_iterator::reset | ( | const scoped_index & | xid, |
bool | xreset_markers = RESET |
||
) |
Sets anchor to member with id xid and restarts the iteration If xreset_markers, set !has_visited for all members.
Definition at line 296 of file section_eval_iterator.cc.
References sheaf::scoped_index::hub_pod(), and reset().
|
virtual |
Restarts iteration in schema xanchor.
Definition at line 321 of file section_eval_iterator.cc.
References ct(), fiber_bundle::section_space_schema_member::fiber_schema(), fiber_bundle::section_space_schema_member::host(), fiber_bundle::section_space_schema_poset::is_schematized(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
|
protected |
Creates anchor if needed and attaches it to xanchor.
Definition at line 846 of file section_eval_iterator.cc.
References _anchor, anchor(), anchor_is_ancestor_of(), fiber_bundle::section_space_schema_member::attach_to_state(), fiber_bundle::section_space_schema_member::clone(), is_initialized(), sheaf::any::is_same_type(), section_eval_iterator(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
Referenced by section_eval_iterator().
|
virtual |
Restarts iteration at first component of current evaluator.
Definition at line 912 of file section_eval_iterator.cc.
References _fiber_schema_itr, clone(), invariant(), is_initialized(), and sheaf::depth_first_iterator::reset().
Referenced by section_eval_iterator().
void fiber_bundle::section_eval_iterator::scatter_dofs | ( | sec_vd & | xsec, |
const block< sec_vd::dof_type > & | xdofs, | ||
size_type | xindex | ||
) |
Scatters the dofs for the current evalaution member from the location xindex and following of xdofs into section xsec.
Definition at line 782 of file section_eval_iterator.cc.
References sheaf::auto_block< T, S >::ct(), fiber_bundle::section_space_schema_member::df(), discretization_members(), evaluators_done(), fiber_bundle::sec_vd::put_fiber(), fiber_bundle::sec_rep_space_member::schema(), section_eval_iterator(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), and sheaf::auto_block< T, un_block_initialization_policy< T > >::ub().
Referenced by gather_dofs().
|
protected |
The schema member whose downset is being iterated over; the top member of the domain of iteration.
Definition at line 279 of file section_eval_iterator.h.
Referenced by operator=(), reset_anchor(), and section_eval_iterator().
|
protected |
The iterator for the base space component.
Definition at line 289 of file section_eval_iterator.h.
|
protected |
The iterator for the fiber schema component.
Definition at line 284 of file section_eval_iterator.h.
Referenced by reset_components(), and section_eval_iterator().