SheafSystem  0.0.0.0
fields::section_pusher Class Reference

The general section push-forward operator; moves sections from one sec_rep_space to another using extension by zero to define the target outside the domain of the source. More...

#include <section_pusher.h>

Inheritance diagram for fields::section_pusher:
sheaf::any fields::avg_section_pusher

SECTION_PUSHER FACET

 section_pusher (const field_vd &xsrc, const field_vd &xdst, bool xauto_access)
 Creates the push-forward from the property space of xsrc to the property space of xdst. More...
 
 section_pusher (const sec_rep_space &xdomain, const sec_rep_space &xrange, const sec_ed &xdomain_coord, const sec_ed &xrange_coord, bool xauto_access)
 Creates the push-forward from xdomain to xrange induced by xdomain_coord and xrange_coord. More...
 
const sec_rep_spacedomain () const
 The domain of the push-forward map. More...
 
const geometry::sec_ed_invertibledomain_coords () const
 The coordinates section for the domain. More...
 
const sec_rep_spacerange () const
 The range of the push-forward map. More...
 
const sec_edrange_coords () const
 The coordinates section for the range. More...
 
sec_vdpush (const sec_vd &xinput, bool xauto_access)
 Pushes field xinput from sec_rep_space domain() to sec_rep_space range(), auto-allocated. More...
 
void push_pa (const sec_vd &xinput, sec_vd &result, bool xauto_access)
 Pushes field xinput from sec_rep_space domain() to sec_rep_space range(), pre-allocated. More...
 
bool same_base (const sec_ed &xcoord, const sec_rep_space &xspace) const
 True if and only if xcoord and xspace have the same base space. More...
 
bool same_discretization (const sec_ed &xcoord, const sec_rep_space &xspace) const
 True if and only if xcoord and xspace have the same discretization. More...
 
bool same_fiber (const sec_rep_space &xspace1, const sec_rep_space &xspace2) const
 True if and only if xspace1 and xspace2 have the same fiber type and dimension. More...
 
section_pusher_push_actionoverlap_action () const
 Computes value of destination dofs where dst overlaps src. More...
 
section_pusher_push_actiondefault_overlap_action () const
 Overlap action if none specified by clinet. More...
 
section_pusher_push_actionextension_action () const
 Computes value of destination dofs where dst does not overlap src. More...
 
section_pusher_push_actiondefault_extension_action () const
 Extension action if none specified by clinet. More...
 
void put_overlap_action (section_pusher_push_action &xoverlap_action)
 Sets the overlap action to xoverlap_action. More...
 
void put_extension_action (section_pusher_push_action &xextension_cction)
 Sets the extension action to xextension_action. More...
 
 section_pusher ()
 Default constructor; protected to prevent default construction. More...
 

ANY FACET

 section_pusher (const section_pusher &xother)
 Copy constructor. More...
 
virtual ~section_pusher ()
 Destructor. More...
 
virtual bool invariant () const
 Class invariant. More...
 

Additional Inherited Members

- Public Member Functions inherited from sheaf::any
virtual bool is_ancestor_of (const any *other) const
 True if other conforms to this. More...
 
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual anyclone () const
 Virtual constructor, makes a new instance of 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 inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

The general section push-forward operator; moves sections from one sec_rep_space to another using extension by zero to define the target outside the domain of the source.

Definition at line 65 of file section_pusher.h.

Constructor & Destructor Documentation

◆ section_pusher() [1/4]

fields::section_pusher::section_pusher ( const field_vd xsrc,
const field_vd xdst,
bool  xauto_access 
)

Creates the push-forward from the property space of xsrc to the property space of xdst.

Precondition
  • xauto_access || xsrc.state_is_read_accessible()
  • xauto_access || xdst.state_is_read_accessible()
  • same_fiber(*xsrc.property().host(), *xdst.property().host())
  • same_fiber(*xsrc.coordinates().host(), *xdst.coordinates().host())
  • dynamic_cast<binary_section_space_schema_member*>(&(xdst.coordinates().schema()))
  • dynamic_cast<binary_section_space_schema_member*>(&(xdst.property().schema()))
