21 #include "SheafSystem/sec_e3_uniform.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/base_space_poset.h" 25 #include "SheafSystem/binary_section_space_schema_member.impl.h" 26 #include "SheafSystem/at0_space.h" 27 #include "SheafSystem/at1_space.h" 28 #include "SheafSystem/e3.h" 29 #include "SheafSystem/fiber_bundles_namespace.h" 30 #include "SheafSystem/sec_at0.h" 31 #include "SheafSystem/sec_at0_space.h" 32 #include "SheafSystem/sec_at1_space.h" 33 #include "SheafSystem/sec_rep_space.h" 34 #include "SheafSystem/structured_block_3d.h" 35 #include "SheafSystem/sec_tuple.impl.h" 36 #include "SheafSystem/sec_tuple_space.impl.h" 37 #include "SheafSystem/sec_vd.impl.h" 66 require(!xhost_path.
empty());
69 require(xschema_path.
full());
71 require(host_type::fiber_space_conforms<fiber_type::host_type>(xns, xschema_path, xauto_access));
75 require(host_type::same_scalar_fiber_space(xns, xschema_path, xscalar_space_path, xauto_access));
79 host_type& result = host_type::new_table(xns, xhost_path, xschema_path, xscalar_space_path, xauto_access);
83 ensure(xns.
owns(result, xauto_access));
84 ensure(result.
path(
true) == xhost_path);
86 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
90 ensure(result.
d(
true) == result.
dd(
true));
93 ensure(result.
p(
true) == 1);
108 const std::string& xsection_suffix,
109 const std::string& xfiber_suffix,
118 require(xbase_path.
full());
121 require(xrep_path.
empty() || xrep_path.
full());
124 require(xsection_suffix.empty() || poset_path::is_valid_name(xsection_suffix));
126 require(xfiber_suffix.empty() || poset_path::is_valid_name(xfiber_suffix));
128 require(standard_host_is_available<sec_e3_uniform>(xns, xbase_path, xrep_path, xsection_suffix, xfiber_suffix, xauto_access));
129 require(fiber_type::standard_host_is_available<fiber_type>(xns, xfiber_suffix, xauto_access));
130 require(schema_type::standard_host_is_available<sec_e3_uniform>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access));
134 poset_path lstd_path = standard_host_path<sec_e3_uniform>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix);
150 poset_path lrep_path = (!xrep_path.empty() ? xrep_path : standard_rep_path());
155 schema_type::standard_member<sec_e3_uniform>(xns, xbase_path, lrep_path, xfiber_suffix, xauto_access);
160 scalar_type::standard_host(xns, xbase_path, lrep_path, xsection_suffix, xfiber_suffix, xauto_access).
path(xauto_access);
164 lresult_ptr = &new_host(xns, lstd_path, lstd_schema_path, lscalar_space_path, xauto_access);
171 ensure(xns.
owns(result, xauto_access));
172 ensure(result.
path(
true) == standard_host_path<sec_e3_uniform>(xbase_path, xrep_path, xsection_suffix, xfiber_suffix));
174 ensure(result.
schema(
true).
path(xauto_access) ==
175 schema_type::standard_member_path<sec_e3_uniform>(xbase_path, xrep_path, xfiber_suffix));
179 ensure(result.
d(
true) == result.
dd(
true));
181 scalar_type::standard_host_path<scalar_type>(xbase_path, result.
rep().
path(xauto_access), xsection_suffix, xfiber_suffix));
183 ensure(result.
p(
true) == 1);
229 require(precondition_of(new_jim_state(xhost, xmin, xmax, xauto_access)));
233 new_jim_state(xhost, xmin, xmax, xauto_access);
237 ensure(postcondition_of(new_jim_state(xhost, xmin, xmax, xauto_access)));
250 require(precondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
254 new_jim_state(xhost, xdof_map,
false, xauto_access);
258 ensure(postcondition_of(new_jim_state(xhost, xdof_map,
false, xauto_access)));
274 require(precondition_of(new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
278 new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access);
282 ensure(postcondition_of(new_jim_state(xhost, xbase_mbr, xbase_version, xauto_access)));
294 require(precondition_of(new_jim_state(xhost, xbase_parts, xauto_access)));
298 new_jrm_state(xhost, xbase_parts, xauto_access);
302 require(postcondition_of(new_jim_state(xhost, xbase_parts, xauto_access)));
324 attach_to_state(xhost, xindex);
330 ensure(index() == xindex);
331 ensure(is_attached());
332 ensure(!is_restricted());
347 attach_to_state(xhost, xindex.
hub_pod());
353 ensure(index() ==~ xindex);
354 ensure(is_attached());
355 ensure(!is_restricted());
367 require(!xname.empty());
372 attach_to_state(xhost, xname);
378 ensure(name() == xname);
379 ensure(is_attached());
380 ensure(!is_restricted());
393 require(precondition_of(attach_to_state(same args)));
397 attach_to_state(xnamespace, xpath, xauto_access);
401 ensure(postcondition_of(attach_to_state(same args)));
415 require(xother != 0);
419 attach_to_state(xother);
424 ensure(is_attached());
425 ensure(is_same_state(xother));
426 ensure(is_same_restriction(xother));
455 require(precondition_of(new_jim_state(xhost, 0,
false, xauto_access)));
456 require(xmin.
ct() >= 3);
457 require(xmax.
ct() >= 3);
458 require_for_all(i, 0, 3, xmin[i] <= xmax[i]);
462 new_jim_state(xhost, static_cast<poset_dof_map*>(0),
false, xauto_access);
463 put_bounds(xmin, xmax, xauto_access);
467 ensure(min_x(xauto_access) == xmin[0]);
468 ensure(min_y(xauto_access) == xmin[1]);
469 ensure(min_z(xauto_access) == xmin[2]);
470 ensure(max_x(xauto_access) == xmax[0]);
471 ensure(max_y(xauto_access) == xmax[1]);
472 ensure(max_z(xauto_access) == xmax[2]);
489 require(is_ancestor_of(&xother));
490 require(precondition_of(attach_to_state(&xother)));
494 attach_to_state(&xother);
498 ensure(postcondition_of(attach_to_state(&xother)));
511 require(precondition_of(attach_to_state(&xother)));
515 attach_to_state(&xother);
519 ensure(postcondition_of(attach_to_state(&xother)));
532 require(precondition_of(sec_vd::operator=(xfiber)));
536 sec_vd::operator=(xfiber);
540 ensure(postcondition_of(sec_vd::operator=(xfiber)));
553 require(precondition_of(sec_vd::operator=(xfiber)));
557 sec_vd::operator=(xfiber);
561 ensure(postcondition_of(sec_vd::operator=(xfiber)));
593 require(xmin.
ct() >= 2);
594 require(xmax.
ct() >= 2);
595 require_for_all(i, 0, 2, xmin[i] <= xmax[i]);
596 require(xauto_access || state_is_read_write_accessible());
602 get_read_write_access(
true);
620 put_fiber(0, lfiber);
627 put_fiber(1, lfiber);
634 put_fiber(2, lfiber);
641 put_fiber(3, lfiber);
648 put_fiber(4, lfiber);
655 put_fiber(5, lfiber);
662 put_fiber(6, lfiber);
669 put_fiber(7, lfiber);
678 ensure(min_x(xauto_access) == xmin[0]);
679 ensure(min_y(xauto_access) == xmin[1]);
680 ensure(min_z(xauto_access) == xmin[2]);
681 ensure(max_x(xauto_access) == xmax[0]);
682 ensure(max_y(xauto_access) == xmax[1]);
683 ensure(max_z(xauto_access) == xmax[2]);
696 require(xauto_access || state_is_read_accessible());
729 ensure(xmin.
ct() == 3);
730 ensure(xmax.
ct() == 3);
731 ensure_for_all(i, 0, 3, xmin[i] <= xmax[i]);
746 require(xauto_access || state_is_read_accessible());
758 get_fiber(0, lfiber);
783 require(xauto_access || state_is_read_accessible());
795 get_fiber(0, lfiber);
820 require(xauto_access || state_is_read_accessible());
832 get_fiber(0, lfiber);
857 require(xauto_access || state_is_read_accessible());
869 get_fiber(6, lfiber);
894 require(xauto_access || state_is_read_accessible());
906 get_fiber(6, lfiber);
931 require(xauto_access || state_is_read_accessible());
943 get_fiber(6, lfiber);
968 require(xauto_access || state_is_read_accessible());
990 result = (max_x(
false) - min_x(
false))/ltuple.
i_size;
1014 require(xauto_access || state_is_read_accessible());
1036 result = (max_y(
false) - min_y(
false))/ltuple.
j_size;
1060 require(xauto_access || state_is_read_accessible());
1082 result = (max_z(
false) - min_z(
false))/ltuple.
k_size;
1186 result(sec_rep_descriptor::standard_host_path().poset_name(),
"vertex_block_uniform");
1190 ensure(result.
full());
1216 const string& result = static_class_name();
1220 ensure(!result.empty());
1235 static const string result(
"sec_e3_uniform");
1239 ensure(!result.empty());
1261 ensure(result != 0);
1288 require(xother != 0);
1319 invariance(sec_e3::invariant());
1321 if (invariant_check())
1325 disable_invariant_check();
1329 enable_invariant_check();
1334 ensure(is_derived_query);
static int factor_ct(int xd)
Factor_ct() as a function of dimension xd.
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 ...
A client handle for a subposet.
bool full() const
True if both poset name and member name are not empty.
size_type ct() const
The number of items currently in use.
A Cartesian product section space.
Euclidean vector space of dimension 3 (volatile version).
The abstract map from section dof ids to section dof values of heterogeneous type.
A space of scalars viewed as an antisymmetric tensor section space of degree 1.
poset_path path(bool xauto_access=true) const
A path to this component.
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...
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.
A general antisymmetric tensor of degree 1 over an abstract vector space (persistent version)...
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
A general antisymmetric tensor of degree 1 over an abstract vector space (volatile 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.
poset_path vector_space_path() const
The path of the underlying vector space.
void reserve(index_type xub)
Makes ub() at least xub; if new storage is allocated, it is uninitialized.
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
poset_state_handle & member_poset(pod_index_type xhub_id, bool xauto_access=true) const
The poset_state_handle object referred to by hub id xhub_id.
The poset for sec_rep_descriptors.
namespace_poset * host() const
The namespace this poset resides in. Obsolete; use name_space() instead.
Euclidean vector space of dimension 3 (persistent version).
Abstract base class with useful features for all objects.
int p() const
The tensor degree of this space.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
sec_rep_descriptor & rep()
A representation descriptor for this sec rep space (mutable version).
virtual section_space_schema_member & schema()
The schema for this poset (mutable version)
size_type k_size
The upper bound on the z direction index for structured blocks.
size_type i_size
The upper bound on the x direction index for structured blocks.
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)
void set_ct(size_type xct)
Sets ct() == xct.
An index within the external ("client") scope of a given id space.
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
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. ...
int dd() const
The dimension of the underlying ("domain") vector space.
bool empty() const
True if both poset name and member name are empty.
size_type j_size
The upper bound on the y direction index for structured blocks.
An abstract vector space viewed as an antisymmetric tensor space of degree 1.
int_type pod_index_type
The plain old data index type.
poset_path scalar_space_path() const
The path of the underlying space of scalars.
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.
An abstract client handle for a member of a poset.
std::string path() const
The full path as a string.
The type of row dof tuple for base_space_member.
row_dof_tuple_type * member_dof_tuple(pod_index_type xmbr_hub_id, bool xrequire_write_access=false) const
The row dof tuple for the member with member hub id xmbr_hub_id.
An auto_block with a no-initialization initialization policy.
Namespace for the fiber_bundles component of the sheaf system.
virtual int d(int xp, int xdd) const
Dimension d() as a function of degree xp and domain dimension xdd.
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...
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...