SheafSystem  0.0.0.0
sheaf::subposet Class Reference

A client handle for a subposet.
More...

#include <subposet.h>

Inheritance diagram for sheaf::subposet:
sheaf::poset_component sheaf::read_write_monitor_handle sheaf::any

Friends

class abstract_poset_member
 
class depth_first_iterator
 
template<typename T >
class depth_first_itr
 
class filtered_depth_first_iterator
 
class poset_state_handle
 
class postorder_iterator
 
class preorder_iterator
 
class primitives_poset_schema
 
class section_space_schema_subposet
 
class storage_agent
 
class subposet_names_record
 
class id_space_names_record
 
class subposet_member_iterator
 
SHEAF_DLL_SPEC std::ostream & operator<< (std::ostream &os, const subposet &s)
 Insert subposet& s into ostream& os. More...
 

SUBPOSET FACET

 subposet ()
 Default constructor, creates a new, unattached subposet. More...
 
 subposet (const subposet &xother, bool xdeep_copy=false)
 Copy constructor; if xdeep_copy, creates a new state and copies the membership of xother, else creates a new handle attached to the same state as xother. More...
 
 subposet (poset_state_handle *xhost, const block< pod_index_type > *xmembers=0, bool xauto_access=true)
 Create a new handle attached to a new subposet state in xhost If xmembers != 0, initialize the membership to xmembers, ("explicit" prevents interpretation as implicit conversion from poset_state_handle* to subposet&) More...
 
 subposet (poset_state_handle *xhost, const block< scoped_index > &xmembers, bool xauto_access)
 Create a new handle attached to a new subposet state in xhost If xmembers != 0, initialize the membership to xmembers, ("explicit" prevents interpretation as implicit conversion from poset_state_handle* to subposet&) More...
 
 subposet (const poset_state_handle *xhost, pod_index_type xhub_id)
 Creates a new subposet and attaches it to the state with hub id xhub_id in poset xhost. More...
 
 subposet (const poset_state_handle *xhost, const scoped_index &xid)
 Creates a new subposet and attaches it to the state with id xid in poset xhost. More...
 
 subposet (const poset_state_handle *xhost, const std::string &xname)
 Creates a new subposet handle attached to the subposet state with name xname in xhost. More...
 
 ~subposet ()
 Deletes this subposet and the state it is attached to, if any. More...
 
virtual subposetoperator= (const subposet &xother)
 Assignment operator; attaches this to the same state as xother. More...
 
virtual void new_state (bool xinitialize=true, bool xauto_access=true)
 Creates a new subposet state in host() and attaches this object to it. If xinitialize, initialize the membership to xmembers, If !xinitialize, leave the membership uninitialized. More...
 
virtual void new_state (const block< pod_index_type > &xmembers, bool xauto_access=true)
 Creates a new subposet state in host() and attaches this object to it. Initialize the members to xmembers. More...
 
virtual void new_state (const block< scoped_index > &xmembers, bool xauto_access=true)
 Creates a new subposet state in host() and attaches this object to it. Initialize the members to xmembers. More...
 
virtual void new_state (poset_state_handle *xhost, bool xinitialize=true, bool xauto_access=true)
 Creates a new subposet state in host xhost and attaches this object to it. If xinitialize, initialize the membership to xmembers, If !xinitialize, leave the membership uninitialized. More...
 
virtual void new_state (poset_state_handle *xhost, const block< pod_index_type > &xmembers, bool xauto_access=true)
 Creates a new subposet state in host xhost and attaches this object to it. Initialize the members to xmembers. More...
 
virtual void new_state (poset_state_handle *xhost, const block< scoped_index > &xmembers, bool xauto_access=true)
 Creates a new subposet state in host xhost and attaches this object to it. Initialize the members to xmembers. More...
 

ID SPACE FACET

const scattered_insertion_index_space_handleid_space () const
 The id space for the members of with this (const version). More...
 
scattered_insertion_index_space_handleid_space ()
 The id space for the members of with this (mutable version). More...
 
virtual scattered_insertion_index_space_handlenew_id_space (const std::string &xstate_class_name)
 Creates an id space for the members of this. More...
 
virtual bool has_id_space () const
 True if this already has an id space. More...
 
bool is_persistent () const
 True if this id space should be written to disk. More...
 
void put_is_persistent (bool xvalue)
 Sets is_persistent() to xvalue. More...
 
virtual std::string id_space_name () const
 The name of the id space associated with this. More...
 
void attach_id_space ()
 Attach the id space to the id_space_name(). More...
 

DOF SUBPOSET FACET

virtual bool is_dof_subposet () const
 True if this is a dofs subposet. More...
 
virtual void put_is_dof_subposet (bool xis_dof_subposet)
 True if this is a dofs subposet. More...
 
virtual int dof_ct () const
 Get the number of dofs defined this, considered as a dof_subposet; Note: dof_ct() == member_ct(), but is more efficient to evaluate. More...
 
virtual void put_dof_ct (int xct)
 Set the number of dofs defined this, considered as a dof_subposet, to xct; Note: dof_ct() == member_ct(), but is more efficient to evaluate. More...
 
virtual dof_descriptor_arraydof_descriptors () const
 The offset from beginning of the dof tuple of each dof. More...
 
virtual void put_dof_descriptors (const dof_descriptor_array *xoffsets)
 Set the offset from beginning of the dof tuple of each dof to xoffsets. More...
 

MEMBERSHIP FACET

int member_ct () const
 The number of members of this subposet. More...
 
subposet_member_iteratormember_iterator () const
 An iterator for members of this poset; handle version. More...
 
virtual index_iterator indexed_member_iterator () const
 An iterator for members of this poset; index version. More...
 
virtual bool contains_member (pod_index_type xmbr_hub_id) const
 True if this poset contains poset member with hub id xmbr_hub_id. More...
 
bool contains_member (const scoped_index &xmbr_id) const
 True if this poset contains poset member with id xmbr_id. More...
 
bool contains_member (const std::string &xname) const
 True if this poset contains poset member with name xname. More...
 
bool contains_members (const block< pod_index_type > &xmbr_hub_ids) const
 True if this poset contains poset members with hub ids in xmbr_hub_ids. More...
 
bool contains_members (const block< scoped_index > &xmbr_ids) const
 True if this poset contains poset members with ids in xmbr_ids. More...
 
bool contains_member (const abstract_poset_member *xmbr) const
 True if this poset contains xmbr. More...
 
virtual void insert_member (pod_index_type xmbr_hub_id)
 Inserts the member of host() with hub id xmbr_hub_id. More...
 
void insert_member (const scoped_index &xmbr_id)
 Inserts the member of host() with id xmbr_id. More...
 
virtual void insert_members (const block< pod_index_type > &xmbr_hub_ids)
 Inserts the members of host() with hub ids in xmbr_hub_ids. More...
 
virtual void insert_members (const block< scoped_index > &xmbr_ids)
 Inserts the members of host() with ids in xmbr_ids. More...
 
virtual void insert_member (const abstract_poset_member *xmbr)
 Inserts member xmbr of host() into this subposet. More...
 
virtual void remove_member (pod_index_type xmbr_hub_id)
 Removes the member of host() with hub id xmbr_hub_id. More...
 
void remove_member (const scoped_index &xmbr_id)
 Removes the member of host() with id xmbr_id. More...
 
virtual void remove_member (const abstract_poset_member *xmbr)
 Removes member xmbr of host() from this subposet. More...
 
zn_to_boolmembers () const
 The characteristic function for the members of this. More...
 
zn_to_bool::word_tmembership () const
 The membership bit vector. More...
 

SET ALGEBRA FACET

bool is_empty () const
 True if this poset is empty. More...
 
void make_empty ()
 Make this subposet the empty subposet. More...
 
bool is_equal_to (const subposet *other) const
 True if this subposet has the same members as other. More...
 
void make_equal_to (const subposet *other)
 Make this subposet have the same members as other. More...
 
bool includes (const subposet *other) const
 True if all the members of other are also members of this. More...
 
subposetp_union (const subposet *other)
 Union of this with other, auto-allocated. More...
 
void p_union_pa (const subposet *other, subposet *result)
 Union of this with other, pre-allocated. More...
 
void p_union_sa (const subposet *other)
 Union of this with other, self-allocated. More...
 
subposetp_intersection (const subposet *other)
 Intersection of this with other, auto-allocated. More...
 
void p_intersection_pa (const subposet *other, subposet *result)
 Intersection of this with other, pre-allocated. More...
 
void p_intersection_sa (const subposet *other)
 Intersection of this with other, self-allocated. More...
 
subposetp_minus (const subposet *other)
 Difference of this and other (this minus other), auto-allocated. More...
 
void p_minus_pa (const subposet *other, subposet *result)
 Difference of this and other (this minus other), pre-allocated. More...
 
void p_minus_sa (const subposet *other)
 Difference of this and other (this minus other), self-allocated. More...
 
subposetp_not ()
 Poset complement of this, auto-allocated. More...
 
