20 #include "SheafSystem/block_adjacency.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/block_connectivity.h" 24 #include "SheafSystem/std_iomanip.h" 46 _element_type = CELL_TYPE_END;
91 put_connectivity(xconn);
101 #ifndef DOXYGEN_SKIP_TYPEDEF_MAPPING 112 require(xnode_ids_ct == xzone_ct*xnodes_per_zone);
116 _element_type = xelement_type;
117 put_connectivity(xzone_ct, xnodes_per_zone, xnode_ids_ct, xnode_ids);
121 ensure(element_type() == xelement_type);
122 ensure(zone_ct() == xzone_ct);
128 #endif // ifndef DOXYGEN_SKIP_TYPEDEF_MAPPING 165 put_connectivity(lzone_ct, lnodes_per_zone, lnode_ids_ct, lnode_ids);
187 require(xnode_ids_ct == xzone_ct*xnodes_per_zone);
200 for(
size_type j=0; j<xnodes_per_zone; ++j)
202 assertion(k < xnode_ids_ct);
205 _adj[lvertex].push_front(i);
212 _node_ct = _adj.size();
215 #ifdef DIAGNOSTIC_OUTPUT 217 cout << *
this << endl;
223 ensure(zone_ct() == xzone_ct);
240 put_connectivity(xconn);
308 return _element_type;
353 ensure(is_same_type(result));
390 if(invariant_check())
394 disable_invariant_check();
398 invariance(block_relation::invariant());
404 enable_invariant_check();
430 for(node_itr_type v = xadj.
begin(); v != xadj.
end(); ++v)
432 cout <<
" node: " << setw(4) << v->first <<
" zones: ";
433 for(zone_itr_type z = v->second.begin(); z != v->second.end(); ++z)
435 cout << setw(4) << *z;
adj_type::iterator node_iterator_type
Type of iterator for nodes.
size_type _zone_ct
The number of distinct zones.
node_iterator_type begin()
Beginning of adjacency relation.
cell_type _element_type
The element type.
size_type node_id_ct() const
The number of entries in node_ids().
size_type _node_ct
The number of distinct nodes.
size_type zone_ct() const
The number of distinct zones.
virtual bool invariant() const
Class invariant.
Zone to node connectivity relation for a block of zones of a given type.
size_type node_ct() const
The number of distinct nodes.
pod_index_type * node_ids()
The nodal connectivity array.
adj_type::const_iterator const_node_iterator_type
Type of const iterator for nodes.
Abstract base class with useful features for all objects.
virtual block_adjacency * clone() const
Virtual constructor, makes a new instance of the same type as this.
size_type nodes_per_element() const
The number of nodes per element.
virtual cell_type element_type() const =0
The element (zone) type.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual cell_type element_type() const
The element type.
block_adjacency & operator=(const block_connectivity &xconn)
Makes this the transpose of connectivity xconn; synonym for put_connectivity(xconn).
Node to zone adjacency relation for a block of zones of a given type.
virtual ~block_adjacency()
Destructor.
void put_connectivity(const block_connectivity &xconn)
Makes this the transpose of connectivity xconn.
size_type element_ct() const
The number of elements.
int_type pod_index_type
The plain old data index type.
adj_type::mapped_type::const_iterator const_zone_iterator_type
Type of const iterator for zones.
adj_type _adj
Storage for the adjcency relation.
node_iterator_type end()
End of adjacency relation.
Namespace for the fiber_bundles component of the sheaf system.
block_adjacency()
Default constructor.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const binary_index &xbi)
Insert binary_index& xbi into ostream& os.