21 #ifndef D_BOUNDING_BOX_IMPL_H 22 #define D_BOUNDING_BOX_IMPL_H 24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 28 #ifndef D_BOUNDING_BOX_H 29 #include "SheafSystem/d_bounding_box.h" 32 #ifndef ASSERT_CONTRACT_H 33 #include "SheafSystem/assert_contract.h" 45 template <
int DC,
int DB>
51 _member_id.invalidate();
65 ensure(evaluator() == 0);
66 ensure(dofs_index() == 0);
67 ensure(dof_ct() == 0);
71 template <
int DC,
int DB>
84 ensure(lb() == xbox.
lb());
85 ensure(ub() == xbox.
ub());
89 ensure(dof_ct() == xbox.
dof_ct());
92 template <
int DC,
int DB>
105 _member_id = xbox._member_id;
106 _evaluator = xbox._evaluator;
107 _dofs_index = xbox._dofs_index;
108 _dof_ct = xbox._dof_ct;
114 ensure(lb() == xbox.
lb());
115 ensure(ub() == xbox.
ub());
119 ensure(dof_ct() == xbox.
dof_ct());
124 template <
int DC,
int DB>
132 template <
int DC,
int DB>
143 template <
int DC,
int DB>
156 result = result && (_lb == xbox._lb);
157 result = result && (_ub == xbox._ub);
158 result = result && (_member_id == xbox._member_id);
159 result = result && (_evaluator == xbox._evaluator);
160 result = result && (_dofs_index == xbox._dofs_index);
161 result = result && (_dof_ct == xbox._dof_ct);
178 template <
int DC,
int DB>
187 bool result = ((_lb <= xpt) && (xpt <= _ub));
198 template <
int DC,
int DB>
209 xos <<
"d_bounding_box: " << endl
210 <<
" lower_bounds: " << lb() << endl
211 <<
" upper_bounds: " << ub() << endl
212 <<
" member_id: " << member_id() << endl
213 <<
" dofs_index: " << dofs_index() << endl
214 <<
" dof_ct: " << dof_ct() << endl;
223 template <
int DC,
int DB>
231 template <
int DC,
int DB>
251 template <
int DC,
int DB>
259 template <
int DC,
int DB>
279 template <
int DC,
int DB>
295 template <
int DC,
int DB>
308 ensure(member_id() == xid);
312 template <
int DC,
int DB>
328 template <
int DC,
int DB>
341 ensure(branch_id() == xid);
345 template <
int DC,
int DB>
361 template <
int DC,
int DB>
370 _evaluator = xevaluator;
374 ensure(evaluator() == xevaluator);
378 template <
int DC,
int DB>
394 template <
int DC,
int DB>
403 _dofs_index = xindex;
407 ensure(dofs_index() == xindex);
411 template <
int DC,
int DB>
427 template <
int DC,
int DB>
440 ensure(dof_ct() == xct);
444 template <
int DC,
int DB>
464 template <
int DC,
int DB>
480 ensure(result == DC);
491 template <
int DC,
int DB>
493 operator<<(std::ostream& xos, const d_bounding_box<DC, DB>& xbox)
501 #endif // D_BOUNDING_BOX_IMPL_H bool operator==(const d_bounding_box< DC, DB > &xbox) const
Equality operator.
const scoped_index & member_id() const
Index of the evaluation member this bounds.
void put_lb(const d_bin_coordinates< DC, DB > &xlb)
Copies the contents of xlb to lb().
~d_bounding_box()
Destructor.
bool invariant() const
Class invariant.
void put_dof_ct(size_type xct)
Sets dof_ct() to xct.
const d_bin_coordinates< DC, DB > & ub() const
The upper bound; the upper, right, rear corner.
Fixed point relative coordinates for a tree domain.
static int dc()
The number of spatial dimensions.
sheaf::size_type size_type
An unsigned integral type used to represent sizes and capacities.
bool contains_point(const d_bin_coordinates< DC, DB > &xpt) const
True if this contains point xpt.
size_type dof_ct() const
The number of dofs in the gathered dofs array for the evaluation member this bounds.
size_type dofs_index() const
Index into the gathered dofs array for the evaluation member this bounds.
void put_member_id(const scoped_index &xid)
Sets member_id() to xid.
An index within the external ("client") scope of a given id space.
const d_bin_coordinates< DC, DB > & lb() const
The lower bound; the lower, left, front corner.
A bounding box that can be strung together into a list.
void put_dofs_index(size_type xindex)
Sets dofs_index() to xindex.
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
d_bounding_box()
Default constructor.
section_evaluator * evaluator() const
Evaluator for the evaluation member this bounds.
void put_evaluator(section_evaluator *xevaluator)
Sets evaluator() to xevaluator.
d_bounding_box< DC, DB > & operator=(const d_bounding_box< DC, DB > &xbox)
Assignment operator.
void size_pa(d_bin_coordinates< DC, DB > &xresult) const
The size of each side of the box; pre-allocated.
void put_ub(const d_bin_coordinates< DC, DB > &xub)
Copies the contents of xub to ub().
const scoped_index & branch_id() const
Index of the branch that contains the evaluation member this bounds.
void put_branch_id(const scoped_index &xid)
Sets branch_id() to xid.
void to_stream(std::ostream &xos) const
Insert this into stream xos.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
Namespace for geometry component of sheaf system.