Postcondition
  • domain().is_same_state(xsrc.property().host())
  • range().is_same_state(xdst.property().host())
  • xsrc.access_request_depth() == old_xsrc_access_request_depth
  • xdst.access_request_depth() == old_xdst_access_request_depth

Definition at line 91 of file section_pusher.cc.

References fields::field_vd::access_request_depth(), sheaf::poset_state_handle::attach_to_state(), fields::field_vd::coordinates(), fields::field_vd::get_read_access(), fiber_bundle::sec_at1::host(), fiber_bundle::sec_vd::host(), fields::field_vd::property(), fields::field_vd::release_access(), fiber_bundle::sec_rep_space_member::schema(), section_pusher(), and fields::field_vd::state_is_read_accessible().

◆ section_pusher() [2/4]

fields::section_pusher::section_pusher ( const sec_rep_space xdomain,
const sec_rep_space xrange,
const sec_ed xdomain_coord,
const sec_ed xrange_coord,
bool  xauto_access 
)

Creates the push-forward from xdomain to xrange induced by xdomain_coord and xrange_coord.

Hack:
Had to comment out this constructor due to COM-466.
Todo:
Reimplement once COM-466 is resolved.
Precondition
  • xauto_access || xdomain.state_is_read_accessible()
  • xauto_access || xdomain_coord.state_is_read_accessible()
  • xauto_access || xrange.state_is_read_accessible()
  • xauto_access || xrange_coord.state_is_read_accessible()
  • same_base(xdomain_coord, xdomain)
  • same_base(xrange_coord, xrange)
  • same_fiber(xdomain, xrange)
  • same_fiber(*xdomain_coord.host(), *xrange_coord.host())
  • dynamic_cast<const binary_section_space_schema_member*>(&(xrange.schema()))
  • dynamic_cast<const binary_section_space_schema_member*>(&(xrange_coord.schema()))
Issue:
Either _domain and _range should be const pointers or this constructor should pass in non-const referrences.
Postcondition
  • xdomain.access_request_depth() == old_xdomain_access_request_depth
  • xdomain_coord.access_request_depth() == old_xdomain_coord_access_request_depth
  • xrange.access_request_depth() == old_xrange_access_request_depth
  • xrange_coord.access_request_depth() == old_xrange_coord_access_request_depth

Definition at line 258 of file section_pusher.cc.

