21 #include "SheafSystem/ij_product_structure.h" 22 #include "SheafSystem/assert_contract.h" 46 ensure(
ub(0) == xi_ub);
47 ensure(
ub(1) == xj_ub);
67 ensure((*
this) == xother);
88 ensure((*
this) == xother);
163 ensure((*
this) == xother);
188 ensure(is_basic_query);
231 require((0 <= xi) && (xi <
d()));
256 ensure(is_basic_query);
273 ensure(is_basic_query);
286 require((0 <= xi) && (xi <
ub(0)));
287 require((0 <= xj) && (xj <
ub(1)));
295 ensure((0 <= xordinal) && (xordinal <
ordinal_ub()));
308 require(unexecutable(
"length of xtuple equals d()"));
309 require_for_range(
pod_type i=0, i<
d(), ++i,
310 (0 <= xtuple[i]) && (xtuple[i] <
ub(i)));
318 ensure((0 <= xordinal) && (xordinal <
ordinal_ub()));
331 require((0 <= xordinal) && (xordinal <
ordinal_ub()));
339 ensure((0 <= xi) && (xi <
ub(0)));
340 ensure((0 <= xj) && (xj <
ub(1)));
353 require((0 <= xordinal) && (xordinal <
ordinal_ub()));
354 require(unexecutable(
"length of xtuple equals d()"));
362 ensure_for_range(
pod_type i=0, i<
d(), ++i,
363 (0 <= xtuple[i]) && (xtuple[i] <
ub(i)));
386 ensure(
ub(0) == xi_ub);
387 ensure(
ub(1) == xj_ub);
400 require(unexecutable(
"xubs.length >= d()"));
401 require_for_range(
pod_type i=0, i<
d(), ++i, xubs[i] > 0);
410 ensure_for_range(
pod_type i=0, i<
d(), ++i,
ub(i) == xubs[i]);
467 invariance(
d() == 2);
496 size_t result = xinclude_shallow ?
sizeof(xn) : 0;
An abstract class that defines the product structure for an id space.
size_type j_ub() const
The upper bound in the j-direction.
void put_ubs(size_type xi_ub, size_type xj_ub)
Set the upper-bounds for this product structure.
virtual size_type ub(pod_type xi) const
The upper-bound for the dimension xi.
pod_index_type ordinal(pod_index_type xi, pod_index_type xj, size_type xj_ub)
2-tuple to ordinal conversion.
void tuple(pod_type xordinal, pod_type &xi, pod_type &xj) const
Ordinal to 2-tuple conversion.
size_type ordinal_ub() const
The upper-bound of the ordinal.
virtual bool operator==(const abstract_product_structure &xother) const
True if this is equivalent to xother.
virtual ij_product_structure * clone() const
Virtual constructor, makes a new instance of the same type as this.
virtual size_type d() const
The product dimension.
Abstract base class with useful features for all objects.
virtual ~ij_product_structure()
Destructor.
ij_product_structure()
Default constructor; disabled.
size_type _j_ub
The upper bound in the j-direction.
virtual bool invariant() const
Class invariant.
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 bool invariant() const
Class invariant.
pod_index_type pod_type
The "plain old data" index type for this.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
ij_product_structure & operator=(const ij_product_structure &xother)
Assignment operator.
void ordinal(pod_type xi, pod_type xj, pod_type &xordinal) const
2-tuple to ordinal conversion.
size_type i_ub() const
The upper bound in the i-direction.
bool invariant_check() const
True if invariant checking is enabled.
size_type _i_ub
The upper bound in the i-direction.
A 2D implementation of abstract_product_structure.
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.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.