20 #include "SheafSystem/assert_contract.h" 21 #include "SheafSystem/tetra_connectivity.h" 71 require(xnode_id_ct > 0);
72 require((xnode_id_ct % NODES_PER_ELEMENT) == 0);
79 ensure(
element_ct() == xnode_id_ct/NODES_PER_ELEMENT);
105 cout <<
"sizes are: " << xi_size <<
" " << xj_size <<
" " << xk_size <<
" " << xstart_id << endl;
112 ensure(
element_ct() == 6*xi_size*xj_size*xk_size);
113 ensure(
node_ct() == (xi_size+1)*(xj_size+1)*(xk_size+1));
141 require(xi_size > 0);
142 require(xj_size > 0);
143 require(xk_size > 0);
148 _node_ct = (xi_size+1)*(xj_size+1)*(xk_size+1);
209 ensure(
element_ct() == 6*xi_size*xj_size*xk_size);
210 ensure(
node_ct() == (xi_size+1)*(xj_size+1)*(xk_size+1));
virtual tetra_connectivity * clone() const
Virtual constructor, makes a new instance of the same type as this.
pod_index_type * _node_ids
The nodal connectivity array.
virtual cell_type element_type() const
The element type.
size_type _nodes_per_element
The number of nodes per element.
size_type node_id_ct() const
The number of entries in node_ids().
tetra_connectivity()
Default constructor. Equivalent to tetra_connectivity(1, 1, 1)
Zone to node connectivity relation for a block of zones of a given type.
Nodal connectivity for a block containing zones of type tetra.
pod_index_type * node_ids()
The nodal connectivity array.
Abstract base class with useful features for all objects.
virtual ~tetra_connectivity()
Destructor.
size_type nodes_per_element() const
The number of nodes per element.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
void create_connectivity(size_type xi_size, size_type xj_size, size_type xk_size, pod_index_type xstart_id=0)
Allocates and initializes the connectivity array.
size_type _node_id_ct
the number of entyries in _node_ids.
virtual bool invariant() const
Class invariant.
block_connectivity()
Default constructor.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
size_type _element_ct
The number of elements.
size_type node_ct() const
The number of distinct nodes.
bool invariant_check() const
True if invariant checking is enabled.
size_type element_ct() const
The number of elements.
int_type pod_index_type
The plain old data index type.
size_type _k_vertex_size
The number of vertices in the k-direction.
size_type _node_ct
The number of distinct nodes.
pod_index_type _start_id
The id given to the first node id generated. Mostly only useful for creating 1 (vs 0) based node numb...
pod_index_type start_id() const
The id given to the first node id generated.
size_type node_id(size_type xi, size_type xj, size_type xk) const
The node id associated with (xi,xj,xk).
size_type _j_vertex_size
The number of vertices in the j-direction.
Namespace for the fiber_bundles component of the sheaf system.
bool is_same_type(const any *other) const
True if other is the same type as this.
void enable_invariant_check() const
Enable invariant checking.
bool _delete_node_ids
True if destructor of this should delete _node_ids.
bool delete_node_ids() const
True if destructor of this should delete _node_ids.
size_type _i_vertex_size
The number of vertices in the i-direction.
virtual bool invariant() const
Class invariant.