void p_not_pa (subposet *result)
 Poset complement of this, pre-allocated. More...
 
void p_not_sa ()
 Poset complement of this, self-allocated. More...
 

POSET ALGEBRA FACET

subposetextremals (bool xmaximals)
 The subposet containing the extremal members of this, auto-allocated. More...
 
void extremals_pa (bool xmaximals, subposet *result)
 The subposet containing the extremal members of this, pre-allocated. More...
 
subposetmaximals ()
 The subposet containing the maximal members of this, auto-allocated. More...
 
void maximals_pa (subposet *result)
 The subposet containing the maximal members of this, pre-allocated. More...
 
subposetminimals ()
 The subposet containing the minimal members of this, auto-allocated. More...
 
void minimals_pa (subposet *result)
 The subposet containing the minimal members of this, pre-allocated. More...
 
subposetdown () const
 The down set of this subposet, auto-allocated. More...
 
void down_pa (subposet *result) const
 The down set of this subposet, pre-allocated. More...
 
subposetup () const
 The up set of this subposet, auto-allocated. More...
 
void up_pa (subposet *result) const
 The up set of this subposet, pre-allocatd. More...
 
subposetjims ()
 The set of jims contained in the down set of this subposet, auto-allocated. More...
 
void jims_pa (subposet *result)
 The set of jims contained in the down set of this subposet, pre-allocated. More...
 
subposetmaximal_jims ()
 The maximal members of the set of jims contained in the down set of this subposet, auto-allocated. More...
 
void maximal_jims_pa (subposet *result)
 The maximal members of the set of jims contained in the down set of this subposet, pre-allocated. More...
 
subposetminimal_jims ()
 The minimal members of the set of jims contained in the down set of this subposet, auto-allocated. More...
 
void minimal_jims_pa (subposet *result)
 The minimal members of the set of jims contained in the down set of this subposet, pre-allocated. More...
 
poset_memberp_join ()
 Poset join of the members of this this, auto-allocated
The poset join is the least upper bound in the poset. More...
 
void p_join_pa (abstract_poset_member *result)
 Poset join of the members of this this, pre-allocated
The poset join is the least upper bound in the poset. More...
 
poset_memberp_meet ()
 Poset meet of the members of this, auto-allocated
The poset meet is the greatest lower bound in the poset. More...
 
void p_meet_pa (abstract_poset_member *result)
 Poset meet of the members of this, pre-allocated
The poset meet is the greatest lower bound in the poset. More...
 

LATTICE ALGEBRA FACET

poset_memberl_join (bool xnew_jem=true)
 Lattice join of the members of this, auto-allocated
The lattice join is the least upper bound in the lattice generated by the jims in the poset. More...
 
void l_join_pa (abstract_poset_member *result, bool xnew_jem=true)
 Lattice join of the members of this, pre-allocated
The lattice join is the least upper bound in the lattice generated by the jims in the poset. More...
 
poset_memberl_join_jims (bool xnew_jem=true)
 Lattice join of the members of this, auto-allocated
Requires this is a down set of jims. (Optimized for this case.) More...
 
void l_join_jims_pa (abstract_poset_member *result, bool xnew_jem=true)
 Lattice join of the members of this, pre-allocated
Requires this is a down set of jims. (Optimized for this case.) More...
 
poset_memberl_meet (bool xnew_jem=true)
 Lattice meet of the members of this, auto-allocated
The lattice meet is the greatest lower bound in the lattice generated by the jims in the poset. More...
 
void l_meet_pa (abstract_poset_member *result, bool xnew_jem=true)
 Lattice meet of the members of this, pre-allocated
The lattice meet is the greatest lower bound in the lattice generated by the jims in the poset. More...
 

COMPONENT INDEX FACET

virtual bool is_valid_index (const poset_state_handle *xhost, pod_index_type xhub_id, int xversion=CURRENT_HOST_VERSION) const
 True if there exists a component of the same type as this with hub id xhub_id in version xversion of xhost. More...
 
bool is_valid_index (const poset_state_handle *xhost, const scoped_index &xid, int xversion=CURRENT_HOST_VERSION) const
 True if there exists a component of the same type as this with id xid in version xversion of xhost. More...
 
virtual const hub_index_space_handlehub_id_space () const
 The hub id space; const version. More...
 
virtual const scoped_indexhub_id () const
 A id in the hub id space for components of this type; intended for copying to initialize ids to the hub id space. More...
 
virtual scoped_index hub_id (pod_index_type xid) const
 An id in the member hub id space with pod xid. More...
 
virtual pod_index_type get_index_from_name (const poset_state_handle *xhost, const std::string &xname) const
 Gets the index of the component in xhost with name xname. More...
 
virtual void get_index_from_name (const poset_state_handle *xhost, const std::string &xname, scoped_index &result) const
 Gets the index of the component in xhost with name xname. More...
 

COMPONENT NAME FACET

std::string name () const
 
virtual std::string name (bool xauto_access) const
 A name for this. More...
 
virtual void all_names (block< std::string > &xresult, bool xauto_access=false) const
 All the names for this. More...
 
virtual size_type name_ct (bool xauto_access) const
 The number of names for this. More...
 
virtual bool has_name (const std::string &xname, bool xauto_access=false) const
 True if xname is a name for this. More...
 
virtual void put_name (const std::string &xname, bool xunique, bool xauto_access)
 Make xname a name for this; if xunique, make xname the only name. More...
 
virtual void delete_name (const std::string &xname, bool xauto_access=false)
 Delete all names for this. More...
 
virtual void delete_all_names (bool xauto_access=false)
 Delete all the names for this. More...
 

STATE FACET

virtual void delete_state (bool xauto_access=false)
 Detach this from its state and delete the state. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *other) const
 True if other conforms to this. More...
 
virtual subposetclone () const
 Virtual constructor; makes a new instance of the same type as this. More...
 
virtual bool invariant () const
 Class invariant. More...
 

DEBUGGING FACET

void to_stream (std::ostream &os=std::cout)
 Prints out useful information for debugging. More...
 
std::string to_string ()
 Get useful information for debugging as a string. More...
 

Additional Inherited Members

- Public Member Functions inherited from sheaf::poset_component
virtual ~poset_component ()
 Destructor. More...
 
const scoped_indexindex () const
 The index of the component state this handle is attached to. More...
 
bool is_valid_index (const poset_state_handle *xhost, const scoped_index &xid, int xversion=CURRENT_HOST_VERSION) const
 True if there exists a component of the same type as this with id xid in version xversion of xhost. More...
 
int version (bool xunalias=true) const
 The (possibly aliased) version of this component. The version of the host used when evaluating properties of this component. If unalias == true, return actual version alias refers to. More...
 
virtual void put_version (int xversion, bool xunalias=false)
 Sets version to (possibly aliased) xversion. If unalias == true, set version to the actual version alias refers to. More...
 
int unaliased_version (int xversion) const
 The actual version associated with (possibly aliased) version xversion in this. More...
 
pod_index_type version_index () const
 The subposet index for the filter associated with version(). More...
 
void version_index (scoped_index &result) const
 The subposet index for the filter associated with version(). More...
 
std::string version_name () const
 The subposet name for the filter associated with version(). More...
 
bool has_version (int xversion) const
 True if xversion is a valid version for this. More...
 
std::string name () const
 OBSOLETE: use name(bool xauto_access). A name for this. More...
 
bool is_valid_name (const poset_state_handle *xhost, const std::string &xname) const
 True if there exists a component as the same type as this in xhost with name xname. More...
 
poset_path path (bool xauto_access=true) const
 A path to this component. More...
 
bool has_path (const poset_path &xpath, bool xauto_access) const
 True if and only if xpath refers to this component. More...
 
poset_state_handlehost () const
 The poset which this is a handle to a component of. More...
 
virtual bool host_is_ancestor_of (const poset_state_handle *xther) const
 True if xother conforms to host. More...
 
bool has_same_host (const poset_component *xother) const
 True if xother is attached to the same host as this or if both are unattached. More...
 
bool in_same_space (const poset_component *xother) const
 Synonym for has_same_host(xother) More...
 
virtual namespace_posetname_space () const
 The namespace of host() More...
 
virtual bool namespace_is_ancestor_of (const namespace_poset *xother) const
 True if xother conforms to name_space(). More...
 
bool same_namespace (const poset_component *xother) const
 True if the host of xother resides in the same namespace as this or if both are unattached. More...
 
bool same_namespace (const poset_state_handle *xother) const
 True if xother resides in the same namespace as the host of this or if both are unattached. More...
 
void attach_to_state (const poset_state_handle *xhost, pod_index_type xhub_id)
 Attach this handle to the state with hub id xhub_id in the current version of host xhost. More...
 
void attach_to_state (const poset_state_handle *xhost, const scoped_index &xid)
 Attach this handle to the state with id xid in the current version of host xhost. More...
 
void attach_to_state (const poset_state_handle *xhost, const std::string &xname)
 Attach to the member state with name xname in the current version of host xhost. More...
 
