21 #include "SheafSystem/print_property_dofs_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" 27 #include "SheafSystem/std_iomanip.h" 44 : _property(xproperty),
45 _seq_id_space(&xproperty.schema().discretization_id_space())
55 _zero_specified = xzero_specified;
65 _specified_dofs.
set_ct(ldf);
97 require(
property().state_is_read_accessible());
108 cout <<
"id: " << setw(5) << xdisc_id.
hub_id() << setw(5) << lseq_id;
112 cout <<
" coordinates: ";
113 for(
int i=0; i<xcoords.
ct(); ++i)
115 cout <<
" " << setw(16) << xcoords[i];
126 cout <<
" property: ";
127 for(
int i=0; i<_dofs.ct(); ++i)
129 is_zero = is_zero && (_dofs[i] == 0.0);
130 cout <<
" " << setw(16) << _dofs[i];
133 if(_dof_function != 0)
136 if(is_zero && _zero_specified)
141 for(
int i=0; i<_dofs.ct(); ++i)
143 _specified_dofs[i] = 0.0;
151 _dof_function(xcoords, _specified_dofs);
156 cout <<
" specified: ";
157 for(
int i=0; i<_dofs.ct(); ++i)
159 cout <<
" " << setw(16) << _specified_dofs[i];
164 cout <<
" difference: ";
165 for(
int i=0; i<_dofs.ct(); ++i)
167 cout <<
" " << setw(16) << (_specified_dofs[i] - _dofs[i]);
190 sec_vd& result = _property;
210 result = _dof_function;
print_property_dofs_action(sec_vd &xproperty, property_dof_function_type xfcn, bool xzero_specified=false)
Creates an instance using global coordinates xdomain_coords and pullback map xmap.
size_type ct() const
The number of items currently in use.
bool in_scope() const
True if and only if scope() contains an entry for pod().
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
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.
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
property_dof_function_type dof_function()
The function for computing the property dofs at given global coordinates.
void set_ct(size_type xct)
Sets ct() == xct.
An index within the external ("client") scope of a given id space.
void(* property_dof_function_type)(block< sec_vd_value_type > &xglobal_coords, block< sec_vd_dof_type > &xproperty_dofs)
The type of the function for computing the property dofs at given global coordinates.
A section of a fiber bundle with a d-dimensional vector space fiber.
scoped_index hub_id() const
This mapped to the hub id space.
virtual void operator()(const scoped_index &xdisc_id, block< sec_vd_value_type > &xglobal_coords)
The push action.
virtual section_space_schema_member & schema()
The restricted schema for this (mutable version).
sec_vd & property()
The property section being acted on.
int df() const
The dimension of the fiber space component.
virtual ~print_property_dofs_action()
Destructor.
vd_value_type sec_vd_value_type
The type of component in the value of a section at a point.