21 #include "SheafSystem/average_push_action.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/block.h" 25 #include "SheafSystem/error_message.h" 26 #include "SheafSystem/sec_vd.h" 37 fields::average_push_action::
38 average_push_action(
int xdst_df)
44 require(xdst_df >= 0);
58 ensure(
dst_df() == xdst_df);
98 #ifdef DIAGNOSTIC_OUTPUT 99 post_information_message(
"Entering average_push_action::operator()");
106 require(xdst_dofs.
ub() >=
dst_df());
107 require(unexecutable(
"xdst_dofs initialized to source value"));
108 require(xdst_dofs.
ct() ==
dst_df());
115 #ifdef DIAGNOSTIC_OUTPUT 117 cout <<
"disc id: " << setw(4) << xitr->disc_id
130 #ifdef DIAGNOSTIC_OUTPUT 132 cout <<
" xdst_dofs: " << xdst_dofs
139 ensure(unexecutable(
"xdst_dofs += xdst dofs"));
143 #ifdef DIAGNOSTIC_OUTPUT 145 post_information_message(
"Leaving average_push_action::operator()");
234 require(xother != 0);
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.
Abstract functor to compute the dofs at a destination discretization point.
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.
virtual bool invariant() const
Class invariant.
block< int > _branch_cts
Number of branches accumulated for each discretization member.
virtual void operator()(pullback_map::iterator &xitr, sec_vd &xdst, block< sec_vd_dof_type > &xdst_dofs)
Computes xdst_dofs using xitr and the dofs already in xdst, as needed.
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
block< sec_vd_dof_type > _dst_dofs
Buffer for destination dofs.
virtual bool invariant() const
Class invariant.
Abstract base class with useful features for all objects.
virtual ~average_push_action()
Destructor.
void assign(const_reference_type xitem)
Sets the values of all items to xitem.
virtual bool is_ancestor_of(const any *xother) const
Conformance test; true if other conforms to this.
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
pointer_type base() const
The underlying storage array.
void set_ct(size_type xct)
Sets ct() == xct.
int discretization_ct() const
The number of members in the intersection of the discretization subposet and the down set of the base...
int _dst_df
The fiber dimension of the destination.
int dst_df()
The fiber dimension of the destination.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual pod_type pod(pod_type xid) const =0
The pod index in this space equivalent to xid in the hub id space.
A section of a fiber bundle with a d-dimensional vector space fiber.
virtual void initialize(sec_vd &xdst)
Initializes xdst as needed.
bool invariant_check() const
True if invariant checking is enabled.
void put_fiber(pod_index_type xdisc_id, const vd_lite &xfiber)
Sets the fiber referred to by discretization id xdisc_id to xfiber.
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).
int_type pod_index_type
The plain old data index type.
virtual void finalize(sec_vd &xdst)
Finalizes xdst as needed.
int df() const
The dimension of the fiber space component.
index_space_handle * _disc_seq_id_space
Discretization sequence id space for destination section.
int _disc_ct
Discretization count of destination.
Functor to compute the dofs at a destination discretization point by averaging the source values form...
double sec_vd_dof_type
The type of degree of freedom in the section space.
virtual average_push_action * clone() const
Virtual constructor, makes a new instance of the same type as this.
bool is_same_type(const any *other) const
True if other is the same type as this.
void enable_invariant_check() const
Enable invariant checking.
virtual average_push_action & operator=(const section_pusher_push_action &xother)
Assignment operator.