void attach_to_state (const namespace_poset *xhost, const std::string &xname)
 
void attach_to_state (const std::string &)
 Attach to the state with name xname in version version() of host host(). More...
 
void attach_to_state (pod_index_type xhub_id)
 Attach to the state with hub id xhub_id in version version() of host host(). More...
 
void attach_to_state (const scoped_index &xid)
 Attach to the state with id xid in version version() of host host(). More...
 
void attach_to_state (const poset_component *xother)
 Attach to the same state as xother. More...
 
void attach_to_state (const poset_component *xother, bool xauto_access)
 Attach to the same state as xother, auto-accessible version. More...
 
virtual void detach_from_state ()
 Detach this handle from its state, if any. More...
 
virtual bool is_attached () const
 True if this handle is attached to a non-void state. More...
 
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. More...
 
bool is_same_state (const poset_state_handle *xhost, const scoped_index &xid) const
 True is this is attached to state with id xid in host xhost. More...
 
bool is_same_state (const poset_component *xother) const
 True if xother is attached to the same host and same state as this or if both are unattached. More...
 
virtual void get_read_access () const
 Get read access to the state associated with this. More...
 
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, read only access will be released then read_write_access will be requested, finally the same level of read_access as before will be requested. More...
 
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. More...
 
- Public Member Functions inherited from sheaf::read_write_monitor_handle
virtual ~read_write_monitor_handle ()
 Descturctor. More...
 
bool state_is_read_only_accessible () const
 True if this is attached and the state is accessible for read access but not for write. More...
 
bool state_is_not_read_only_accessible () const
 True if this is attached and the state is not accessible for read only access. More...
 
bool state_is_read_accessible () const
 True if this is attached and if the state is accessible for read or access control is disabled. More...
 
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. More...
 
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 or if this is attached and xuto_access is true. More...
 
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 disabled. More...
 
bool state_is_not_read_write_accessible () const
 True if state is attached and if not accessible for read and write or access control is disabled. More...
 
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 read and write or if this is attached and xuto_access is true. or if this is attached and access control is disabled. More...
 
int access_request_depth () const
 The number of times access has been requested and granted without being released. More...
 
bool state_is_mode_locked () const
 Obsolete. More...
 
int mode_lock_ct () const
 Obsolete. More...
 
void get_mode_lock () const
 Obsolete. More...
 
void release_mode_lock ()
 Obsolete. More...
 
bool state_is_modified () const
 True if write access has been granted and released since the last call to clear_state_is_modified(). More...
 
void clear_state_is_modified ()
 Sets the state_is_modified floag to false. More...
 
- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 
- Static Public Member Functions inherited from sheaf::read_write_monitor_handle
static bool access_control_disabled ()
 True if access control mechanism is disabled. Default value is enabled (false) and access is controlled by the per-thread access control functions. Disabled (true) is equivalent to having read-write access at all times, irrespective of any access control requests. Synonym for read_write_monitor::access_control_disabled(). More...
 
static void enable_access_control ()
 Enables access control. Synonym for read_write_monitor::enable_access_control(). Should only be invoked once at beginning of a program, before any other SheafSystem calls. Once enabled, access control can not be disabled. More...
 
- Protected Member Functions inherited from sheaf::poset_component
 poset_component ()
 Default constructor. More...
 
poset_statestate_obj () const
 The state this component handle is attached to. More...
 
poset_powerset_statepowerset () const
 The set of subposets of host(). More...
 
poset_crg_statecrg () const
 The cover relation graph of host(). More...
 
virtual subposet_statepowerset_member (const scoped_index &xindex) const
 The hidden state of the subposet asocciated with index xindex. More...
 
poset_dof_maprow_dof_tuple (const scoped_index &xindex) const
 The row dof tuple associated with xindex. More...
 
virtual void init_handle_data_members ()
 Initializes handle data members when attaching to a different member in a different host; intended to be redefined in derived classes. More...
 
virtual void attach_handle_data_members ()
 Initializes handle data members when attaching to a different member of the same host; intended to be redefined in derived classes. More...
 
- Protected Member Functions inherited from sheaf::read_write_monitor_handle
bool access_guards_disabled () const
 True if thread of control is still in constructor. More...
 
void disable_access_guards ()
 Disables access guards; intended for use only within constructors of monitored objects, where no other client can possibly have access (yet). More...
 
void enable_access_guards ()
 Re-enables access guards. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 
- Protected Attributes inherited from sheaf::poset_component
poset_state_handle_host
 The host poset for this component. More...
 
scoped_index _index
 The index for this component within the host. More...
 
int _version
 The version of this component. The version of the host used when evaluating properties of this component. More...
 

Detailed Description

A client handle for a subposet.

A subposet is a handle for a specific subposet state within the poset_state of a specific poset object. The subposet state is identified by a unique subposet index within a host poset object. The subposet can be created either attached to a specific subposet state, or it can be created unattached. In the latter case it is treated as if attached to a unique "void" subposet state. When a subposet object is deleted, the subposet state it is attached to, if any, is also deleted. If the client wishes to delete the subposet object, but leave the subposet state in the poset_state for later use, the subposet object must be detached before it is deleted.

Definition at line 86 of file subposet.h.

Constructor & Destructor Documentation

◆ subposet() [1/7]

sheaf::subposet::subposet ( )

Default constructor, creates a new, unattached subposet.

Postcondition
  • !is_attached()

Definition at line 56 of file subposet.cc.

Referenced by subposet(), and ~subposet().

◆ subposet() [2/7]

sheaf::subposet::subposet ( const subposet xother,
bool  xdeep_copy = false 
)

Copy constructor; if xdeep_copy, creates a new state and copies the membership of xother, else creates a new handle attached to the same state as xother.

Precondition
  • xdeep_copy ? xother.state_is_read_write_accessible() : true
Postcondition
  • has_same_host(&xother)
  • xdeep_copy ? is_equal_to(&xother) : is_same_state(&xother)
  • xdeep_copy ? name().empty() : true

Definition at line 78 of file subposet.cc.

References sheaf::zn_to_bool::equal_pa(), members(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), and ~subposet().

◆ subposet() [3/7]

sheaf::subposet::subposet ( poset_state_handle xhost,
const block< pod_index_type > *  xmembers = 0,
bool  xauto_access = true 
)
explicit

Create a new handle attached to a new subposet state in xhost If xmembers != 0, initialize the membership to xmembers, ("explicit" prevents interpretation as implicit conversion from poset_state_handle* to subposet&)

Precondition
  • xhost != 0
  • xhost->state_is_auto_read_write_accessible(xauto_access)
  • xmembers != 0 ? xhost->contains_members(*xmembers, xauto_access) : true
Postcondition
  • xmembers != 0 ? contains_members(*xmembers) : is_empty()

Definition at line 133 of file subposet.cc.

References sheaf::poset_state_handle::contains_members(), sheaf::read_write_monitor_handle::state_is_auto_read_write_accessible(), and subposet().

◆ subposet() [4/7]

sheaf::subposet::subposet ( poset_state_handle xhost,
const block< scoped_index > &  xmembers,
bool  xauto_access 
)

Create a new handle attached to a new subposet state in xhost If xmembers != 0, initialize the membership to xmembers, ("explicit" prevents interpretation as implicit conversion from poset_state_handle* to subposet&)

Precondition
  • precondition_of(new_state(same args))
Postcondition
  • postcondition_of(new_state(same args))

Definition at line 178 of file subposet.cc.

References subposet().

◆ subposet() [5/7]

sheaf::subposet::subposet ( const poset_state_handle xhost,
pod_index_type  xhub_id 
)

Creates a new subposet and attaches it to the state with hub id xhub_id in poset xhost.

Precondition
  • xhost->includes_subposet(xhub_id)
Postcondition

Definition at line 204 of file subposet.cc.

