21 #include "SheafSystem/sec_vd.h" 23 #include "SheafSystem/array_section_dof_map.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/at0.h" 26 #include "SheafSystem/binary_section_space_schema_member.impl.h" 27 #include "SheafSystem/binary_section_space_schema_poset.h" 28 #include "SheafSystem/chart_point.h" 29 #include "SheafSystem/eval_family.h" 30 #include "SheafSystem/eval_iterator.h" 31 #include "SheafSystem/fiber_bundles_namespace.h" 32 #include "SheafSystem/index_space_iterator.h" 33 #include "SheafSystem/namespace_poset.h" 34 #include "SheafSystem/sec_at0.h" 35 #include "SheafSystem/sec_tuple_space.impl.h" 36 #include "SheafSystem/sec_vd_space.h" 37 #include "SheafSystem/section_evaluator.h" 38 #include "SheafSystem/section_space_schema_member.impl.h" 39 #include "SheafSystem/section_space_schema_poset.h" 40 #include "SheafSystem/vd.h" 41 #include "SheafSystem/vd_space.h" 69 require(!xhost_path.
empty());
72 require(xschema_path.
full());
74 require(host_type::fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
78 require(host_type::same_scalar_fiber_space(xns, xschema_path, xscalar_space_path, xauto_access));
82 host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xscalar_space_path, xauto_access);
86 ensure(xns.
owns(result, xauto_access));
87 ensure(result.
path(
true) == xhost_path);
89 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
93 ensure(result.scalar_space_path(
true) == xscalar_space_path);
134 attach_to_state(xhost, xhub_id);
140 ensure(index() == xhub_id);
141 ensure(is_attached());
142 ensure(!is_restricted());
156 attach_to_state(xhost, xid.
hub_pod());
162 ensure(index() ==~ xid);
163 ensure(is_attached());
164 ensure(!is_restricted());
175 require(!xname.empty());
180 attach_to_state(xhost, xname);
186 ensure(name() == xname);
187 ensure(is_attached());
188 ensure(!is_restricted());
199 require(precondition_of(attach_to_state(same args)));
203 attach_to_state(xnamespace, xpath, xauto_access);
207 ensure(postcondition_of(attach_to_state(same args)));
221 require(xother != 0);
225 attach_to_state(xother);
230 ensure(is_attached());
231 ensure(is_same_state(xother));
232 ensure(is_same_restriction(xother));
242 require(precondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
246 new_jim_state(xhost, xdof_map,
false, xauto_access);
250 ensure(postcondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
260 int xbase_version,
bool xauto_access)
265 require(precondition_of(new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
269 new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access);
273 ensure(postcondition_of(new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
286 require(is_ancestor_of(&xother));
287 require(precondition_of(attach_to_state(&xother)));
291 attach_to_state(&xother);
295 ensure(postcondition_of(attach_to_state(&xother)));
308 require(precondition_of(attach_to_state(&xother)));
312 attach_to_state(&xother);
316 ensure(postcondition_of(attach_to_state(&xother)));
329 require(is_attached());
330 require(state_is_read_write_accessible());
338 void* lrow_dofs =
const_cast<void*
>(xfiber.
row_dofs());
341 size_type ldisc_ct = discretization_ct();
344 put_fiber(i, lxfiber_dptr, lfiber_size);
365 schema().discretization_id_space().get_iterator();
368 put_fiber(ldisc_itr.
pod(), xfiber);
372 schema().discretization_id_space().release_iterator(ldisc_itr);
399 require(xother != 0);
406 bool result =
dynamic_cast<const vd*
>(xother) != 0;
442 require(state_is_read_accessible());
446 int result = host()->d();
459 d(
bool xauto_access)
const 463 require(state_is_auto_read_accessible(xauto_access));
467 int result = host()->d(xauto_access);
484 require(state_is_read_accessible());
488 poset_path result(host()->scalar_space_path());
492 ensure(!result.
empty());
505 require(state_is_auto_read_accessible(xauto_access));
509 poset_path result(host()->scalar_space_path(xauto_access));
513 ensure(!result.
empty());
526 require(state_is_auto_read_accessible(xauto_access));
530 bool result = host()->is_vector(_index, xauto_access);
545 require(state_is_auto_read_accessible(xauto_access));
549 host()->put_is_vector(_index, xauto_access);
553 ensure(is_vector(xauto_access));
566 require(state_is_auto_read_accessible(xauto_access));
570 bool result = host()->is_covector(_index, xauto_access);
585 require(state_is_auto_read_accessible(xauto_access));
589 host()->put_is_covector(_index, xauto_access);
593 ensure(is_covector(xauto_access));
606 require(0 <= i && i < df());
633 require(0 <= i && i < df());
634 require(component != 0);
658 require(precondition_of(fiber_prototype().clone()));
659 require(precondition_of(value_at_point_pa(xpt, fiber_prototype().clone(), xauto_access)));
663 result = fiber_prototype().
clone();
664 value_at_point_pa(xpt, *result, xauto_access);
668 ensure(postcondition_of(fiber_prototype().clone()));
669 ensure(postcondition_of(value_at_point_pa(xpt, fiber_prototype().clone(), xauto_access)));
689 require(precondition_of(value_at_point_ua(xptr, result.
row_dof_tuple(), xauto_access)));
695 value_at_point_ua(xpt, ldofs, result.
d());
699 ensure(postcondition_of(value_at_point_ua(xptr, result.
row_dof_tuple(), xauto_access)));
716 bool xauto_access)
const 720 require(!xauto_access ? state_is_read_accessible() :
true);
729 require(schema().evaluation().contains_member(xpt.
chart_id()));
734 require(unexecutable(
"@hack not more than 32 dofs per eval member"));
735 require(xresult != 0);
736 require(xresult_ub >= schema().df());
748 int ldf = schema().df();
753 tuple_type* lchart_tuple =
765 assertion(schema().discretization().contains_member(ldisc_id));
770 if(ltuple->refinement_depth <= lchart_depth)
774 get_fiber(ldisc_id, ldofs, ldf*
sizeof(
dof_type),
false);
779 assertion(ldofs_ct < 32);
815 ensure(unexecutable(
"for 0 <= i < schema.df(), xresult[i] = i-th component of value"));
833 static const int result = 10000;
852 require(xbuflen >= dof_ct());
858 sec_tuple::dof_tuple(reinterpret_cast<void*>(xbuf), xbuflen*
sizeof(
dof_type));
862 ensure(unexecutable(xbuf contains copy of dof
tuple));
875 require(xauto_access || host()->in_jim_edit_mode());
879 result = clone(
true, xauto_access);
880 deep_copy(*result, xauto_access);
885 ensure(is_same_type(result));
899 require(xauto_access || state_is_read_accessible());
907 require(same_schema(&xother));
912 fiber_prototype().lite_prototype().
clone();
919 ldisc_id = ldisc_itr.
pod();
921 get_fiber(ldisc_id.
pod(), *lfiber);
922 xother.
put_fiber(ldisc_id, *lfiber,
false);
964 ensure(unexecutable(result conforms to
scalar_type));
981 fiber_bundle::sec_vd::
982 unify(
bool xauto_access)
988 require(is_multisection(xauto_access));
989 require(xauto_access || host()->in_jim_edit_mode());
993 result = clone(
true, xauto_access);
994 unify(*result, xauto_access);
1006 fiber_bundle::sec_vd::
1007 unify(
sec_vd& xresult,
bool xauto_access)
1011 require(is_multisection(xauto_access));
1026 int ldf = schema().
df();
1044 ldisc_id = ldisc_itr.
pod();
1056 release_branch_id_space_iterator(lbranch_itr,
false);
1091 require(state_is_read_accessible());
1092 require(schema().discretization_id_space().contains(xdisc_id));
1094 require(xfiber.
d()*
sizeof(
dof_type) >= schema().fiber_size());
1099 dof_map(
false).get_fiber(xdisc_id, xfiber.
row_dofs(), xfiber.
d()*
sizeof(
dof_type));
1115 require(state_is_auto_read_accessible(xauto_access));
1116 require(schema(xauto_access).discretization_id_space(xauto_access).contains(xdisc_id));
1118 require(xfiber.
d()*
sizeof(
dof_type) >= schema().fiber_size());
1127 dof_map(
false).get_fiber(xdisc_id, xfiber.
row_dofs(), xfiber.
d()*
sizeof(
dof_type));
1148 require(state_is_read_write_accessible());
1149 require(schema().discretization_id_space().contains(xdisc_id));
1150 require(unexecutable(
"dof_map().fiber_in_bounds(xdisc_id, false)"));
1152 require(xfiber.
d()*
sizeof(
dof_type) >= schema().fiber_size());
1156 dof_map(
true).put_fiber(xdisc_id, xfiber.
row_dofs(), xfiber.
d()*
sizeof(
dof_type));
1172 require(state_is_auto_read_write_accessible(xauto_access));
1173 require(schema(xauto_access).discretization_id_space(xauto_access).contains(xdisc_id));
1174 require(unexecutable(
"dof_map().fiber_in_bounds(xdisc_id, false)"));
1176 require(xfiber.
d()*
sizeof(
dof_type) >= schema().fiber_size());
1182 get_read_write_access(
true);
1185 dof_map(
true).put_fiber(xdisc_id, xfiber.
row_dofs(), xfiber.
d()*
sizeof(
dof_type));
1206 require(state_is_read_write_accessible());
1207 require(schema().discretization_id_space().contains(xdisc_id));
1209 require(xfiber.
d()*
sizeof(
dof_type) >= schema().fiber_size());
1213 dof_map(
true).force_fiber(xdisc_id, xfiber.
row_dofs(), xfiber.
d()*
sizeof(
dof_type));
1229 require(state_is_auto_read_write_accessible(xauto_access));
1230 require(schema(xauto_access).discretization_id_space(xauto_access).contains(xdisc_id));
1232 require(xfiber.
d()*
sizeof(
dof_type) >= schema().fiber_size());
1238 get_read_write_access(
true);
1241 dof_map(
true).force_fiber(xdisc_id, xfiber.
row_dofs(), xfiber.
d()*
sizeof(
dof_type));
1286 const string& result = static_class_name();
1290 ensure(!result.empty());
1305 static const string result(
"sec_vd");
1309 ensure(!result.empty());
1331 ensure(result != 0);
1355 return reinterpret_cast<host_type*
>(_host);
1362 return dynamic_cast<const host_type*
>(xother) != 0;
1382 require(xother != 0);
1389 bool result =
dynamic_cast<const sec_vd*
>(xother) != 0;
1413 invariance(sec_tuple::invariant());
1415 if (invariant_check())
1419 disable_invariant_check();
1425 enable_invariant_check();
1430 ensure(is_derived_query);
1448 deep_size(
const sec_vd& x0,
bool xinclude_shallow)
1463 ensure(result == 0);
1481 add(xl0, xl1, xlresult);
1485 class subtract_functor
1495 class multiply_functor
1505 class divide_functor
1511 divide(xl0, xl1, xlresult);
1515 class contract_functor
1531 #include "SheafSystem/e2.h" 1532 #include "SheafSystem/sec_vd.impl.h" 1543 require(x0.
d(xauto_access) >= xresult.
d(xauto_access));
1544 require(x1.
d(xauto_access) >= xresult.
d(xauto_access));
1549 binary_op(x0, x1, xresult, add_functor(), xauto_access);
1558 ensure(unexecutable(
"for_all: i, 0, xresult.d(),\ 1559 xresult.component(i)==old_x0.component(i)+old_x1.component(i)"));
1575 require(x0.
d(xauto_access) >= xresult.
d(xauto_access));
1576 require(x1.
d(xauto_access) >= xresult.
d(xauto_access));
1581 binary_op(x0, x1, xresult, subtract_functor(), xauto_access);
1590 ensure(unexecutable(
"for_all: i, 0, xresult.d(),\ 1591 xresult.component(i)==old_x0.component(i)-old_x1.component(i)"));
1611 binary_op(x0, x1, xresult, multiply_functor(), xauto_access);
1638 binary_op(x0, x1, xresult, multiply_functor(), xauto_access);
1665 binary_op(x0, x1, xresult, divide_functor(), xauto_access);
1692 binary_op(x0, x1, xresult, divide_functor(), xauto_access);
1715 require(precondition_of(
add(xresult, xother, xresult, xauto_access)));
1719 add(xresult, xother, xresult, xauto_access);
1723 ensure(postcondition_of(
add(xresult, xother, xresult, xauto_access)));
1735 require(precondition_of(
subtract(xresult, xother, xresult, xauto_access)));
1739 subtract(xresult, xother, xresult, xauto_access);
1743 ensure(postcondition_of(
subtract(xresult, xother, xresult, xauto_access)));
1754 require(precondition_of(
multiply(xresult, xother, xresult, xauto_access)));
1758 multiply(xresult, xother, xresult, xauto_access);
1762 ensure(postcondition_of(
multiply(xresult, xother, xresult, xauto_access)));
1773 require(precondition_of(
multiply(xresult, xother, xresult, xauto_access)));
1777 multiply(xresult, xother, xresult, xauto_access);
1781 ensure(postcondition_of(
multiply(xresult, xother, xresult, xauto_access)));
1792 require(precondition_of(
divide(xresult, xother, xresult, xauto_access)));
1796 divide(xresult, xother, xresult, xauto_access);
1800 ensure(postcondition_of(
divide(xresult, xother, xresult, xauto_access)));
1811 require(precondition_of(
divide(xresult, xother, xresult, xauto_access)));
1815 divide(xresult, xother, xresult, xauto_access);
1819 ensure(postcondition_of(
divide(xresult, xother, xresult, xauto_access)));
1839 binary_op(xvector, xcovector, xresult, contract_functor(), xauto_access);
1886 while(!leval_itr.is_done())
1894 leval_itr.gather_dofs(lx0, lsrc_dofs);
1898 levaluator.
max(lsrc_dofs, leval_dofs);
1902 for(
int i=0; i<leval_dofs.
ct(); ++i)
1904 if(leval_dofs[i] > lresult_dofs[i])
1906 lresult_dofs[i] = leval_dofs[i];
1937 require(precondition_of(
max(x0, *result, xauto_access)));
1943 max(x0, *result, xauto_access);
1947 ensure(postcondition_of(
max(x0, *result, xauto_access)));
1988 while(!leval_itr.is_done())
1996 leval_itr.gather_dofs(lx0, lsrc_dofs);
2000 levaluator.
max(lsrc_dofs, leval_dofs);
2004 for(
int i=0; i<leval_dofs.
ct(); ++i)
2006 if(leval_dofs[i] < lresult_dofs[i])
2008 lresult_dofs[i] = leval_dofs[i];
2039 require(precondition_of(
min(x0, *result, xauto_access)));
2045 min(x0, *result, xauto_access);
2049 ensure(postcondition_of(
min(x0, *result, xauto_access)));
2069 require(xmin_ub >= x0.
schema().
df());
2071 require(xmax_ub >= x0.
schema().
df());
2076 for(
int i=0; i<ldf; ++i)
2102 for(
int i=0; i < ldf; ++i)
2107 lmin = (lmin < ldof) ? lmin : ldof;
2110 lmax = (lmax > ldof) ? lmax : ldof;
2121 post_fatal_error_message(
"!extrema_are_dofs() not supported yet.");
2124 delete leval_family;
2178 while(!leval_itr.is_done())
2186 leval_itr.gather_dofs(lx0, lsrc_dofs);
2190 levaluator.
min(lsrc_dofs, lmin_eval_dofs);
2191 levaluator.
max(lsrc_dofs, lmax_eval_dofs);
2195 for(
int i=0; i<ldf; ++i)
2197 if(lmin_eval_dofs[i] < lmin_dofs[i])
2199 lmin_dofs[i] = lmin_eval_dofs[i];
2202 if(lmax_eval_dofs[i] > lmax_dofs[i])
2204 lmax_dofs[i] = lmax_eval_dofs[i];
2263 ldisc_id = ldisc_itr.
pod();
2360 dof_type lvalue = xvalue;
2364 ldof_map.
put_dof(itr.
index(), &lvalue,
sizeof(lvalue));
virtual int d() const
The fiber dimension.
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
poset_state_handle * host() const
The poset which this is a handle to a component of.
eval_family * evaluators() const
The family of evaluators for this rep. /.
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
bool state_is_auto_read_write_accessible(bool xauto_access) const
True if state is auto accessible for read and write, that is, if the state is already accessible for ...
SHEAF_DLL_SPEC void add(const e3_lite &x0, const e3_lite &x1, vd_value_type xt, e3_lite &xresult)
Weighted sum x0*(1-xt) + x1*xt (pre-allocated version for volatile types).
virtual void * row_dofs()
The row dofs for this instance (mutable version).
int df() const
The dimension of the restricted fiber.
host_type * host() const
The poset this is a member of.
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
poset_dof_map * row_dof_tuple(const scoped_index &xindex) const
The row dof tuple associated with xindex.
std::string evaluator_family_name() const
The name of the evaluator family.
bool full() const
True if both poset name and member name are not empty.
SHEAF_DLL_SPEC void min(const sec_vd &x0, vd_lite &xresult, bool xauto_access)
Minimum (pre-allocated version).
virtual bool extrema_are_dofs() const =0
True if the extrema (minima or maxima) of the members of this family occur at the discretization poin...
size_type ct() const
The number of items currently in use.
SHEAF_DLL_SPEC void multiply_equal(sec_vd &xresult, const sec_at0 &xother, bool xauto_access)
xresult multiply_equal xresult (pre-allocated version); synonym for multiply(xresult, xother, xresult, xauto_access).
vd * value_at_point(const chart_point &xpt, bool xauto_access=true) const
Value of the field at xpt, auto-allocated version.
A Cartesian product section space.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
const index_space_handle & row_dof_id_space() const
The row dof id space for the schema defined by this.
The abstract map from section dof ids to section dof values of heterogeneous type.
An abstract iterator over the ids of an id space.
index_space_iterator & get_cover_id_space_iterator(bool xlower, pod_index_type xmbr_hub_id) const
Allocates an iterator for the lower (xlower true) or upper (xlower false) cover id space of the membe...
virtual array_poset_dof_map & dof_map(bool xrequire_write_access=false)
The map from client_ids to dof values for this poset member (mutable version)
poset_path path(bool xauto_access=true) const
A path to this component.
pod_type pod() const
The current id in the iteration.
A section of a bundle with fiber type tuple.
The default name space; a poset which contains other posets as members.
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.
bool path_is_auto_read_accessible(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath exists and is auto read accessible.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
virtual void value_at_point_pa(const chart_point &xpt, vd &xresult, bool xauto_access=true) const
Value of the field at xpt, pre-allocated version.
An iterator over the members of the evaluation subposet contained in the downset of the base space of...
virtual int db() const =0
The dimension of this chart.
bool state_is_auto_read_accessible(bool xauto_access) const
True if the state is auto accessible for read, that is, if the state is already accessible for read o...
A client handle for a general, abstract partially order set.
SHEAF_DLL_SPEC void subtract_equal(sec_vd &xresult, const sec_vd &xother, bool xauto_access)
x0 subtract_equal x1 (self-allocated version); synonym for subtract(xresult, xother, xresult, xauto_access).
virtual void value_at_point_ua(const chart_point &xpt, value_type *xresult, size_type xresult_ub, bool xauto_access=true) const
Value of the field at xpt, unattached version.
virtual void * dof_tuple()=0
The dof tuple (mutable version).
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
A member of a sec_rep_space; a section.
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
tuple * clone(bool xnew_state, bool xauto_access=true) const
Make a new handle instance of current. Attach the new instance to a new state if xnew_state is true...
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
pod_index_type chart_id() const
The id of the chart this point is in.
An abstract vector section space of dimension d.
A Cartesian product space.
virtual void get_read_access() const
Get read access to the state associated with this.
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, const poset_path &xscalar_space_path, bool xauto_access)
Creates a new host table for members of this type. The poset is created in namespace xns with path xh...
virtual namespace_poset * name_space() const
The namespace of host()
virtual void next()=0
Makes id() the next id in the iteration.
void force_fiber(pod_index_type xdisc_id, const vd_lite &xfiber)
Sets the fiber referred to by discretization id xdisc_id to xfiber.
virtual void put_components(const dof_type xcomps[], int xcomps_dimension)
Set values of all the components to the values in xcomps.
namespace_poset * host() const
The namespace this poset resides in. Obsolete; use name_space() instead.
SHEAF_DLL_SPEC void assign(sec_vd &x0, const sec_vd &x1, bool xauto_access)
Assignment to another section; makes x0 have the same value as x1 on the meet of their bases...
SHEAF_DLL_SPEC void subtract(const vd &x0, const vd &x1, vd &xresult, bool xauto_access)
x0 subtract x1 (pre-allocated version for persistent types).
virtual dof_type value_at_coord(const dof_type xdofs[], size_type xdofs_ub, const dof_type xlocal_coords[], size_type xlocal_coords_ub) const
Value at a specified local_coordinate. Single component version.
bool is_valid() const
True if this ia a valid point in a chart.
sec_vd_value_type value_type
The type of component in the value; the scalar type in the fiber space.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
bool invariant() const
Clsss invariant.
Abstract base class with useful features for all objects.
Abstract vector space over dof_type (volatile version).
bool in_same_space(const poset_component *xother) const
Synonym for has_same_host(xother)
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
void dof_tuple(dof_type *xbuf, int xbuflen) const
Copies the entire dof tuple into xbuf.
virtual coord_type * local_coords()=0
The array of local coordinates.
virtual void put_is_covector(bool xauto_access)
Sets is_covector true.
bool is_done() const
True if iteration is finished.
virtual dof_type max(const dof_type xdofs[], size_type xdofs_ub) const
The maximum value of the scalar or component section defined by xdofs.
virtual int dof_packet_ub()
void assign(const_reference_type xitem)
Sets the values of all items to xitem.
void binary_op(const S0 &x0, const S1 &x1, SR &xresult, F xfunctor, bool xauto_access)
Binary operator.
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...
SHEAF_DLL_SPEC void subtract(const sec_vd &x0, const sec_vd &x1, sec_vd &xresult, bool xauto_access)
x0 subtract x1 (pre-allocated version).
SHEAF_DLL_SPEC void divide_equal(sec_vd &xresult, const sec_at0 &xother, bool xauto_access)
xresult divide_equal xresult (pre-allocated version); synonym for divide(xresult, xother...
pointer_type base() const
The underlying storage array.
bool owns(const poset_state_handle &xposet, bool xauto_access) const
True if and only if this contains the poset xposet. synonym for contains_poset(xposet.poset_path(true), xauto_access)
virtual void release_iterator(index_space_iterator &xitr) const =0
Returns the id space iterator xitr to the iterator pool.
virtual int d() const
Dimension of this as a vector space.
void set_ct(size_type xct)
Sets ct() == xct.
void set_comp(int i, scalar_type *xcomponent)
Sets ith component of section.
An index within the external ("client") scope of a given id space.
A family of compatible section evaluators, one for each member of some family of cell types; a map fr...
SHEAF_DLL_SPEC void add_equal(sec_vd &xresult, const sec_vd &xother, bool xauto_access)
x0 add_equal x1 (self-allocated version); synonym for add(xresult, xother, xresult, xauto_access).
bool invariant() const
Class invariant.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
A member of a Cartesian product space; a tuple of attributes (volatile version).
void * row_dofs()
The row dofs for this instance (mutable version).
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
Antisymetric tensor of degree 0 (volatile version).
scalar_type * comp(int i) const
Ith component of section.
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
bool le(pod_index_type xother_index) const
True if this is less than or equal to the member with index xother_index.
sec_rep_descriptor & rep()
The representation for section spaces on this schema.
virtual sec_vd & operator=(const abstract_poset_member &xother)
Assignment operator; synonym for attach_to_state(xother).
A member of a Cartesian product space; a tuple of attributes (persistent version).
bool empty() const
True if both poset name and member name are empty.
SHEAF_DLL_SPEC void divide(const vd &x0, const vd_value_type &x1, vd &xresult, bool xauto_access)
Vector x0 divided by scalar x1 (pre-allocated version for persistent types).
sec_vd * deep_copy(bool xauto_access)
Virtual constructor; makes a new handle of the same type as this, attached to a copy of the state of ...
SHEAF_DLL_SPEC void max(const vd &x0, vd_value_type &xresult, bool xauto_access)
Maximum component of x0, pre-allocated version.
virtual pod_type index() const =0
Index of this space.
virtual index_space_iterator & get_iterator() const =0
Allocates an id space iterator from the iterator pool.
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
SHEAF_DLL_SPEC void add(const sec_vd &x0, const sec_vd &x1, sec_vd &xresult, bool xauto_access)
x0 add x1 (pre-allocated version).
A section of a fiber bundle with a d-dimensional vector space fiber.
const hub_index_space_handle & member_hub_id_space(bool xauto_access) const
The member hub id space.
bool same_discretization(const section_space_schema_member &xother) const
True if this has the same discretization as xother.
virtual const std::string & class_name() const
The name of this class.
SHEAF_DLL_SPEC void min(const vd &x0, vd_value_type &xresult, bool xauto_access)
Minimum component of x0, pre-allocated version.
void detach_from_state()
Detaches field from state it is currently attached to.
const bool LOWER
Selector for lower cover.
int factor_ct() const
The number of factors in this product.
virtual void get_read_write_access(bool xrelease_read_only_access=false)
Get read write access to the state associated with this. If release_read_only_access is requested...
virtual void * dof_tuple()
The dof tuple (mutable version).
virtual bool is_covector(bool xauto_access) const
True if and only if this is a covector.
virtual void put_is_vector(bool xauto_access)
Sets is_vector true.
virtual dof_type min(const dof_type xdofs[], size_type xdofs_ub) const
The minimum value of the scalar or component section defined by xdofs.
total_poset_member & base_space()
The base space component of this (mutable version).
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 refinement_depth
The refinement depth.
SHEAF_DLL_SPEC void multiply(const sec_vd &x0, const sec_at0 &x1, sec_vd &xresult, bool xauto_access)
x0 multiplied by x1 (pre-allocated version).
poset_path scalar_space_path() const
The path of the underlying scalar space.
int_type pod_index_type
The plain old data index type.
poset_dof_map & member_dof_map(pod_index_type xmbr_hub_id, bool xrequire_write_access=false)
The dof map associated with the member identified by hub id xmbr_hub_id (mutable version).
bool fiber_is_ancestor_of(const any *xother) const
True if xother conforms to an instance of the fiber of current.
poset & fiber_space()
The fiber space for section spaces on this schema (mutable version).
sec_vd_dof_type dof_type
The type of degree of freedom.
virtual void put_dof(pod_index_type xdisc_id, pod_index_type xfiber_dof_id, const void *xdof, size_type xdof_size)=0
Sets the dof referred to by xdof_id to the value at xdof.
SHEAF_DLL_SPEC void extrema(const sec_vd &x0, vd_lite &xmin, vd_lite &xmax, bool xauto_access)
Extrema (pre-allocated version).
virtual tuple_lite * clone() const
Virtual constructor, makes a new instance of the same type as this.
virtual const fiber_type & fiber_prototype() const
Virtual constructor for the associated fiber type.
virtual int d() const
Dimension of this as a vector space.
SHEAF_DLL_SPEC void max(const sec_vd &x0, vd_lite &xresult, bool xauto_access)
Maximum (pre-allocated version).
virtual sec_vd * clone() const
Make a new handle, no state instance of current.
int df() const
The dimension of the fiber space component.
void attach_to_state(const namespace_poset *xns, const poset_path &xpath, bool xauto_access=true)
Attach to the state specified by path xpath in the namespace xns.
section_evaluator * member(pod_index_type xtype_id) const
The evaluator associated with cell type xtype_id. Note that the result may be void.
SHEAF_DLL_SPEC void divide(const sec_vd &x0, const sec_at0 &x1, sec_vd &xresult, bool xauto_access)
x0 divided by x1 (pre-allocated version).
An abstract client handle for a member of a poset.
vd * clone(bool xnew_state, bool xauto_access=true) const
Make a new handle instance of current. Attach the new instance to a new state if xnew_state is true...
double sec_vd_dof_type
The type of degree of freedom in the section space.
The type of row dof tuple for base_space_member.
bool is_multisection(bool xauto_access) const
True if this is a multisection.
virtual bool host_is_ancestor_of(const poset_state_handle *other) const
True if other conforms to host.
bool is_ancestor_of(const any *xother) const
True if xother conforms to current.
SHEAF_DLL_SPEC void multiply(const vd &x0, const vd_value_type &x1, vd &xresult, bool xauto_access)
Vector x0 multiplied by scalar x1 (pre-allocated version for persistent types).
static const std::string & static_class_name()
The name of this class.
Namespace containing the vector algrebra functions for the fiber_bundles component of the sheaf syste...
An auto_block with a no-initialization initialization policy.
SHEAF_DLL_SPEC void contract(const sec_vd &xvector, const sec_vd &xcovector, sec_at0 &xresult, bool xauto_access)
Contraction of vector xvector on covector xcovector (pre-allocated version).
Namespace for the fiber_bundles component of the sheaf system.
vd_value_type sec_vd_value_type
The type of component in the value of a section at a point.
bool is_same_type(const any *other) const
True if other is the same type as this.
virtual sec_tuple::scalar_type * new_comp()
Creates a new component for attach_handle_data_members. A "virtual constructor" for components...
Abstract vector space over dof_type.
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
sec_vd()
Default constructor.
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
virtual section_dof_map & dof_map(bool xrequire_write_access=false)
The map from client_ids to dof values for this poset member (mutable version)
void release_cover_id_space_iterator(index_space_iterator &xcover_itr) const
Returns xcover_itr to the pool of id space iterators.
double vd_value_type
The type of component in the fiber; the scalar type in the fiber vector space.
SHEAF_DLL_SPEC void contract(const t2_lite &x0, int xp, int xq, at0_lite &xresult)
Contraction on contravariant index xp and covariant index xq (pre-allocated version for volatime type...
virtual bool is_vector(bool xauto_access) const
True if and only if this is a vector (as opposed to a covector).
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().
A description for a section representation scheme.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...