21 #include "SheafSystem/ijk_connectivity_implicit_index_space_iterator.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/ijk_connectivity_index_space_interval.h" 25 #include "SheafSystem/index_space_family.h" 45 ensure(!is_attached());
64 ensure((*
this) == xother);
77 require(conforms_to_state(xid_spaces, xindex));
81 attach_to(xid_spaces, xindex);
86 ensure(is_attached());
87 ensure(&id_spaces() == &xid_spaces);
88 ensure(index() == xindex);
97 const std::string& xname)
101 require(conforms_to_state(xid_spaces, xname));
105 attach_to(xid_spaces, xname);
110 ensure(is_attached());
111 ensure(&id_spaces() == &xid_spaces);
112 ensure(name() == xname);
133 (void) implicit_index_space_iterator::operator=(xother);
143 ensure((*
this) == xother);
176 ensure(is_basic_query);
193 ensure(is_basic_query);
197 return _k_vertex_size;
210 ensure(is_basic_query);
214 return _jk_vertex_size;
245 require(is_ancestor_of(&xother));
252 (void) this->
operator=(lother);
257 ensure((*
this) == xother);
270 require(is_ancestor_of(&xother));
275 if(result && is_attached())
280 result = result && (_hub_begin == lother.
_hub_begin);
309 ensure(is_same_type(result));
310 ensure(*result == *
this);
334 require(is_attached());
339 define_old_variable(
pod_type old_pod = pod());
340 define_old_variable(
pod_type old_hub_pod = hub_pod());
349 _hub_pod += _jk_vertex_size;
357 _hub_pod += _k_vertex_size;
365 _hub_pod -= _jk_vertex_size;
373 _hub_pod = _hub_begin + 1;
381 _hub_pod += _jk_vertex_size;
389 _hub_pod += _k_vertex_size;
397 _hub_pod -= _jk_vertex_size;
404 assertion(pod() == 7);
414 ensure(is_done() || pod() != old_pod);
415 ensure(is_done() || hub_pod() != old_hub_pod);
428 require(is_attached());
437 _hub_pod = _hub_begin;
466 require(conforms_to_state(xhost, xlocal_id));
473 _local_id = xlocal_id;
491 ensure(is_attached());
492 ensure(&host() == &xhost);
513 ensure(is_basic_query);
558 if(invariant_check())
566 disable_invariant_check();
572 enable_invariant_check();
pod_type hub_begin() const
The hub id of vertex (i, j).
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
ijk_connectivity_implicit_index_space_iterator()
Default constructor.
size_type k_vertex_size() const
The number of vertices in the k direction.
pod_type _hub_begin
The hub id of vertex (i, j).
An abstract iterator over the ids of an id space.
virtual void next()
Makes item() the next id in the iteration.
virtual pod_type family_scope(pod_type xlocal_id) const =0
Id relative to the id space family equivalent to the local id xlocal_id.
ijk_connectivity_implicit_index_space_iterator & operator=(const ijk_connectivity_implicit_index_space_iterator &xother)
Assignment operator.
virtual bool invariant() const
Class invariant.
virtual ~ijk_connectivity_implicit_index_space_iterator()
Destructor.
An implementation of index_space_interval for an interval of implicit id spaces for the connectivity ...
Abstract base class with useful features for all objects.
virtual ijk_connectivity_implicit_index_space_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
size_type k_vertex_size() const
The number of vertices in the k direction.
size_type jk_vertex_size() const
The number of vertices in the j*k direction.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual void reset()
Restarts the iteration.
An implementation of implicit_index_space_iterator for an implicit id space in an ijk_connectivity_in...
A collection of id space states. This is a virtual class with provides an interface for accessing the...
virtual bool contains(pod_type xlocal_id) const =0
True if this collection contains the id space with local id xlocal_id.
virtual void attach_to(const index_space_collection &xhost, pod_type xlocal_id)
Attach to the state with local scope id, xlocal_id in the host id space collection xhost...
pod_type vertex_hub_begin() const
The hub id of the beginning of the vertex id space.
virtual bool invariant() const
Class invariant.
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
size_type _k_vertex_size
The number of vertices in the k direction.
virtual bool is_attached() const
True if this iterator is attached to a state.
virtual bool conforms_to_state(const index_space_collection &xhost, pod_type xlocal_id) const
True if this conforms to the handle type required by the state with local scope id xlocal_id in the h...
Factory and container for a family of id spaces.
pod_index_type pod_type
The "plain old data" index type for this.
Namespace for the fiber_bundles component of the sheaf system.
size_type jk_vertex_size() const
The number of vertices in the j*k direction.
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
size_type _jk_vertex_size
The number of vertices in the j*k direction.