References sheaf::poset_state_handle::includes_subposet(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and subposet().

◆ subposet() [6/7]

sheaf::subposet::subposet ( const poset_state_handle xhost,
const scoped_index xid 
)

Creates a new subposet and attaches it to the state with id xid in poset xhost.

Precondition
  • xhost->includes_subposet(xid)
Postcondition

Definition at line 225 of file subposet.cc.

References sheaf::poset_state_handle::includes_subposet(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and subposet().

◆ subposet() [7/7]

sheaf::subposet::subposet ( const poset_state_handle xhost,
const std::string &  xname 
)

Creates a new subposet handle attached to the subposet state with name xname in xhost.

Precondition
  • xhost != 0
  • !xname.empty()
  • xhost->includes_subposet(xname)
Postcondition

Definition at line 246 of file subposet.cc.

References sheaf::poset_state_handle::includes_subposet(), operator=(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

◆ ~subposet()

sheaf::subposet::~subposet ( )

Deletes this subposet and the state it is attached to, if any.

Definition at line 117 of file subposet.cc.

References subposet().

Referenced by subposet().

Member Function Documentation

◆ all_names()

void sheaf::subposet::all_names ( block< std::string > &  xresult,
bool  xauto_access = false 
) const
virtual

All the names for this.

Precondition
Postcondition
  • xresult.ct() == name_ct(xauto_access)
  • for(int i = ( 0 ); i < ( xresult.ct() ); ++ i ) !xresult[i].empty()

Implements sheaf::poset_component.

Definition at line 2719 of file subposet.cc.

References sheaf::auto_block< T, S >::ct(), and name_ct().

Referenced by name(), and sheaf::subposet_names_record::transfer_poset_to_internal_buffer().

◆ attach_id_space()

void sheaf::subposet::attach_id_space ( )
protected

Attach the id space to the id_space_name().

Precondition
  • !has_id_space()
  • host()->member_id_spaces(false).contains(id_space_name())
Postcondition

Definition at line 714 of file subposet.cc.

References is_dof_subposet().

Referenced by id_space_name(), sheaf::poset_state_handle::initialize_dof_id_space(), and sheaf::id_space_names_record::transfer_internal_buffer_to_poset().

◆ clone()

sheaf::subposet * sheaf::subposet::clone ( ) const
virtual

Virtual constructor; makes a new instance of the same type as this.

Postcondition
  • result != 0

Implements sheaf::poset_component.

Definition at line 2942 of file subposet.cc.

References invariant().

Referenced by is_ancestor_of(), and fields::body_pusher::push().

◆ contains_member() [1/4]

bool sheaf::subposet::contains_member ( pod_index_type  xmbr_hub_id) const
virtual

True if this poset contains poset member with hub id xmbr_hub_id.

Precondition

Definition at line 955 of file subposet.cc.

References sheaf::zn_to_bool::index_in_bounds().

Referenced by fiber_bundle::product_section_space_schema_crg_range::atoms(), fields::body_builder::build_pa(), contains_member(), contains_members(), sheaf::abstract_poset_member::delete_down(), fields::field_vd::embed_property(), sheaf::member_record::external_size(), sheaf::member_record::externalize(), fiber_bundle::product_section_space_schema_crg_range::implicit_cover_contains_member(), fiber_bundle::product_section_space_schema_crg_range::implicit_cover_iterator(), fiber_bundle::product_section_space_schema_crg_range::implicit_first_cover_member(), indexed_member_iterator(), sheaf::member_record_set::internalize(), fiber_bundle::sec_tp_space::is_contravariant(), fiber_bundle::tp_space::is_contravariant(), fiber_bundle::sec_tp_space::is_covariant(), fiber_bundle::tp_space::is_covariant(), fiber_bundle::vd_space::is_covector(), fiber_bundle::sec_vd_space::is_covector(), fiber_bundle::binary_section_space_schema_member::is_dof(), sheaf::schema_poset_member::is_dof(), fiber_bundle::product_section_space_schema_poset::is_jim(), fiber_bundle::discretization_iterator::is_multivalued(), fiber_bundle::vd_space::is_vector(), fiber_bundle::sec_vd_space::is_vector(), fiber_bundle::fiber_bundles_namespace::make_fiber_space_schema_poset(), fiber_bundle::discretization_iterator::next(), fiber_bundle::eval_iterator::next(), fields::property_disc_iterator_1_1::next(), fields::field_eval_iterator::next(), p_intersection_pa(), sheaf::poset_orderer::previsit_action(), fiber_bundle::unstructured_block_builder::put_name_mode(), fiber_bundle::product_section_space_schema_member::update_row_cache_with_disc_id_space(), fiber_bundle::section_space_schema_member::update_row_cache_with_disc_id_space(), fiber_bundle::product_section_space_schema_member::update_row_cache_without_disc_id_space(), and fiber_bundle::section_space_schema_member::update_row_cache_without_disc_id_space().

◆ contains_member() [2/4]

bool sheaf::subposet::contains_member ( const scoped_index xmbr_id) const

True if this poset contains poset member with id xmbr_id.

Precondition

Definition at line 980 of file subposet.cc.

References contains_member(), and sheaf::scoped_index::hub_pod().

◆ contains_member() [3/4]

bool sheaf::subposet::contains_member ( const std::string &  xname) const

True if this poset contains poset member with name xname.

Precondition
  • !xname.empty()

Definition at line 993 of file subposet.cc.

References contains_members(), and sheaf::is_valid().

◆ contains_member() [4/4]

bool sheaf::subposet::contains_member ( const abstract_poset_member xmbr) const

True if this poset contains xmbr.

Precondition
  • xmbr != 0

Definition at line 1072 of file subposet.cc.

References sheaf::poset_component::index(), and insert_member().

◆ contains_members() [1/2]

bool sheaf::subposet::contains_members ( const block< pod_index_type > &  xmbr_hub_ids) const

True if this poset contains poset members with hub ids in xmbr_hub_ids.

Precondition
Postcondition
  • -unexecutable( "for all i in xmbr_hub_ids: contains_member(i)" )

Definition at line 1016 of file subposet.cc.

References sheaf::auto_block< T, S >::ct().

Referenced by contains_member().

◆ contains_members() [2/2]

bool sheaf::subposet::contains_members ( const block< scoped_index > &  xmbr_ids) const

True if this poset contains poset members with ids in xmbr_ids.

Precondition
Postcondition
  • -unexecutable( "for all i in xmbr_ids: contains_member(i)" )

Definition at line 1044 of file subposet.cc.

References contains_member(), and sheaf::auto_block< T, S >::ct().

◆ delete_all_names()

void sheaf::subposet::delete_all_names ( bool  xauto_access = false)
virtual

Delete all the names for this.

Precondition
Postcondition
  • name_ct(xauto_access) == 0

Implements sheaf::poset_component.

Definition at line 2844 of file subposet.cc.

References delete_state().

Referenced by delete_name().

◆ delete_name()

void sheaf::subposet::delete_name ( const std::string &  xname,
bool  xauto_access = false 
)
virtual

Delete all names for this.

Precondition
  • !xname.empty()
Postcondition
  • !has_name(xname, xauto_access)

Implements sheaf::poset_component.

Definition at line 2805 of file subposet.cc.

References delete_all_names().

Referenced by put_name().

◆ delete_state()

void sheaf::subposet::delete_state ( bool  xauto_access = false)
virtual

Detach this from its state and delete the state.

Precondition
Postcondition
  • !is_attached()
  • -unexecutable( !old host()->includes_subposet(old index()) )

Implements sheaf::poset_component.

Definition at line 2876 of file subposet.cc.

References sheaf::poset_state_handle::delete_subposet(), and is_ancestor_of().

Referenced by fiber_bundle::base_space_member::c_minus(), fiber_bundle::base_space_member::c_not_pa(), and delete_all_names().

◆ dof_ct()

int sheaf::subposet::dof_ct ( ) const
virtual

Get the number of dofs defined this, considered as a dof_subposet; Note: dof_ct() == member_ct(), but is more efficient to evaluate.

Precondition
Postcondition
  • result >= 0

Definition at line 789 of file subposet.cc.

References put_dof_ct().

Referenced by put_is_dof_subposet().

◆ dof_descriptors()

sheaf::dof_descriptor_array * sheaf::subposet::dof_descriptors ( ) const
virtual

The offset from beginning of the dof tuple of each dof.

Precondition

Definition at line 834 of file subposet.cc.

References put_dof_descriptors().

Referenced by put_dof_ct().

◆ down()

sheaf::subposet * sheaf::subposet::down ( ) const

The down set of this subposet, auto-allocated.

Precondition
Postcondition
  • postcondition_of(down_pa)

Definition at line 1960 of file subposet.cc.

References down_pa().

Referenced by minimals_pa().

◆ down_pa()

void sheaf::subposet::down_pa ( subposet result) const

The down set of this subposet, pre-allocated.

Precondition
  • result != 0
Postcondition

Definition at line 1985 of file subposet.cc.

References sheaf::poset_component::host(), is_empty(), and up().

Referenced by down().

◆ extremals()

sheaf::subposet * sheaf::subposet::extremals ( bool  xmaximals)

The subposet containing the extremal members of this, auto-allocated.

Precondition
Postcondition
  • postcondition_of(extremals_pa)

Definition at line 1766 of file subposet.cc.

References extremals_pa().

Referenced by p_not_sa().

◆ extremals_pa()

void sheaf::subposet::extremals_pa ( bool  xmaximals,
subposet result 
)

◆ get_index_from_name() [1/2]

sheaf::pod_index_type sheaf::subposet::get_index_from_name ( const poset_state_handle xhost,
const std::string &  xname 
) const
virtual

Gets the index of the component in xhost with name xname.

Precondition
  • xhost != 0
  • host_is_ancestor_of(xhost)
  • !xname.empty()
Postcondition
  • -unexecutable( result.is_valid() implies subposet with index = result has name xname )

Implements sheaf::poset_component.

Definition at line 2636 of file subposet.cc.

References sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_state_handle::subposet_id().

Referenced by hub_id().

◆ get_index_from_name() [2/2]

void sheaf::subposet::get_index_from_name ( const poset_state_handle xhost,
const std::string &  xname,
scoped_index result 
) const
virtual

Gets the index of the component in xhost with name xname.

Precondition
  • xhost != 0
  • host_is_ancestor_of(xhost)
  • !xname.empty()
Postcondition
  • -unexecutable( result.is_valid() implies subposet with index = result has name xname )

Implements sheaf::poset_component.

Definition at line 2660 of file subposet.cc.

References sheaf::scoped_index::is_valid(), name(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_state_handle::subposet_id().

◆ has_id_space()

◆ has_name()

bool sheaf::subposet::has_name ( const std::string &  xname,
bool  xauto_access = false 
) const
virtual

◆ hub_id() [1/2]

const sheaf::scoped_index & sheaf::subposet::hub_id ( ) const
virtual

A id in the hub id space for components of this type; intended for copying to initialize ids to the hub id space.

Precondition
Postcondition
  • result.is_hub_scope()

Implements sheaf::poset_component.

Definition at line 2593 of file subposet.cc.

References sheaf::scoped_index::is_hub_scope().

Referenced by hub_id_space().

◆ hub_id() [2/2]

sheaf::scoped_index sheaf::subposet::hub_id ( pod_index_type  xid) const
virtual

An id in the member hub id space with pod xid.

Precondition
Postcondition
  • result.is_hub_scope()
  • result.pod() == xid

Implements sheaf::poset_component.

Definition at line 2614 of file subposet.cc.

References get_index_from_name(), sheaf::scoped_index::is_hub_scope(), and sheaf::scoped_index::pod().

◆ hub_id_space()

const sheaf::hub_index_space_handle & sheaf::subposet::hub_id_space ( ) const
virtual

The hub id space; const version.

Precondition

Implements sheaf::poset_component.

Definition at line 2574 of file subposet.cc.

References hub_id().

Referenced by is_valid_index().

◆ id_space() [1/2]

const sheaf::scattered_insertion_index_space_handle & sheaf::subposet::id_space ( ) const

The id space for the members of with this (const version).

Precondition
Postcondition
  • result.is_attached()

Definition at line 508 of file subposet.cc.

References sheaf::explicit_index_space_handle::is_attached().

Referenced by fiber_bundle::section_space_schema_table_dof_crg_range::atoms(), fiber_bundle::unstructured_block_builder::build_block_decomposition(), tool::vtk_poly_data_builder::build_pa(), fiber_bundle::section_space_schema_table_dof_crg_range::contains_member(), fiber_bundle::section_space_schema_table_dof_crg_range::dof_tuple_id(), fields::field_refinement_buffer::field_refinement_buffer(), sheaf::poset_state_handle::get_decomposition(), fiber_bundle::section_space_schema_table_dof_crg_range::get_size(), fiber_bundle::structured_block::init_handle_data_members(), sheaf::poset_state_handle::initialize_dof_id_space(), fiber_bundle::product_section_space_schema_poset::initialize_row_dof_subposet(), fiber_bundle::eval_iterator::initialize_schema_anchor(), fiber_bundle::base_space_poset::insert_interval_in_standard_subposets(), fields::zone_centered_tet_refiner::modify_subposets(), fields::zone_centered_triangle_refiner::modify_subposets(), fields::body_factory::new_3d_uniform_bodies(), sheaf::schema_poset_member::new_jim_state(), new_state(), fiber_bundle::section_space_schema_table_dof_crg_range::ordinal(), fields::discretization_pusher::push(), fiber_bundle::unstructured_block_builder::put_name_mode(), tool::visualization_iterator_1_1::set_vtk_data(), tool::visualization_iterator_4_2::set_vtk_data(), tool::visualization_iterator_4_3::set_vtk_data(), tool::visualization_iterator_1_3::set_vtk_data(), fiber_bundle::section_space_schema_table_dof_crg_range::tuple(), sheaf::schema_poset_member::update_dof_id_space(), fiber_bundle::product_section_space_schema_member::update_row_cache_with_disc_id_space(), and fiber_bundle::section_space_schema_member::update_row_cache_with_disc_id_space().

◆ id_space() [2/2]

sheaf::scattered_insertion_index_space_handle & sheaf::subposet::id_space ( )

The id space for the members of with this (mutable version).

Precondition
Postcondition
  • result.is_attached()

Definition at line 531 of file subposet.cc.

References sheaf::explicit_index_space_handle::is_attached(), and new_id_space().

◆ id_space_name()

std::string sheaf::subposet::id_space_name ( ) const
protectedvirtual

The name of the id space associated with this.

Precondition
  • !name().empty()
Postcondition
  • !result.empty()

Definition at line 690 of file subposet.cc.

References attach_id_space().

Referenced by sheaf::poset_state_handle::initialize_dof_id_space(), and put_is_persistent().

◆ includes()

bool sheaf::subposet::includes ( const subposet other) const

True if all the members of other are also members of this.

Precondition
  • other != 0

Definition at line 1427 of file subposet.cc.

References members(), and p_union().

Referenced by make_equal_to().

◆ indexed_member_iterator()

sheaf::index_iterator sheaf::subposet::indexed_member_iterator ( ) const
virtual

◆ insert_member() [1/3]

void sheaf::subposet::insert_member ( pod_index_type  xmbr_hub_id)
virtual

Inserts the member of host() with hub id xmbr_hub_id.

Precondition
Postcondition
  • contains_member(xmbr_hub_id)

Definition at line 1091 of file subposet.cc.

Referenced by sheaf::abstract_poset_member::atoms_pa(), fiber_bundle::unstructured_block_builder::build_block_decomposition(), fields::body_builder::build_pa(), fiber_bundle::base_space_member::c_minus(), contains_member(), sheaf::abstract_poset_member::delete_down(), fields::field_vd::embed_property(), extremals_pa(), sheaf::implicit_crg_interval::finalize(), fiber_bundle::product_section_space_schema_poset::initialize_row_dof_subposet(), sheaf::namespace_poset_schema::initialize_standard_members(), fiber_bundle::base_space_poset::insert_interval_in_standard_subposets(), insert_members(), sheaf::member_record::internalize(), fiber_bundle::fiber_bundles_namespace::make_fiber_space_schema_poset(), sheaf::member_record_set::make_internal_dataspace(), sheaf::schema_poset_member::make_schema(), sheaf::abstract_poset_member::maximal_jims_pa(), fields::zone_centered_tet_refiner::modify_subposets(), fields::zone_centered_segment_refiner::modify_subposets(), fields::zone_centered_triangle_refiner::modify_subposets(), fields::edge_centered_polygon_refiner::modify_subposets(), fields::body_factory::new_3d_uniform_bodies(), sheaf::schema_poset_member::new_jim_state(), fiber_bundle::section_space_schema_poset::new_standard_member_hack(), fields::body_pusher::push_pa(), fiber_bundle::sec_tp_space::put_is_covariant(), fiber_bundle::tp_space::put_is_covariant(), fiber_bundle::vd_space::put_is_covector(), fiber_bundle::sec_vd_space::put_is_covector(), and fiber_bundle::unstructured_block_builder::put_name_mode().

◆ insert_member() [2/3]

void sheaf::subposet::insert_member ( const scoped_index xmbr_id)

Inserts the member of host() with id xmbr_id.

Precondition
Postcondition
  • contains_member(xmbr_id)

Definition at line 1114 of file subposet.cc.

References sheaf::scoped_index::hub_pod(), and insert_members().

◆ insert_member() [3/3]

void sheaf::subposet::insert_member ( const abstract_poset_member xmbr)
virtual

Inserts member xmbr of host() into this subposet.

Precondition
Postcondition
  • contains_member(xmbr)

Definition at line 1187 of file subposet.cc.

References sheaf::scoped_index::hub_pod(), sheaf::poset_component::index(), and remove_member().

◆ insert_members() [1/2]

void sheaf::subposet::insert_members ( const block< pod_index_type > &  xmbr_hub_ids)
virtual

Inserts the members of host() with hub ids in xmbr_hub_ids.

Precondition
Postcondition
  • contains_members(xmbr_hub_ids)

Definition at line 1137 of file subposet.cc.

References sheaf::auto_block< T, S >::ct().

Referenced by insert_member().

◆ insert_members() [2/2]

void sheaf::subposet::insert_members ( const block< scoped_index > &  xmbr_ids)
virtual

Inserts the members of host() with ids in xmbr_ids.

Precondition
Postcondition
  • contains_members(xmbr_ids)

Definition at line 1162 of file subposet.cc.

References sheaf::auto_block< T, S >::ct(), and insert_member().

◆ invariant()

◆ is_ancestor_of()

bool sheaf::subposet::is_ancestor_of ( const any other) const
virtual

True if other conforms to this.

Reimplemented from sheaf::poset_component.

Definition at line 2923 of file subposet.cc.

References clone().

Referenced by delete_state().

◆ is_dof_subposet()

bool sheaf::subposet::is_dof_subposet ( ) const
virtual

True if this is a dofs subposet.

Precondition

Definition at line 747 of file subposet.cc.

References put_is_dof_subposet().

Referenced by attach_id_space().

◆ is_empty()

bool sheaf::subposet::is_empty ( ) const

◆ is_equal_to()

bool sheaf::subposet::is_equal_to ( const subposet other) const

True if this subposet has the same members as other.

Precondition
  • other != 0
Postcondition
  • -unexecutable( other has same mebrs as this )

Definition at line 1381 of file subposet.cc.

References sheaf::poset_component::host(), make_equal_to(), and members().

Referenced by make_empty().

◆ is_persistent()

bool sheaf::subposet::is_persistent ( ) const

True if this id space should be written to disk.

Precondition

Definition at line 645 of file subposet.cc.

References put_is_persistent().

Referenced by sheaf::poset_scaffold::convert_record_id_to_subposet_id(), has_id_space(), and fiber_bundle::unstructured_block::host_created_with_new_host().

◆ is_valid_index() [1/2]

bool sheaf::subposet::is_valid_index ( const poset_state_handle xhost,
pod_index_type  xhub_id,
int  xversion = CURRENT_HOST_VERSION 
) const
virtual

True if there exists a component of the same type as this with hub id xhub_id in version xversion of xhost.

Hack:
swig doesn't like using poset_component::is_valid_index
Precondition
  • xhost != 0
  • host_is_ancestor_of(xhost)

Implements sheaf::poset_component.

Definition at line 2532 of file subposet.cc.

References sheaf::poset_state_handle::includes_subposet(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

Referenced by l_meet_pa().

◆ is_valid_index() [2/2]

bool sheaf::subposet::is_valid_index ( const poset_state_handle xhost,
const scoped_index xid,
int  xversion = CURRENT_HOST_VERSION 
) const

True if there exists a component of the same type as this with id xid in version xversion of xhost.

Precondition
  • xhost != 0
  • host_is_ancestor_of(xhost)

Definition at line 2557 of file subposet.cc.

References hub_id_space(), sheaf::scoped_index::hub_pod(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

◆ jims()

sheaf::subposet * sheaf::subposet::jims ( )

The set of jims contained in the down set of this subposet, auto-allocated.

Precondition
Postcondition
  • -unexecutable( result contains jims in down set of this )

Definition at line 2060 of file subposet.cc.

References jims_pa().

Referenced by up_pa().

◆ jims_pa()

void sheaf::subposet::jims_pa ( subposet result)

The set of jims contained in the down set of this subposet, pre-allocated.

Precondition
  • result != 0
Postcondition
  • -unexecutable( result contains jims in down set of this )

Definition at line 2086 of file subposet.cc.

References sheaf::poset_component::host(), is_empty(), and maximal_jims().

Referenced by jims().

◆ l_join()

sheaf::poset_member * sheaf::subposet::l_join ( bool  xnew_jem = true)

Lattice join of the members of this, auto-allocated
The lattice join is the least upper bound in the lattice generated by the jims in the poset.

Precondition
Hack:
the join of the empty subset is well defined (== bottom) but this implmentation doesn't support it.
Precondition
  • !is_empty()
Postcondition
  • postcondition_of(l_join_pa)

Definition at line 2323 of file subposet.cc.

References l_join_pa().

Referenced by p_meet_pa().

◆ l_join_jims()

sheaf::poset_member * sheaf::subposet::l_join_jims ( bool  xnew_jem = true)

Lattice join of the members of this, auto-allocated
Requires this is a down set of jims. (Optimized for this case.)

Precondition
  • -unexecutable( this is a down set containing only jims )
Postcondition
  • postcondition_of(l_join_jims_pa)

Definition at line 2392 of file subposet.cc.

References l_join_jims_pa().

Referenced by l_join_pa().

◆ l_join_jims_pa()

void sheaf::subposet::l_join_jims_pa ( abstract_poset_member result,
bool  xnew_jem = true 
)

Lattice join of the members of this, pre-allocated
Requires this is a down set of jims. (Optimized for this case.)

Precondition
  • -unexecutable( this is a down set containing only jims )
  • result != 0
Postcondition
  • -unexecutable( this->includes(old this) )
  • -unexecutable( "this includes the strict down set of result" )

Definition at line 2420 of file subposet.cc.

References sheaf::poset_joiner::join(), and l_meet().

Referenced by l_join_jims(), l_meet_pa(), sheaf::abstract_poset_member::l_meet_pa(), and sheaf::abstract_poset_member::l_not_pa().

◆ l_join_pa()

void sheaf::subposet::l_join_pa ( abstract_poset_member result,
bool  xnew_jem = true 
)

Lattice join of the members of this, pre-allocated
The lattice join is the least upper bound in the lattice generated by the jims in the poset.

Precondition
  • result != 0
Postcondition

Definition at line 2351 of file subposet.cc.

References sheaf::abstract_poset_member::attach_to_state(), sheaf::poset_joiner::join(), l_join_jims(), and sheaf::abstract_poset_member::new_jem_state().

Referenced by fiber_bundle::base_space_member::c_minus(), fiber_bundle::base_space_member::c_not_pa(), and l_join().

◆ l_meet()

sheaf::poset_member * sheaf::subposet::l_meet ( bool  xnew_jem = true)

Lattice meet of the members of this, auto-allocated
The lattice meet is the greatest lower bound in the lattice generated by the jims in the poset.

Precondition
Postcondition
  • postcondition_of(l_meet_pa)

Definition at line 2453 of file subposet.cc.

References l_meet_pa().

Referenced by l_join_jims_pa().

◆ l_meet_pa()

void sheaf::subposet::l_meet_pa ( abstract_poset_member result,
bool  xnew_jem = true 
)

Lattice meet of the members of this, pre-allocated
The lattice meet is the greatest lower bound in the lattice generated by the jims in the poset.

Precondition
  • result != 0
Todo:
optimize subposet::l_meet_pa Sorted list rep would be much more efficient than bitvector rep. Need to implement version of subposet that switches between reps
Postcondition

Definition at line 2478 of file subposet.cc.

References sheaf::subposet_member_iterator::is_done(), is_valid_index(), sheaf::abstract_poset_member::jims_pa(), l_join_jims_pa(), make_empty(), sheaf::subposet_member_iterator::next(), and p_intersection_sa().

Referenced by l_meet().

◆ make_empty()

void sheaf::subposet::make_empty ( )

Make this subposet the empty subposet.

Precondition

Definition at line 1361 of file subposet.cc.

References is_equal_to().

Referenced by is_empty(), l_meet_pa(), sheaf::abstract_poset_member::p_join_pa(), and sheaf::abstract_poset_member::p_meet_pa().

◆ make_equal_to()

void sheaf::subposet::make_equal_to ( const subposet other)

Make this subposet have the same members as other.

Precondition
  • other != 0

Definition at line 1406 of file subposet.cc.

References sheaf::zn_to_bool::equal_pa(), sheaf::poset_component::host(), includes(), and members().

Referenced by is_equal_to().

◆ maximal_jims()

sheaf::subposet * sheaf::subposet::maximal_jims ( )

The maximal members of the set of jims contained in the down set of this subposet, auto-allocated.

Precondition
Postcondition
  • postcondition_of(maximal_jims_pa)

Definition at line 2113 of file subposet.cc.

References maximal_jims_pa().

Referenced by jims_pa().

◆ maximal_jims_pa()

void sheaf::subposet::maximal_jims_pa ( subposet result)

The maximal members of the set of jims contained in the down set of this subposet, pre-allocated.

Precondition
  • result != 0
Postcondition

Definition at line 2138 of file subposet.cc.

References sheaf::poset_component::host(), is_empty(), and minimal_jims().

Referenced by maximal_jims().

◆ maximals()

sheaf::subposet * sheaf::subposet::maximals ( )

The subposet containing the maximal members of this, auto-allocated.

Precondition
  • precondition_of(extremals(true))
Postcondition
  • postcondition_of(extremals(true))

Definition at line 1872 of file subposet.cc.

References maximals_pa().

Referenced by extremals_pa().

◆ maximals_pa()

void sheaf::subposet::maximals_pa ( subposet result)

The subposet containing the maximal members of this, pre-allocated.

Precondition
  • precondition_of(extremals_pa(true, result))
Postcondition
  • postcondition_of(extremals_pa(true, result))

Definition at line 1895 of file subposet.cc.

References minimals().

Referenced by maximals(), and sheaf::abstract_poset_member::p_meet_pa().

◆ member_ct()

int sheaf::subposet::member_ct ( ) const

The number of members of this subposet.

Precondition
Todo:
in subposet::member_ct(), implement O(1) algorithm This routine can be made O(1) by storing _member_Ct and updating it everythime insert or remove is called. The various set operations will invalidate the count, so they should set _member_ct negative and the current implementation used in that case
Postcondition
  • result >= 0

Definition at line 887 of file subposet.cc.

References member_iterator().

Referenced by fiber_bundle::array_field_dof_map::array_field_dof_map(), sheaf::abstract_poset_member::maximal_jim_ct(), fields::discretization_pusher::push(), and put_dof_descriptors().

◆ member_iterator()

◆ members()

sheaf::zn_to_bool * sheaf::subposet::members ( ) const
protected

The characteristic function for the members of this.

Precondition
Todo:
members() is used by most of the member functions. subposet should probably have a handle data member to avoid the cost of this lookup.
Postcondition
  • result != 0

Definition at line 1277 of file subposet.cc.

References membership().

Referenced by sheaf::poset_state_handle::get_decomposition(), includes(), sheaf::subposet_member_iterator::initialize_filter(), sheaf::depth_first_iterator::initialize_filter(), is_equal_to(), make_equal_to(), sheaf::operator<<(), p_intersection_pa(), p_minus_pa(), p_not_pa(), p_union_pa(), remove_member(), and subposet().

◆ membership()

sheaf::zn_to_bool::word_t * sheaf::subposet::membership ( ) const
protected

The membership bit vector.

Precondition
Postcondition
  • result != 0

Definition at line 1306 of file subposet.cc.

References is_empty().

Referenced by members().

◆ minimal_jims()

sheaf::subposet * sheaf::subposet::minimal_jims ( )

The minimal members of the set of jims contained in the down set of this subposet, auto-allocated.

Precondition
Postcondition
  • postcondition_of(minimal_jims_pa)

Definition at line 2163 of file subposet.cc.

References minimal_jims_pa().

Referenced by maximal_jims_pa().

◆ minimal_jims_pa()

void sheaf::subposet::minimal_jims_pa ( subposet result)

The minimal members of the set of jims contained in the down set of this subposet, pre-allocated.

Precondition
  • result != 0
Postcondition

Definition at line 2188 of file subposet.cc.

References sheaf::poset_component::host(), is_empty(), and p_join().

Referenced by minimal_jims().

◆ minimals()

sheaf::subposet * sheaf::subposet::minimals ( )

The subposet containing the minimal members of this, auto-allocated.

Precondition
  • precondition_of(extremals(false))
Postcondition
  • postcondition_of(extremals(false))

Definition at line 1916 of file subposet.cc.

References minimals_pa().

Referenced by maximals_pa().

◆ minimals_pa()

void sheaf::subposet::minimals_pa ( subposet result)

The subposet containing the minimal members of this, pre-allocated.

Precondition
  • precondition_of(extremals_pa(false, result))
Postcondition
  • postcondition_of(extremals_pa(false, result))

Definition at line 1939 of file subposet.cc.

References down().

Referenced by minimals(), and sheaf::abstract_poset_member::p_join_pa().

◆ name() [1/2]

◆ name() [2/2]

std::string sheaf::subposet::name ( bool  xauto_access) const
virtual

A name for this.

Precondition
Postcondition
  • -unexecutable( result.empty() implies this has no name )

Implements sheaf::poset_component.

Definition at line 2696 of file subposet.cc.

References all_names().

◆ name_ct()

sheaf::size_type sheaf::subposet::name_ct ( bool  xauto_access) const
virtual

The number of names for this.

Precondition

Implements sheaf::poset_component.

Definition at line 2741 of file subposet.cc.

References has_name().

Referenced by all_names().

◆ new_id_space()

sheaf::scattered_insertion_index_space_handle & sheaf::subposet::new_id_space ( const std::string &  xstate_class_name)
virtual

Creates an id space for the members of this.

Precondition
  • !name().empty()
  • !has_id_space()
  • !host()->member_id_spaces(false).contains(id_space_name())
  • !xstate_class_name.empty()
  • -unexecutable( "xstate_class_name is a descendant of scattered_insertion_index_space_state" )
Hack:
Using the name of the id space state is a temporary fix until subposets become id spaces. See COM-183.
Postcondition

Definition at line 554 of file subposet.cc.

References has_id_space().

Referenced by fields::field_vd::embed_property(), id_space(), sheaf::poset_state_handle::initialize_dof_id_space(), fields::body_factory::new_3d_uniform_bodies(), sheaf::schema_poset_member::new_jim_state(), and sheaf::primitives_poset_schema::schematize().

◆ new_state() [1/6]

void sheaf::subposet::new_state ( bool  xinitialize = true,
bool  xauto_access = true 
)
virtual

Creates a new subposet state in host() and attaches this object to it. If xinitialize, initialize the membership to xmembers, If !xinitialize, leave the membership uninitialized.

Precondition
  • precondition_of(new_state(host(), xinitialize, xauto_access))
Postcondition
  • postcondition_of(new_state(host(), xinitialize, xauto_access))

Definition at line 295 of file subposet.cc.

Referenced by fiber_bundle::product_section_space_schema_poset::initialize_row_dof_subposet(), sheaf::poset_state_handle::initialize_standard_subposets(), new_state(), and operator=().

◆ new_state() [2/6]

void sheaf::subposet::new_state ( const block< pod_index_type > &  xmembers,
bool  xauto_access = true 
)
virtual

Creates a new subposet state in host() and attaches this object to it. Initialize the members to xmembers.

Precondition
  • precondition_of(new_state(host(), xmembers, xauto_access))
Postcondition
  • postcondition_of(new_state(host(), xmembers, xauto_access))

Definition at line 316 of file subposet.cc.

References new_state().

◆ new_state() [3/6]

void sheaf::subposet::new_state ( const block< scoped_index > &  xmembers,
bool  xauto_access = true 
)
virtual

Creates a new subposet state in host() and attaches this object to it. Initialize the members to xmembers.

Precondition
  • precondition_of(new_state(host(), xmembers, xauto_access))
Postcondition
  • postcondition_of(new_state(host(), xmembers, xauto_access))

Definition at line 337 of file subposet.cc.

References new_state().

◆ new_state() [4/6]

void sheaf::subposet::new_state ( poset_state_handle xhost,
bool  xinitialize = true,
bool  xauto_access = true 
)
virtual

Creates a new subposet state in host xhost and attaches this object to it. If xinitialize, initialize the membership to xmembers, If !xinitialize, leave the membership uninitialized.

Precondition
  • xhost != 0
  • xhost->state_is_auto_read_write_accessible(xauto_access)
Postcondition

Definition at line 358 of file subposet.cc.

References sheaf::poset_state_handle::get_read_write_access(), new_state(), sheaf::poset_state_handle::new_subposet(), sheaf::poset_state_handle::release_access(), and sheaf::read_write_monitor_handle::state_is_auto_read_write_accessible().

◆ new_state() [5/6]

void sheaf::subposet::new_state ( poset_state_handle xhost,
const block< pod_index_type > &  xmembers,
bool  xauto_access = true 
)
virtual

Creates a new subposet state in host xhost and attaches this object to it. Initialize the members to xmembers.

Precondition
  • xhost != 0
  • xhost->state_is_auto_read_write_accessible(xauto_access)
  • xhost->contains_members(xmembers)
Postcondition
  • contains_members(xmembers)

Definition at line 403 of file subposet.cc.

References sheaf::poset_state_handle::contains_members(), sheaf::poset_state_handle::get_read_write_access(), new_state(), sheaf::poset_state_handle::release_access(), and sheaf::read_write_monitor_handle::state_is_auto_read_write_accessible().

◆ new_state() [6/6]

void sheaf::subposet::new_state ( poset_state_handle xhost,
const block< scoped_index > &  xmembers,
bool  xauto_access = true 
)
virtual

Creates a new subposet state in host xhost and attaches this object to it. Initialize the members to xmembers.

Precondition
  • xhost != 0
  • xhost->state_is_auto_read_write_accessible(xauto_access)
  • xhost->contains_members(xmembers)
Postcondition
  • contains_members(xmembers)

Definition at line 450 of file subposet.cc.

References sheaf::poset_state_handle::contains_members(), sheaf::poset_state_handle::get_read_write_access(), id_space(), sheaf::poset_state_handle::new_subposet(), sheaf::poset_state_handle::release_access(), and sheaf::read_write_monitor_handle::state_is_auto_read_write_accessible().

◆ operator=()

sheaf::subposet & sheaf::subposet::operator= ( const subposet xother)
virtual

Assignment operator; attaches this to the same state as xother.

Postcondition
  • is_same_state(&xother)

Definition at line 274 of file subposet.cc.

References new_state().

Referenced by subposet().

◆ p_intersection()

sheaf::subposet * sheaf::subposet::p_intersection ( const subposet other)

Intersection of this with other, auto-allocated.

Precondition
  • other != 0
Postcondition
  • result != 0
  • postcondition_of(p_intersection_pa)

Definition at line 1529 of file subposet.cc.

References sheaf::poset_component::host(), and p_intersection_pa().

Referenced by p_union_sa().

◆ p_intersection_pa()

void sheaf::subposet::p_intersection_pa ( const subposet other,
subposet result 
)

Intersection of this with other, pre-allocated.

Precondition
  • other != 0
  • result != 0
Postcondition
  • -unexecutable( forall i: result->contains_member(i) == old contains_member(i) && other->contains_member(i) )

Definition at line 1558 of file subposet.cc.

References contains_member(), sheaf::poset_component::host(), members(), and p_intersection_sa().

Referenced by p_intersection().

◆ p_intersection_sa()

void sheaf::subposet::p_intersection_sa ( const subposet other)

Intersection of this with other, self-allocated.

Precondition
  • other != 0
Postcondition
  • postcondition_of(p_intersection_pa)

Definition at line 1585 of file subposet.cc.

References sheaf::poset_component::host(), and p_minus().

Referenced by l_meet_pa(), sheaf::abstract_poset_member::l_meet_pa(), p_intersection_pa(), sheaf::abstract_poset_member::p_join_pa(), and sheaf::abstract_poset_member::p_meet_pa().

◆ p_join()

sheaf::poset_member * sheaf::subposet::p_join ( )

Poset join of the members of this this, auto-allocated
The poset join is the least upper bound in the poset.

Precondition
  • postcondition_of(p_join_pa)

Definition at line 2213 of file subposet.cc.

References p_join_pa().

Referenced by minimal_jims_pa().

◆ p_join_pa()

void sheaf::subposet::p_join_pa ( abstract_poset_member result)

Poset join of the members of this this, pre-allocated
The poset join is the least upper bound in the poset.

Precondition
  • result != 0
Todo:
implement subposet::p_join_pa

Not Implemented.

Postcondition

Definition at line 2238 of file subposet.cc.

References p_meet().

Referenced by p_join().

◆ p_meet()

sheaf::poset_member * sheaf::subposet::p_meet ( )

Poset meet of the members of this, auto-allocated
The poset meet is the greatest lower bound in the poset.

Precondition
Postcondition
  • postcondition_of(p_meet_pa)

Definition at line 2263 of file subposet.cc.

References p_meet_pa().

Referenced by p_join_pa().

◆ p_meet_pa()

void sheaf::subposet::p_meet_pa ( abstract_poset_member result)

Poset meet of the members of this, pre-allocated
The poset meet is the greatest lower bound in the poset.

Precondition
  • result != 0
Todo:
implement subposet::p_meet_pa

Not Implemented.

Postcondition

Definition at line 2288 of file subposet.cc.

References l_join().

Referenced by p_meet().

◆ p_minus()

sheaf::subposet * sheaf::subposet::p_minus ( const subposet other)

Difference of this and other (this minus other), auto-allocated.

Precondition
  • other != 0
Postcondition
  • result != 0
  • postcondition_of(p_minus_pa)

Definition at line 1608 of file subposet.cc.

References sheaf::poset_component::host(), and p_minus_pa().

Referenced by p_intersection_sa().

◆ p_minus_pa()

void sheaf::subposet::p_minus_pa ( const subposet other,
subposet result 
)

Difference of this and other (this minus other), pre-allocated.

Precondition
  • other != 0
  • result != 0
Postcondition
  • -unexecutable( "forall i: result->contains_member(i) == old contains_member(i) && !other->contains_member(i)" )

Definition at line 1637 of file subposet.cc.

References sheaf::poset_component::host(), members(), and p_minus_sa().

Referenced by p_minus().

◆ p_minus_sa()

void sheaf::subposet::p_minus_sa ( const subposet other)

Difference of this and other (this minus other), self-allocated.

Precondition
  • other != 0
Postcondition
  • postcondition_of(p_minus_pa)

Definition at line 1663 of file subposet.cc.

References sheaf::poset_component::host(), and p_not().

Referenced by p_minus_pa().

◆ p_not()

sheaf::subposet * sheaf::subposet::p_not ( )

Poset complement of this, auto-allocated.

Precondition
Postcondition

Definition at line 1687 of file subposet.cc.

References p_not_pa().

Referenced by p_minus_sa().

◆ p_not_pa()

void sheaf::subposet::p_not_pa ( subposet result)

Poset complement of this, pre-allocated.

Precondition
  • result != 0
Postcondition

Definition at line 1712 of file subposet.cc.

References members(), and p_not_sa().

Referenced by p_not().

◆ p_not_sa()

void sheaf::subposet::p_not_sa ( )

Poset complement of this, self-allocated.

Precondition
Postcondition

Definition at line 1734 of file subposet.cc.

References extremals().

Referenced by p_not_pa().

◆ p_union()

sheaf::subposet * sheaf::subposet::p_union ( const subposet other)

Union of this with other, auto-allocated.

Precondition
  • other != 0
Postcondition
  • result != 0

Definition at line 1448 of file subposet.cc.

References sheaf::poset_component::host(), and p_union_pa().

Referenced by includes().

◆ p_union_pa()

void sheaf::subposet::p_union_pa ( const subposet other,
subposet result 
)

Union of this with other, pre-allocated.

Precondition
  • other != 0
  • result != 0
Postcondition

Definition at line 1478 of file subposet.cc.

References sheaf::poset_component::host(), members(), and p_union_sa().

Referenced by p_union().

◆ p_union_sa()

void sheaf::subposet::p_union_sa ( const subposet other)

Union of this with other, self-allocated.

Precondition
  • other != 0
Postcondition
  • -unexecutable( "for all i: contains_member(i) == old contains_member(i) || other->contains_member(i)" )

Definition at line 1505 of file subposet.cc.

References sheaf::poset_component::host(), and p_intersection().

Referenced by p_union_pa().

◆ put_dof_ct()

void sheaf::subposet::put_dof_ct ( int  xct)
virtual

Set the number of dofs defined this, considered as a dof_subposet, to xct; Note: dof_ct() == member_ct(), but is more efficient to evaluate.

Precondition
  • xct >= 0
Postcondition

Definition at line 812 of file subposet.cc.

References dof_descriptors().

Referenced by dof_ct(), and sheaf::primitives_poset_schema::schematize().

◆ put_dof_descriptors()

void sheaf::subposet::put_dof_descriptors ( const dof_descriptor_array xoffsets)
virtual

Set the offset from beginning of the dof tuple of each dof to xoffsets.

Precondition
Postcondition

Definition at line 855 of file subposet.cc.

References member_ct().

Referenced by dof_descriptors(), and sheaf::primitives_poset_schema::schematize().

◆ put_is_dof_subposet()

void sheaf::subposet::put_is_dof_subposet ( bool  xis_dof_subposet)
virtual

True if this is a dofs subposet.

Precondition
Postcondition

Definition at line 768 of file subposet.cc.

References dof_ct().

Referenced by is_dof_subposet(), and sheaf::primitives_poset_schema::schematize().

◆ put_is_persistent()

void sheaf::subposet::put_is_persistent ( bool  xvalue)

Sets is_persistent() to xvalue.

Precondition
Postcondition

Definition at line 666 of file subposet.cc.

References id_space_name().

Referenced by sheaf::poset_state_handle::initialize_dof_id_space(), and is_persistent().

◆ put_name()

◆ remove_member() [1/3]

◆ remove_member() [2/3]

void sheaf::subposet::remove_member ( const scoped_index xmbr_id)

Removes the member of host() with id xmbr_id.

Precondition
Postcondition
  • !contains_member(xmbr_id)

Definition at line 1231 of file subposet.cc.

References sheaf::scoped_index::hub_pod(), and remove_member().

◆ remove_member() [3/3]

void sheaf::subposet::remove_member ( const abstract_poset_member xmbr)
virtual

Removes member xmbr of host() from this subposet.

Precondition
Postcondition
  • !contains_member(xmbr)

Definition at line 1253 of file subposet.cc.

References sheaf::scoped_index::hub_pod(), sheaf::poset_component::index(), and members().

◆ to_stream()

void sheaf::subposet::to_stream ( std::ostream &  os = std::cout)

Prints out useful information for debugging.

Definition at line 3002 of file subposet.cc.

References to_string().

Referenced by invariant().

◆ to_string()

std::string sheaf::subposet::to_string ( )

Get useful information for debugging as a string.

Definition at line 3009 of file subposet.cc.

References sheaf::operator<<().

Referenced by to_stream().

◆ up()

sheaf::subposet * sheaf::subposet::up ( ) const

The up set of this subposet, auto-allocated.

Precondition
Postcondition
  • postcondition_of(up_pa)

Definition at line 2010 of file subposet.cc.

References up_pa().

Referenced by down_pa().

◆ up_pa()

void sheaf::subposet::up_pa ( subposet result) const

The up set of this subposet, pre-allocatd.

Precondition
  • result != 0
Postcondition

Definition at line 2035 of file subposet.cc.

References sheaf::poset_component::host(), is_empty(), and jims().

Referenced by up().

Friends And Related Function Documentation

◆ operator<<

SHEAF_DLL_SPEC std::ostream& operator<< ( std::ostream &  os,
const subposet s 
)
friend

Insert subposet& s into ostream& os.


The documentation for this class was generated from the following files: