SheafSystem  0.0.0.0
fiber_bundle::section_iteration_state Class Reference

Descriptor for iteration state of individual section. Intended for implementing various iterators, especially concurrent iterations over multiple sections. More...

#include <section_iteration_state.h>

Public Member Functions

 section_iteration_state ()
 True. More...
 
 ~section_iteration_state ()
 Destructor. More...
 
void initialize (const section_space_schema_member &xschema)
 Inializes an instance with schema xschema. More...
 
void initialize (const base_space_poset &xbase_space_host)
 Inializes an instance with base space xbase_space_host. More...
 
void initialize_correction_set ()
 Initializes the set of evaluation member prototypes for which the discretization member order correction is applied. More...
 
void ensure_discretization_order (const scoped_index &xgreater_index)
 Ensures correct order of the discretization members. More...
 
void initialize_order_correction ()
 Previsit action for eval_sp members. More...
 
void set_and_attach_evaluation_member (const scoped_index &xindex)
 Sets eval_id to xindex, initializes local_id and eval, and attaches eval_mbr. More...
 
void set_evaluation_member (const scoped_index &xindex)
 Sets eval_id to xindex, initializes local_id and eval. More...
 
void gather_discretization_member (const scoped_index &xindex, const scoped_index &xgreater_index)
 Puts xindex into the discretization gather buffer and, if enabled, corrects discretization order. More...
 
void gather_discretization_member (const scoped_index &xindex)
 Puts xindex into the discretization gather buffer. More...
 
void gather_dofs (const sec_vd &xsec)
 Gathers dofs from xsec into the dofs buffer. More...
 
void gather_dofs (const sec_vd &xsec, const block< discretization_context > &xother_pts)
 Gathers dofs from xsec into xother_pts. More...
 

Public Attributes

const section_space_schema_memberschema
 The schema of the section. More...
 
int df
 The fiber dimension. More...
 
int row_dof_ct
 The row dof count. More...
 
const base_space_posetbase_space_host
 The host of the base space of the section. More...
 
block< scoped_indexdown_set
 The strict down set of the evalaution member. More...
 
zn_to_bool visited
 Markers for this section. More...
 
eval_familyevaluators
 The evaluator family associated with schema. More...
 
bool is_uniform
 True if evaluator family is uniform evaluator family. More...
 
subposet eval_sp
 The evaluation subposet associated with schema. More...
 
scoped_index eval_id
 The index of the current evaluation member. More...
 
pod_index_type eval_type_id
 The type id of the current eval member. More...
 
section_evaluatoreval
 The current evaluator. More...
 
block< structured_block * > eval_mbrs
 A family of evaluation member handles. More...
 
structured_blockeval_mbr
 The current evaluation member handle. More...
 
subposet disc_sp
 The discretization subposet associated with schema. More...
 
unordered::unordered_map< pod_index_type, pod_index_type > * disc_to_seq_map
 The map from discretization to sequence ids. More...
 
pod_index_type next_seq_id
 The next sequence id. More...
 
int local_id
 The local index of the current disc member with respect to the current eval member. More...
 
bool vertex_discretization
 True if discretization is vertices. More...
 
block< discretization_contextdiscretization_members
 The discretization members in the downset of the current evaluation member. More...
 
block< sec_vd_dof_typedofs
 Buffer for dofs of gathered disc members. More...
 
std::set< pod_index_typecorrection_set
 The set of evaluation member prototypes for which connectivity order correction is applied. More...
 
bool correction_enabled
 True if discretization member order correction is enabled for the current evaluation member. More...
 

Detailed Description

Descriptor for iteration state of individual section. Intended for implementing various iterators, especially concurrent iterations over multiple sections.

Definition at line 72 of file section_iteration_state.h.

Constructor & Destructor Documentation

◆ section_iteration_state()

fiber_bundle::section_iteration_state::section_iteration_state ( )

True.

Default constructor.

Definition at line 42 of file section_iteration_state.cc.

References sheaf::invalid_pod_index(), and ~section_iteration_state().

◆ ~section_iteration_state()

fiber_bundle::section_iteration_state::~section_iteration_state ( )

Destructor.

Definition at line 74 of file section_iteration_state.cc.

References sheaf::poset_component::detach_from_state(), and initialize().

Referenced by section_iteration_state().

Member Function Documentation

◆ ensure_discretization_order()

void fiber_bundle::section_iteration_state::ensure_discretization_order ( const scoped_index xgreater_index)

Ensures correct order of the discretization members.

Precondition
  • discretization_members.ct() == 2