References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::poset_state_handle::attach_to_state(), domain(), sheaf::poset_state_handle::get_read_access(), sheaf::poset_component::get_read_access(), fiber_bundle::sec_at1::host(), sheaf::poset_state_handle::release_access(), sheaf::poset_component::release_access(), fiber_bundle::sec_rep_space_member::schema(), fiber_bundle::sec_rep_space::schema(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

◆ section_pusher() [3/4]

fields::section_pusher::section_pusher ( )
protected

Default constructor; protected to prevent default construction.

Not Implemented.

Definition at line 720 of file section_pusher.cc.

References sheaf::abstract_poset_member::attach_to_state(), fiber_bundle::section_space_schema_member::base_space(), fiber_bundle::section_space_schema_member::base_space_id(), sheaf::auto_block< T, un_block_initialization_policy< T > >::ct(), sheaf::auto_block< T, S >::ct(), fiber_bundle::sec_tuple::detach_from_state(), fields::pullback_map_entry::disc_id, fiber_bundle::discretization_context::disc_id, fields::pullback_map_entry::domain_pt, sheaf::DOWN, fiber_bundle::section_space_schema_member::evaluation(), fiber_bundle::eval_iterator::evaluator(), fiber_bundle::eval_iterator::force_is_done(), sheaf::depth_first_iterator::force_is_done(), fiber_bundle::eval_iterator::gather_dofs(), fields::property_disc_iterator::get_prop_disc_values(), fiber_bundle::sec_vd::host(), sheaf::poset_component::index(), sheaf::depth_first_iterator::index(), fiber_bundle::chart_point::invalidate(), sheaf::depth_first_iterator::is_done(), sheaf::scoped_index::is_hub_scope(), sheaf::depth_first_iterator::next(), sheaf::NOT_STRICT, sheaf::scoped_index::pod(), fields::property_disc_iterator::property_discretization_members(), fiber_bundle::sec_rep_space_member::schema(), sheaf::auto_block< T, S >::set_ct(), sheaf::auto_block< T, un_block_initialization_policy< T > >::set_ct(), sheaf::depth_first_iterator::truncate(), fiber_bundle::section_evaluator::value_at_coord(), and fiber_bundle::discretization_context::values.

Referenced by fields::avg_section_pusher::avg_section_pusher(), put_extension_action(), and section_pusher().

◆ section_pusher() [4/4]

fields::section_pusher::section_pusher ( const section_pusher xother)

Copy constructor.

Not Implemented.

Postcondition

Definition at line 1517 of file section_pusher.cc.

References ~section_pusher().

◆ ~section_pusher()

fields::section_pusher::~section_pusher ( )
virtual

Destructor.

Definition at line 1533 of file section_pusher.cc.

References invariant().

Referenced by section_pusher().

Member Function Documentation

◆ default_extension_action()

fields::section_pusher_push_action & fields::section_pusher::default_extension_action ( ) const

Extension action if none specified by clinet.

Definition at line 670 of file section_pusher.cc.

References put_overlap_action().

Referenced by extension_action().

◆ default_overlap_action()

fields::section_pusher_push_action & fields::section_pusher::default_overlap_action ( ) const

Overlap action if none specified by clinet.

Definition at line 656 of file section_pusher.cc.

References extension_action().

Referenced by overlap_action().

◆ domain()

const fiber_bundle::sec_rep_space & fields::section_pusher::domain ( ) const

The domain of the push-forward map.

Definition at line 340 of file section_pusher.cc.

References domain_coords().

Referenced by section_pusher().

◆ domain_coords()

const geometry::sec_ed_invertible & fields::section_pusher::domain_coords ( ) const

The coordinates section for the domain.

Definition at line 357 of file section_pusher.cc.

References range().

Referenced by domain().

◆ extension_action()

fields::section_pusher_push_action & fields::section_pusher::extension_action ( ) const

Computes value of destination dofs where dst does not overlap src.

Definition at line 663 of file section_pusher.cc.

References default_extension_action().

Referenced by default_overlap_action().

◆ invariant()

bool fields::section_pusher::invariant ( ) const
virtual

Class invariant.

Invariant
Hack:
unexecutable because we may not have required access.
Invariant
Hack:
unexecutable because we may not have required access.
Invariant
  • -unexecutable( dynamic_cast<binary_section_space_schema_member*>(&(range().schema())) != 0 )

Reimplemented from sheaf::any.

Reimplemented in fields::avg_section_pusher.

Definition at line 1549 of file section_pusher.cc.

Referenced by fields::avg_section_pusher::invariant(), and ~section_pusher().

◆ overlap_action()

fields::section_pusher_push_action & fields::section_pusher::overlap_action ( ) const

Computes value of destination dofs where dst overlaps src.

Definition at line 649 of file section_pusher.cc.

References default_overlap_action().

Referenced by same_fiber().

◆ push()

fiber_bundle::sec_vd * fields::section_pusher::push ( const sec_vd xinput,
bool  xauto_access 
)

Pushes field xinput from sec_rep_space domain() to sec_rep_space range(), auto-allocated.

Precondition
  • precondition_of(push_pa(xinput, result, xauto_access))
  • xauto_access || range().in_jim_edit_mode()
Hack:
the "pointer bug", see bleow.
Precondition
  • xauto_access || range().name_space()->state_is_read_accessible()
Hack:
the "pointer bug". We need to make a new state for the result, but we must ensure that the host the state is made with is persistent, to avoid the "pointer bug", otherwise we will get a segv if the host gets deleted. _range is not persisent, so get the corresponding pointer from the name space.
Postcondition
  • result != 0
  • range().contains_member(result, xauto_access)
  • postcondition_of(push_pa)

Definition at line 408 of file section_pusher.cc.

References fiber_bundle::sec_vd::clone(), fiber_bundle::sec_rep_space_member::new_jim_state(), and push_pa().

Referenced by range_coords().

◆ push_pa()

void fields::section_pusher::push_pa ( const sec_vd xinput,
sec_vd result,
bool  xauto_access 
)

Pushes field xinput from sec_rep_space domain() to sec_rep_space range(), pre-allocated.

Precondition
  • xauto_access || xinput.state_is_read_accessible()
  • xauto_access || xresult.state_is_read_write_accessible()
  • domain().contains_member(&xinput, xauto_access)
  • range().contains_member(&xresult, xauto_access)
Postcondition
  • xinput.access_request_depth() == old_xinput_access_request_depth
  • xresult.access_request_depth() == old_result_access_request_depth
  • domain_coords().access_request_depth() == old_domain_coord_access_request_depth
  • range_coords().access_request_depth() == old_range_coord_access_request_depth

Definition at line 452 of file section_pusher.cc.

References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::poset_component::get_read_access(), sheaf::poset_component::get_read_write_access(), sheaf::abstract_poset_member::is_jim(), sheaf::poset_component::release_access(), same_base(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::read_write_monitor_handle::state_is_read_write_accessible().

Referenced by push(), and fields::push().

◆ put_extension_action()

void fields::section_pusher::put_extension_action ( section_pusher_push_action xextension_cction)

Sets the extension action to xextension_action.

Postcondition

Definition at line 698 of file section_pusher.cc.

References section_pusher().

Referenced by put_overlap_action().

◆ put_overlap_action()

void fields::section_pusher::put_overlap_action ( section_pusher_push_action xoverlap_action)

Sets the overlap action to xoverlap_action.

Postcondition

Definition at line 678 of file section_pusher.cc.

References put_extension_action().

Referenced by default_extension_action().

◆ range()

const fiber_bundle::sec_rep_space & fields::section_pusher::range ( ) const

The range of the push-forward map.

Definition at line 374 of file section_pusher.cc.

References range_coords().

Referenced by domain_coords(), and fields::avg_section_pusher::extend().

◆ range_coords()

const fiber_bundle::sec_ed & fields::section_pusher::range_coords ( ) const

The coordinates section for the range.

Definition at line 391 of file section_pusher.cc.

References push().

Referenced by range().

◆ same_base()

bool fields::section_pusher::same_base ( const sec_ed xcoord,
const sec_rep_space xspace 
) const

True if and only if xcoord and xspace have the same base space.

Precondition
  • xcoord.state_is_read_accessible()
  • xspace.state_is_read_accessible()
Postcondition
  • result == xcoord.schema().base_space().is_same_state(&xspace.schema().base_space())

Definition at line 572 of file section_pusher.cc.

References fiber_bundle::section_space_schema_member::base_space(), sheaf::poset_component::is_same_state(), same_discretization(), fiber_bundle::sec_rep_space_member::schema(), fiber_bundle::sec_rep_space::schema(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

Referenced by push_pa().

◆ same_discretization()

bool fields::section_pusher::same_discretization ( const sec_ed xcoord,
const sec_rep_space xspace 
) const

True if and only if xcoord and xspace have the same discretization.

Precondition
  • xcoord.state_is_read_accessible()
  • xspace.state_is_read_accessible()
Postcondition
  • result == xcoord.schema().discretization().is_same_state(&xspace.schema().discretization())

Definition at line 597 of file section_pusher.cc.

References fiber_bundle::section_space_schema_member::discretization(), sheaf::poset_component::is_same_state(), same_fiber(), fiber_bundle::sec_rep_space_member::schema(), fiber_bundle::sec_rep_space::schema(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

Referenced by same_base().

◆ same_fiber()

bool fields::section_pusher::same_fiber ( const sec_rep_space xspace1,
const sec_rep_space xspace2 
) const

True if and only if xspace1 and xspace2 have the same fiber type and dimension.

Precondition
  • xspace1.state_is_read_accessible()
  • xspace2.state_is_read_accessible()
Postcondition
  • result == (xspace1.schema().fiber_schema().is_same_state(&xspace2.schema().fiber_schema()) && (xspace1.schema().df() == xspace2.schema().df()))

Definition at line 621 of file section_pusher.cc.

References fiber_bundle::section_space_schema_member::df(), fiber_bundle::section_space_schema_member::fiber_schema(), sheaf::poset_component::is_same_state(), overlap_action(), fiber_bundle::sec_rep_space::schema(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

Referenced by same_discretization().


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