21 #include "SheafSystem/product_section_space_schema_member.impl.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/array_index_space_state.h" 25 #include "SheafSystem/ij_product_structure.h" 26 #include "SheafSystem/namespace_poset.h" 27 #include "SheafSystem/postorder_itr.h" 28 #include "SheafSystem/preorder_itr.h" 29 #include "SheafSystem/product_section_dof_iterator.h" 30 #include "SheafSystem/product_section_space_schema_poset.h" 31 #include "SheafSystem/sec_rep_descriptor.h" 32 #include "SheafSystem/section_space_schema_jims_index_space_handle.h" 33 #include "SheafSystem/section_space_schema_jims_index_space_state.h" 190 const tern& xnew_jem,
200 new_jrm_state(xhost, xexpansion, xexpansion_ct, xnew_jem, xauto_access);
229 ensure(
host() == xhost);
230 ensure(
index() == xhub_id);
250 ensure(
host() == xhost);
251 ensure(
index() ==~ xid);
257 const std::string& xname)
263 require(!xname.empty());
273 ensure(
host() == xhost);
274 ensure(
name() == xname);
461 set<scoped_index::pod_type> ltop_seq_ids;
484 ltop_seq_ids.insert(ltop_space.
pod(lindex));
499 ldisc_id_space->
clear();
502 set<pod_index_type>::iterator lseq_id_itr;
503 for(lseq_id_itr = ltop_seq_ids.begin();
504 lseq_id_itr != ltop_seq_ids.end();
539 lfiber_schema_id_space,
547 section_space_schema_jims_index_space_state::
549 lfiber_schema_id_space,
550 host()->product_structure());
554 "section_space_schema_jims_index_space_state",
555 largs,
false,
false);
727 require(
host()->is_schematized(
false));
758 require(xis_table_dof);
766 ensure(unexecutable(result != 0 implies it points to a buffer of
length table_dof_ct()+1));
792 only_row_dof_id_space,
796 update_type lupdate = xupdate_id_space ? all_id_spaces : only_row_cache;
813 string ldisc_id_space_name =
823 if((lupdate == all_id_spaces) &&
830 lupdate = only_row_dof_id_space;
837 arg_list largs = array_index_space_state::make_arg_list(0);
840 lbase_host.new_member_id_space(ldisc_id_space_name,
841 "array_index_space_state",
842 largs,
false,
false);
847 if(lupdate == only_row_cache)
852 lupdate = all_id_spaces;
858 if((lupdate == only_row_cache) &&
861 lupdate = only_row_dof_id_space;
872 case only_row_dof_id_space:
939 tuple(xdof_id, ldisc_id, lfiber_dof_id);
984 bool xauto_access)
const 1024 tuple(xdof_id, ldisc_id, lfiber_dof_id);
1031 result =
alignment(xdof_id, xis_table_dofs);
1068 bool xauto_access)
const 1110 tuple(xdof_id, ldisc_id, lfiber_dof_id);
1155 bool xauto_access)
const 1193 else if(xis_table_dof)
1201 tuple(xdof_id, ldisc_id, lfiber_dof_id);
1203 result =
offset(ldisc_id, lfiber_dof_id,
false);
1251 bool xauto_access)
const 1320 ldecomp->
force(lschema_mbr_id,
true);
1328 host()->member_hub_id_space(
false),
1382 require(
host()->member_id_spaces(
false).contains(xid_space_name));
1383 require(
host()->
base_space().member_id_spaces(
false).contains(xid_space_name));
1385 require(
host()->
fiber_schema().member_id_spaces(
false).contains(xid_space_name));
1392 xschema_poset_ext_id =
1401 xbase_space_ext_id =
1406 xfiber_schema_ext_id =
1469 require(xrequire_write_access ?
1493 require(xrequire_write_access ?
1586 ensure(result != 0);
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 get_ext_ids(const std::string &xid_space_name, pod_index_type &xschema_poset_ext_id, pod_index_type &xschema_member_ext_id, pod_index_type &xbase_space_ext_id, pod_index_type &xfiber_schema_ext_id, pod_index_type &xlocal_schema_ext_id) const
Gets the external ids of this in the id space with namexid_space_name.
virtual bool is_jim(bool xin_current_version=true) const
True if this member is join irreducible in the current version of the host (xin_current_version == tr...
A client handle for a subposet.
An implementation of class explicit_index_space_handle that has a section space schema jims id space ...
virtual size_t ext_data_type_ct(bool xis_table_schema) const
The number of instances of the external data type needed to represent this schema.
bool is_done() const
True if iteration finished.
int version(bool xunalias=true) const
The (possibly aliased) version of this component. The version of the host used when evaluating proper...
void length(const S &x0, SR &xresult, bool xauto_access)
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.
virtual const abstract_product_structure & product_structure() const =0
The product structure for this id space (const version).
virtual size_t size() const
The number of bytes in this dof.
virtual void new_jrm_state(bool xauto_access=true)
Creates a new jrm (join-reducible member) state in host() and attaches this to it.
schema_poset_member & fiber_schema()
The fiber schema component of this (mutable version).
int _db
The dimension of the base space 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...
virtual size_t size() const =0
The number of bytes in this dof.
poset_state_handle * _host
The host poset for this component.
subposet & evaluation()
The evaluation subposet for section spaces on this schema (mutable version).
A client handle for a general, abstract partially order set.
A three state "bool". Does not provide the operations of ternary logic and is intended for use mostly...
total_poset_member _base_space
The base space componewnt of this.
index_space_handle & get_id_space(const std::string &xname) const
Allocates an id space handle from the handle pool attached to state with name xname.
void update_row_cache_without_disc_id_space() const
Updates row cache using existing _discretization_id_space.
const scoped_index & index() const
The current item in the subset.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
dof_descriptor_array * dof_descriptors(bool xis_table_dof) const
The dof_descriptors_array for the table dof tuple (xis_table_dof true) or row dof tuple defined by th...
const index_space_family & member_id_spaces(bool xauto_access) const
Collection of member id spaces for this (const version).
void clear()
Delete all ids.
virtual bool contains_member(pod_index_type xmbr_hub_id) const
True if this poset contains poset member with hub id xmbr_hub_id.
index_space_handle * _row_dof_id_space
The row dof id space for the schema defined by this.
bool is_same_state(const poset_state_handle *xhost, pod_index_type xhub_id) const
True is this is attached to state with hub id xhub_id in host xhost.
Specialization of the filtered depth-first iterator which exposes the POSTVISIT_ACTION to the client...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
virtual sheaf::primitive_type type() const =0
The primitive type index of the dof defined by this.
std::string row_dof_subposet_name() const
The standard name for the row dof subposet associated with this schema member. Synonym for dof_subpos...
virtual void release_id_space() const =0
Returns this id space handle to the handle pool.
virtual void get_read_access() const
Get read access to the state associated with this.
virtual namespace_poset * name_space() const
The namespace of host()
virtual dof_descriptor_array * dof_descriptors(bool xis_table_dof) const
The dof_descriptors_array for the table dof tuple (xis_table_dof true) or row dof tuple defined by th...
const scoped_index & index() const
The index of the component state this handle is attached to.
std::string name() const
A name for this.
virtual primitive_type type() const
The primitive type index of the dof defined by this.
int db
The base space dimension.
bool is_factorable() const
True if this member is factorable into base space and fiber schema components.
virtual product_section_space_schema_member & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
An schema poset for a section space represented by a Cartesian product subspace of the tensor product...
void next()
Makes item the next member of the subset.
const scoped_index & index() const
The index of the current member of the iteration.
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...
virtual size_type offset(pod_index_type xdof_id, bool xis_table_dof) const
The offset for the table dof (xis_table_dof true) or row dof referred to by xdof_id in the schema def...
virtual size_t alignment() const =0
The alignment for this dof.
Abstract base class with useful features for all objects.
pod_index_type fiber_schema_id() const
The member id of the fiber schema component of this.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
A whitespace separated list of arguments. Insertion operaters are used to insert arguments into the l...
virtual size_t alignment() const
The alignment for this dof.
const bool NOT_STRICT
Iteration strictness control.
const bool DOWN
Iteration directions.
virtual void update_row_cache(bool xupdate_id_space=false) const
Updates cached row properties.
scoped_index _row_cache_index
The index with respect to which the cached row properties were evaluated.
virtual pod_index_type get_ext_id(pod_index_type xint_id, const std::string &xid_space_name, bool xauto_access) const
Translates xint_id to an external id using the equivalence map with name xid_space_name.
primitive_type
Type ids for sheaf primitives.
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...
A client handle for a mutable partially ordered set.
size_type _row_dof_ct
The number of row dofs defined by this schema.
A map from schema poset member ids to dof values for primitives_poset members.
int table_dof_ct() const
The number of table dofs defined by this schema. Synonym for dof_ct(true).
An index within the external ("client") scope of a given id space.
size_type _row_dof_tuple_ub
The size in bytes of the row dof tuple defined by this schema.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
dof_descriptor_array * _row_dof_descriptors
The dof_descriptors_array for the row dof tuple defined by this schema.
virtual void update_row_cache(bool xupdate_id_space=false) const
Updates cached row properties; if xupdate_id_space, force the update of the row dof id space...
virtual void new_jim_state(poset_dof_map *xdof_map=0, bool xcopy_dof_map=false, bool xauto_access=true)
Creates a new jim (join-irreducible member) state in xhost and attaches this to it.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
static std::string intersection_id_space_name(const subposet &xsp, const pod_index_type xhub_id)
The name of the id space for intersection of xsp with the down set of the member with hub id xhub_id...
product_section_space_schema_member()
Default constructor; creates a new, unattached product_section_space_schema_member handle...
virtual poset_dof_iterator * dof_iterator(bool xis_table_dofs, int xversion=CURRENT_MEMBER_VERSION) const
A postorder iterator over the table (xis_table_dofs == true) or row (xis_table_dofs == false) dofs de...
int db(pod_index_type xmbr_hub_id) const
The base space dimension of the member with hub id xmbr_hub_id.
void reserve(size_type xcapacity)
Reserve enough memory for xcapacity number of ids.
virtual product_section_space_schema_member * clone() const
Make a new handle, no state instance of current.
virtual size_type ct() const =0
The number of members.
int discretization_ct() const
The number of members in the intersection of the discretization subposet and the down set of the base...
virtual bool invariant() const
Class invariant.
Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space...
An array for storing structs which describe the size, alignment, and offset of dofs within a dof tupl...
subposet & discretization()
The discretization subposet for section spaces on this schema (mutable version).
int _row_cache_version
The version with respect to which the cached row properties were evaluated.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
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...
virtual bool host_is_ancestor_of(const poset_state_handle *other) const
True if other conforms to host.
virtual pod_type pod(pod_type xid) const =0
The pod index in this space equivalent to xid in the hub id space.
const ij_product_structure & product_structure() const
The product structure of this poset.
virtual index_iterator * get_decomposition(pod_index_type xindex) const
An iterator over the members of the decomposition identified by xindex.
void update_row_dof_id_space() const
Updates _row_dof_id_space.
Iterates over the subset of Zn defined by the characteristic function host().
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.
pod_type hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this id space; synonym for unglued_hub...
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. ...
void next()
Makes this the next member of the subset.
size_type fiber_size() const
The number of bytes in the fiber.
const index_space_handle & fiber_schema_id_space(bool xis_table_dofs) const
The id space for the dofs in the down set of the fiber schema of this.
index_space_handle * _discretization_id_space
The id space for the discretization members in the down set of the base space of this.
size_t row_dof_tuple_ub() const
The size in bytes of the row dof tuple defined by this schema. Synonym for dof_tuple_ub(false).
bool invariant_check() const
True if invariant checking is enabled.
Iterates in postorder over dofs of a schema member anchor. Attaches a handle of type schema_poset_mem...
virtual schema_poset_member & ext_data_type_schema()
The schema for the external data type associated with this schema.
total_poset_member & base_space()
The base space component of this (mutable version).
poset_state_handle & fiber_schema()
The fiber schema for section spaces on this schema (mutable version).
int_type pod_index_type
The plain old data index type.
A 2D implementation of abstract_product_structure.
void update_row_cache_with_disc_id_space() const
Updates row cache including _discretization_id_space.
int _evaluation_ct
The number of members in the intersection of the evaluation subposet the down set of the base space c...
virtual primitives_poset_dof_map & dof_map(bool xrequire_write_access=false)
The map from schema member ids or client ids to dof values for this poset member (mutable version) ...
bool is_done() const
True if iteration finished.
A handle for a scattered_insertion_index_space_state.
A client handle for a poset member which has been prepared for use as a schema for a section space...
bool contains(pod_type xid) const
True, if this contains an id space with id xid.
virtual subposet & jims()
The subset of all jims (mutable version)
virtual ~product_section_space_schema_member()
Destructor; deletes a poset member and its attached state, if any.
void push_back(const scoped_index &xhub_id)
Make the next id in this space equivalent to xhub_id in the hub id space. synonym for push_back(xhub_...
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
void tuple(pod_index_type x, size_type xj_ub, pod_index_type &xi, pod_index_type &xj)
Ordinal to 2-tuple conversion.
virtual void ordinal(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id, pod_index_type &xindex) const
The ordinal conversion from base space id xbase_space_id and fiber schema id xfiber_schema_id to sect...
virtual size_type offset(pod_index_type xdof_id, bool xis_table_dof) const
The offset for the table dof (xis_table_dof true) or row dof referred to by xdof_id in the schema def...
An abstract client handle for a member of a poset.
size_type ct(const std::string &xname) const
The number of members for the id space with name xname.
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 array representation of abstract class poset_dof_map.
virtual bool invariant() const
Class invariant.
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
virtual void attach_to_state(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id)=0
Attach to the state in host() with component ids xbase_id and xfiber_schema_id.
int _discretization_ct
The number of members in the intersection of the discretization subposet the down set of the base spa...
virtual primitives_poset_dof_map & dof_map(bool xrequire_write_access=false)
The map from schema member ids or client ids to dof values for this poset member (mutable version) ...
void enable_invariant_check() const
Enable invariant checking.
A client handle for a poset member which has been prepared for use as a schema.
product_section_space_schema_poset * host() const
The poset which this is a handle to a component of.
virtual index_iterator indexed_member_iterator() const
An iterator for members of this poset; index version.
bool has_version(int xversion) const
True if xversion is a valid version for this.
void force(int i, bool value)
Sets the i-th member to value, extends the upper bound if necessary.
base_space_poset & base_space()
The base space for section spaces on this schema.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.
pod_index_type _base_space_id
The member id of the base space component of this.
A client handle for a poset member which has been prepared for use as a schema for a section space...
pod_index_type base_space_id() const
The member id of the base space component of this.