Definition at line 335 of file section_iteration_state.cc.

References sheaf::scoped_index::hub_pod(), initialize_order_correction(), and sheaf::UPPER.

Referenced by initialize_correction_set().

◆ gather_discretization_member() [1/2]

void fiber_bundle::section_iteration_state::gather_discretization_member ( const scoped_index xindex,
const scoped_index xgreater_index 
)

Puts xindex into the discretization gather buffer and, if enabled, corrects discretization order.

Definition at line 460 of file section_iteration_state.cc.

References fiber_bundle::discretization_context::disc_id, fiber_bundle::discretization_context::eval_id, and fiber_bundle::discretization_context::local_id.

Referenced by fields::property_disc_iterator_1_1::next(), and set_evaluation_member().

◆ gather_discretization_member() [2/2]

void fiber_bundle::section_iteration_state::gather_discretization_member ( const scoped_index xindex)

◆ gather_dofs() [1/2]

void fiber_bundle::section_iteration_state::gather_dofs ( const sec_vd xsec)

Gathers dofs from xsec into the dofs buffer.

Precondition
  • xsec.state_is_read_accessible()
Todo:
revise when ternary schema are supported.
Precondition
  • dynamic_cast<const binary_section_space_schema_member*>(&xsec.schema()) != 0
Hack:
uniform rep hack. treat uniform disc as if same as eval.
Todo:
reimplement uniform sec rep so disc is same as eval.

Definition at line 520 of file section_iteration_state.cc.

References fiber_bundle::sec_vd::dof_tuple(), fiber_bundle::sec_vd::get_fiber(), fiber_bundle::sec_rep_space_member::schema(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

Referenced by gather_discretization_member().

◆ gather_dofs() [2/2]

void fiber_bundle::section_iteration_state::gather_dofs ( const sec_vd xsec,
const block< discretization_context > &  xother_pts 
)

Gathers dofs from xsec into xother_pts.

Precondition
  • xsec.state_is_read_accessible()
  • for(int i = ( 0 ); i < ( xother_pts.ct() ); ++ i ) disc_sp.contains_member(xother_pts[i].disc_id)
Hack:
required because discretization_context::values capacity is fixed at 3.
Precondition
  • df <= 3

Definition at line 580 of file section_iteration_state.cc.

References sheaf::auto_block< T, un_block_initialization_policy< T > >::ct(), fiber_bundle::discretization_context::disc_id, fiber_bundle::sec_vd::get_fiber(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and fiber_bundle::discretization_context::values.

◆ initialize() [1/2]

◆ initialize() [2/2]

void fiber_bundle::section_iteration_state::initialize ( const base_space_poset xbase_space_host)

Inializes an instance with base space xbase_space_host.

Precondition
  • xbase_space_host.state_is_read_accessible()

Definition at line 212 of file section_iteration_state.cc.

References sheaf::poset_state_handle::attach_to_state(), initialize_correction_set(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

◆ initialize_correction_set()

void fiber_bundle::section_iteration_state::initialize_correction_set ( )

Initializes the set of evaluation member prototypes for which the discretization member order correction is applied.

Definition at line 307 of file section_iteration_state.cc.

References ensure_discretization_order().

Referenced by initialize().

◆ initialize_order_correction()

void fiber_bundle::section_iteration_state::initialize_order_correction ( )

Previsit action for eval_sp members.

Definition at line 388 of file section_iteration_state.cc.

References set_and_attach_evaluation_member().

Referenced by ensure_discretization_order().

◆ set_and_attach_evaluation_member()

void fiber_bundle::section_iteration_state::set_and_attach_evaluation_member ( const scoped_index xindex)

Sets eval_id to xindex, initializes local_id and eval, and attaches eval_mbr.

Precondition
  • xindex.is_hub_scope()
Postcondition
  • eval_id == xindex
  • local_id == 0
  • eval != 0
  • eval_mbr != 0
  • eval_mbr->is_attached()

Definition at line 402 of file section_iteration_state.cc.

References sheaf::scoped_index::is_hub_scope(), and set_evaluation_member().

Referenced by initialize_order_correction().

◆ set_evaluation_member()

void fiber_bundle::section_iteration_state::set_evaluation_member ( const scoped_index xindex)

Sets eval_id to xindex, initializes local_id and eval.

Precondition
  • xindex.is_hub_scope()
Postcondition
  • eval_id == xindex
  • local_id == 0
  • eval != 0

Definition at line 433 of file section_iteration_state.cc.

References gather_discretization_member(), and sheaf::scoped_index::is_hub_scope().

Referenced by set_and_attach_evaluation_member().

Member Data Documentation

◆ base_space_host

const base_space_poset* fiber_bundle::section_iteration_state::base_space_host

The host of the base space of the section.

Definition at line 93 of file section_iteration_state.h.

◆ correction_enabled

bool fiber_bundle::section_iteration_state::correction_enabled

True if discretization member order correction is enabled for the current evaluation member.

Definition at line 195 of file section_iteration_state.h.

◆ correction_set

std::set<pod_index_type> fiber_bundle::section_iteration_state::correction_set

The set of evaluation member prototypes for which connectivity order correction is applied.

Definition at line 189 of file section_iteration_state.h.

◆ df

int fiber_bundle::section_iteration_state::df

The fiber dimension.

Definition at line 83 of file section_iteration_state.h.

◆ disc_sp

subposet fiber_bundle::section_iteration_state::disc_sp

The discretization subposet associated with schema.

Definition at line 151 of file section_iteration_state.h.

Referenced by fields::property_disc_iterator_1_1::next().

◆ disc_to_seq_map

unordered::unordered_map<pod_index_type, pod_index_type>* fiber_bundle::section_iteration_state::disc_to_seq_map

The map from discretization to sequence ids.

Definition at line 156 of file section_iteration_state.h.

◆ discretization_members

block<discretization_context> fiber_bundle::section_iteration_state::discretization_members

The discretization members in the downset of the current evaluation member.

Definition at line 178 of file section_iteration_state.h.

Referenced by fields::property_disc_iterator_1_1::get_prop_disc_values(), and fields::property_disc_iterator_1_1::next().

◆ dofs

block<sec_vd_dof_type> fiber_bundle::section_iteration_state::dofs

Buffer for dofs of gathered disc members.

Definition at line 183 of file section_iteration_state.h.

◆ down_set

block<scoped_index> fiber_bundle::section_iteration_state::down_set

The strict down set of the evalaution member.

Definition at line 98 of file section_iteration_state.h.

◆ eval

section_evaluator* fiber_bundle::section_iteration_state::eval

The current evaluator.

Definition at line 136 of file section_iteration_state.h.

◆ eval_id

scoped_index fiber_bundle::section_iteration_state::eval_id

The index of the current evaluation member.

Definition at line 126 of file section_iteration_state.h.

◆ eval_mbr

structured_block* fiber_bundle::section_iteration_state::eval_mbr

The current evaluation member handle.

Definition at line 146 of file section_iteration_state.h.

◆ eval_mbrs

block<structured_block*> fiber_bundle::section_iteration_state::eval_mbrs

A family of evaluation member handles.

Definition at line 141 of file section_iteration_state.h.

◆ eval_sp

subposet fiber_bundle::section_iteration_state::eval_sp

The evaluation subposet associated with schema.

Definition at line 121 of file section_iteration_state.h.

◆ eval_type_id

pod_index_type fiber_bundle::section_iteration_state::eval_type_id

The type id of the current eval member.

Definition at line 131 of file section_iteration_state.h.

◆ evaluators

eval_family* fiber_bundle::section_iteration_state::evaluators

The evaluator family associated with schema.

Definition at line 108 of file section_iteration_state.h.

◆ is_uniform

bool fiber_bundle::section_iteration_state::is_uniform

True if evaluator family is uniform evaluator family.

Hack:
uniform rep hack; the following member is needed only to support the hack.

Definition at line 116 of file section_iteration_state.h.

◆ local_id

int fiber_bundle::section_iteration_state::local_id

The local index of the current disc member with respect to the current eval member.

Definition at line 167 of file section_iteration_state.h.

◆ next_seq_id

pod_index_type fiber_bundle::section_iteration_state::next_seq_id

The next sequence id.

Definition at line 161 of file section_iteration_state.h.

◆ row_dof_ct

int fiber_bundle::section_iteration_state::row_dof_ct

The row dof count.

Definition at line 88 of file section_iteration_state.h.

◆ schema

const section_space_schema_member* fiber_bundle::section_iteration_state::schema

The schema of the section.

Definition at line 78 of file section_iteration_state.h.

◆ vertex_discretization

bool fiber_bundle::section_iteration_state::vertex_discretization

True if discretization is vertices.

Definition at line 172 of file section_iteration_state.h.

◆ visited

zn_to_bool fiber_bundle::section_iteration_state::visited

Markers for this section.

Definition at line 103 of file section_iteration_state.h.


The documentation for this class was generated from the following files: