21 #include "SheafSystem/ijk_product_structure.h" 22 #include "SheafSystem/assert_contract.h" 48 ensure(
ub(0) == xi_ub);
49 ensure(
ub(1) == xj_ub);
50 ensure(
ub(2) == xk_ub);
70 ensure((*
this) == xother);
92 ensure((*
this) == xother);
168 ensure((*
this) == xother);
194 ensure(is_basic_query);
237 require((0 <= xi) && (xi <
d()));
277 ensure(is_basic_query);
294 ensure(is_basic_query);
311 ensure(is_basic_query);
324 require((0 <= xi) && (xi <
ub(0)));
325 require((0 <= xj) && (xj <
ub(1)));
326 require((0 <= xk) && (xk <
ub(2)));
334 ensure((0 <= xordinal) && (xordinal <
ordinal_ub()));
347 require(unexecutable(
"length of xtuple equals d()"));
348 require_for_range(
pod_type i=0, i<
d(), ++i,
349 (0 <= xtuple[i]) && (xtuple[i] <
ub(i)));
357 ensure((0 <= xordinal) && (xordinal <
ordinal_ub()));
370 require((0 <= xordinal) && (xordinal <
ordinal_ub()));
378 ensure((0 <= xi) && (xi <
ub(0)));
379 ensure((0 <= xj) && (xj <
ub(1)));
380 ensure((0 <= xk) && (xk <
ub(2)));
393 require((0 <= xordinal) && (xordinal <
ordinal_ub()));
394 require(unexecutable(
"length of xtuple equals d()"));
402 ensure_for_range(
pod_type i=0, i<
d(), ++i,
403 (0 <= xtuple[i]) && (xtuple[i] <
ub(i)));
428 ensure(
ub(0) == xi_ub);
429 ensure(
ub(1) == xj_ub);
430 ensure(
ub(2) == xk_ub);
443 require(unexecutable(
"xubs.length >= d()"));
444 require_for_range(
pod_type i=0, i<
d(), ++i, xubs[i] > 0);
454 ensure_for_range(
pod_type i=0, i<
d(), ++i,
ub(i) == xubs[i]);
511 invariance(
d() == 3);
540 size_t result = xinclude_shallow ?
sizeof(xn) : 0;
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
void put_ubs(size_type xi_ub, size_type xj_ub, size_type xk_ub)
Set the upper-bounds for this product structure.
void tuple(pod_type xordinal, pod_type &xi, pod_type &xj, pod_type &xk) const
Ordinal to 3-tuple conversion.
A 3D implementation of abstract_product_structure.
An abstract class that defines the product structure for an id space.
virtual bool operator==(const abstract_product_structure &xother) const
True if this is equivalent to xother.
void ordinal(pod_type xi, pod_type xj, pod_type xk, pod_type &xordinal) const
3-tuple to ordinal conversion.
pod_index_type ordinal(pod_index_type xi, pod_index_type xj, size_type xj_ub)
2-tuple to ordinal conversion.
size_type k_ub() const
The upper bound in the k-direction.
virtual bool invariant() const
Class invariant.
size_type ordinal_ub() const
The upper-bound of the ordinal.
Abstract base class with useful features for all objects.
size_type j_ub() const
The upper bound in the j-direction.
ijk_product_structure & operator=(const ijk_product_structure &xother)
Assignment operator.
virtual bool invariant() const
Class invariant.
size_type _k_ub
The upper bound in the k-direction.
SHEAF_DLL_SPEC size_t deep_size(const dof_descriptor_array &xp, bool xinclude_shallow=true)
The deep size of the referenced object of type dof_descriptor_array.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual size_type ub(pod_type xi) const
The upper-bound for the dimension xi.
pod_index_type pod_type
The "plain old data" index type for this.
virtual ijk_product_structure * clone() const
Virtual constructor, makes a new instance of the same type as this.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
ijk_product_structure()
Default constructor; disabled.
virtual ~ijk_product_structure()
Destructor.
bool invariant_check() const
True if invariant checking is enabled.
virtual size_type d() const
The product dimension.
size_type _i_ub
The upper bound in the i-direction.
size_type _j_ub
The upper bound in the j-direction.
void tuple(pod_index_type x, size_type xj_ub, pod_index_type &xi, pod_index_type &xj)
Ordinal to 2-tuple conversion.
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.
size_type i_ub() const
The upper bound in the i-direction.