4#include <unordered_map>
16 dimensions(dimensions_),
17 originTree(originTree_){
25 data =
new double[points];
32 for (
int d=0; d<dimensions; d++) {
44 for (
int d=0; d<dimensions; d++) {
55 for (
int i=0; i<points; i++) {
56 data[i] = otherData.
data[i];
62 if ( data!=
nullptr ) {
A patch is a square or cube in the domain.
PatchData(int dimensions, double *offset_, double *size_, int dofsPerAxis, int unknownsPerDoF, int originTree)
void copyData(const PatchData &otherData, int dofsPerAxis, int unknownsPerDoF)
bool overlaps(const PatchData &otherPatch)
double * data
Mapping from variables onto the actual data.
double offset[MaxDimensions]
void free()
Free internal dynamic data types if there's still data left.
double size[MaxDimensions]
size of the patch in each dimension
bool samePatch(const PatchData &otherPatch)
static bool smaller(double lhs, double rhs, double tolerance=NUMERICAL_ZERO_DIFFERENCE) InlineMethod
Smaller operator for floating point values.
bool greater(double lhs, double rhs, double tolerance=NUMERICAL_ZERO_DIFFERENCE)
bool equals(const Matrix< Rows, Cols, Scalar > &lhs, const Matrix< Rows, Cols, Scalar > &rhs, const Scalar &tolerance=NUMERICAL_ZERO_DIFFERENCE)
Compares to matrices on equality by means of a numerical accuracy.
int aPowI(int i, int a)
Computes the i-th power of a in integer arithmetic.