21 #include "SheafSystem/assert_contract.h" 22 #include "SheafSystem/block.impl.h" 23 #include "SheafSystem/chart_point_3d.h" 24 #include "SheafSystem/fiber_bundles_namespace.h" 25 #include "SheafSystem/poset_path.h" 26 #include "SheafSystem/preorder_iterator.h" 27 #include "SheafSystem/quad_connectivity.h" 28 #include "SheafSystem/schema_descriptor.h" 29 #include "SheafSystem/schema_poset_member.h" 30 #include "SheafSystem/structured_block.h" 31 #include "SheafSystem/wsv_block.h" 52 require(!xhost_path.
empty());
55 require(xschema_path.
full());
57 require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path(), xauto_access));
59 require(xmax_db >= 0);
64 host_type::new_table(xns, xhost_path, xschema_path, xmax_db, xauto_access);
68 ensure(xns.
owns(result, xauto_access));
69 ensure(result.
path(
true) == xhost_path);
71 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
73 ensure(result.
max_db() == xmax_db);
90 require(!xhost_path.
empty());
94 require(xmax_db >= 0);
99 new_host(xns, xhost_path, standard_schema_path(), xmax_db, xauto_access);
103 ensure(xns.
owns(result, xauto_access));
104 ensure(result.
path(
true) == xhost_path);
106 ensure(result.
schema(
true).
path(xauto_access) == standard_schema_path());
108 ensure(result.
max_db() == xmax_db);
138 ensure(! is_attached() );
162 require(state_is_read_accessible());
174 subposet lsp(host(), base_space_poset::d_cells_name(2, 2));
175 _elements_id_space = &lsp.
id_space();
180 ensure(unexecutable(data members created but not attached));
196 1.0 + 1000.0*numeric_limits<chart_point_coord_type>::epsilon();
198 require((-ONE <= xcoord) && (xcoord <= ONE));
210 xcoord = (
modf(lcoord, &lref_chart)*2.0) - 1.0;
221 if(xchart_id == xchart_id_ub)
229 ensure((xchart_id >= 0) && (xchart_id < xchart_id_ub));
230 ensure((-ONE <= xcoord) && (xcoord <= ONE));
254 require(precondition_of(refine_point_pa(xpt, *result)));
259 refine_point_pa(xpt, *result);
263 ensure(postcondition_of(refine_point_pa(xpt, *result)));
276 require(state_is_read_accessible());
278 require(xpt.
chart_id() == index().pod());
284 require(xpt.
db() >= db());
285 require(result.
db() >= db());
306 require(state_is_read_accessible());
308 require(xpt.
chart_id() == index().pod());
314 require(xpt.
db() >= db());
336 require(precondition_of(unrefine_point_pa(xpt, *result)));
341 unrefine_point_pa(xpt, *result);
345 ensure(postcondition_of(unrefine_point_pa(xpt, *result)));
358 require(state_is_read_accessible());
371 require(xpt.
db() >= db());
372 require(result.
db() >= db());
380 ensure(result.
chart_id() == index().pod());
393 require(state_is_read_write_accessible());
416 require(state_is_read_write_accessible());
438 require(state_is_read_write_accessible());
461 require(state_is_read_write_accessible());
563 invariance(homogeneous_block::invariant());
565 if(invariant_check())
569 disable_invariant_check();
573 invariance(state_is_read_accessible() ? is_jim(
false) :
true);
577 enable_invariant_check();
614 attach_to_state(&xother);
618 ensure(is_same_state(&xother));
632 require(is_ancestor_of(&xother));
static host_type & new_host(namespace_type &xns, const poset_path &xhost_path, const poset_path &xschema_path, int xmax_db, bool xauto_access)
Creates a new host poset for members of this type. The poset is created in namespace xns with path xh...
double chart_point_coord_type
The type of local coordinate in the base space; the scalar type for the local coordinate vector space...
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.
chart_point * refine_point(const chart_point &xpt) const
A chart point in the direct refinement of this which is the same as xpt in this; auto-allocated versi...
virtual void unsimplify()=0
Removes the standard simplex refinement of this from its lower cover and changes this from a jrm to a...
bool full() const
True if both poset name and member name are not empty.
poset_path path(bool xauto_access=true) const
A path to this component.
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 int db() const =0
The dimension of this chart.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
virtual void simplify()=0
Inserts the standard simplex refinement of this into its lower cover and changes this from a jim to a...
virtual bool invariant() const
Class invariant.
virtual ~structured_block()
Destructor; deletes a poset member and its attached state, if any.
pod_index_type chart_id() const
The id of the chart this point is in.
A client handle for a base space member which represents a homgeneous collection of local cells...
Abstract base class with useful features for all objects.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
virtual structured_block & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
void refine_coordinate(chart_point_coord_type &xcoord, scoped_index::pod_type &xchart_id, size_type xchart_id_ub) const
Transforms local coordinate xcoord from block local to zone local.
structured_block()
Default constructor; creates a new, unattached structured_block handle.
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)
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
bool empty() const
True if both poset name and member name are empty.
SHEAF_DLL_SPEC void modf(const sec_at0 &x0, sec_at0 &xintpart, sec_at0 &xfractpart, bool xauto_access)
Compute modf of x0 (modf(x0)) (pre-allocated version).
virtual void refine_point_pa(const chart_point &xpt, chart_point &result) const =0
A chart point in the direct refinement of this which is the same as xpt in this; pre-allocated versio...
const scattered_insertion_index_space_handle & id_space() const
The id space for the members of with this (const version).
virtual void detach_from_state()
Detach this handle from its state, if any.
chart_point * unrefine_point(const chart_point &xpt) const
The point in this which is the same as xpt in the direct refinement of this; auto-allocated version...
pod_index_type pod_type
The "plain old data" storage type for this.
virtual void unrefine_point_pa(const chart_point &xpt, chart_point &result) const =0
The point in this which is the same as xpt in the direct refinement of this; pre-allocated version...
virtual void init_handle_data_members()
Initializes handle data members when attaching to a different member in a different host...
virtual structured_block * clone() const =0
Make a new handle, no state instance of current.
int max_db() const
The maximum dimension of the members of this base space.
An abstract client handle for a member of a poset.
An auto_block with a no-initialization initialization policy.
Namespace for the fiber_bundles component of the sheaf system.
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 void refine()=0
Inserts the standard refinement of this into its lower cover and changes this from a jim to a jrm...
virtual void unrefine()=0
Removes the standard refinement of this from its lower cover and changes this from a jrm to a jim...