Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
selimanac committed Aug 3, 2019
1 parent 2752f56 commit 38bccd4
Show file tree
Hide file tree
Showing 7 changed files with 513 additions and 333 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ lib-src/AABB.cc

lib-src/build-mac-linux.sh
.vscode/settings.json
bookmarks.json
26 changes: 5 additions & 21 deletions daabbcc/src/AABB.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ namespace aabb
// Validate the bound.
if (lowerBound[i] > upperBound[i])
{

assert("[ERROR]: AABB lower bound is greater than the upper bound!");
}
}
Expand Down Expand Up @@ -198,7 +197,6 @@ namespace aabb
// Validate the dimensionality.
if ((dimension < 2))
{

assert("[ERROR]: Invalid dimensionality!");
}

Expand Down Expand Up @@ -238,15 +236,13 @@ namespace aabb
// Validate the dimensionality.
if (dimension < 2)
{

assert("[ERROR]: Invalid dimensionality!");
assert("[ERROR]: Invalid dimensionality!");
}

// Validate the dimensionality of the vectors.
if ((periodicity.size() != dimension) || (boxSize.size() != dimension))
{

assert("[ERROR]: Dimensionality mismatch!");
assert("[ERROR]: Dimensionality mismatch!");
}

// Initialise the tree.
Expand Down Expand Up @@ -345,14 +341,12 @@ namespace aabb
// Make sure the particle doesn't already exist.
if (particleMap.count(particle) != 0)
{

assert("[ERROR]: Particle already exists in tree!");
assert("[ERROR]: Particle already exists in tree!");
}

// Validate the dimensionality of the position vector.
if (position.size() != dimension)
{

assert("[ERROR]: Dimensionality mismatch!");
}

Expand Down Expand Up @@ -397,15 +391,13 @@ namespace aabb
// Make sure the particle doesn't already exist.
if (particleMap.count(particle) != 0)
{

assert("[ERROR]: Particle already exists in tree!");
assert("[ERROR]: Particle already exists in tree!");
}

// Validate the dimensionality of the bounds vectors.
if ((lowerBound.size() != dimension) || (upperBound.size() != dimension))
{

assert("[ERROR]: Dimensionality mismatch!");
assert("[ERROR]: Dimensionality mismatch!");
}

// Allocate a new node for the particle.
Expand All @@ -420,7 +412,6 @@ namespace aabb
// Validate the bound.
if (lowerBound[i] > upperBound[i])
{

assert("[ERROR]: AABB lower bound is greater than the upper bound!");
}

Expand Down Expand Up @@ -467,7 +458,6 @@ namespace aabb
// The particle doesn't exist.
if (it == particleMap.end())
{

assert("[ERROR]: Invalid particle index!");
}

Expand Down Expand Up @@ -514,7 +504,6 @@ namespace aabb
// Validate the dimensionality of the position vector.
if (position.size() != dimension)
{

assert("[ERROR]: Dimensionality mismatch!");
}

Expand All @@ -539,7 +528,6 @@ namespace aabb
// Validate the dimensionality of the bounds vectors.
if ((lowerBound.size() != dimension) && (upperBound.size() != dimension))
{

assert("[ERROR]: Dimensionality mismatch!");
}

Expand All @@ -552,7 +540,6 @@ namespace aabb
// The particle doesn't exist.
if (it == particleMap.end())
{

assert("[ERROR]: Invalid particle index!");
}

Expand All @@ -571,7 +558,6 @@ namespace aabb
// Validate the bound.
if (lowerBound[i] > upperBound[i])
{

assert("[ERROR]: AABB lower bound is greater than the upper bound!");
}

Expand All @@ -581,7 +567,6 @@ namespace aabb
// Create the new AABB.
AABB aabb(lowerBound, upperBound);


// No need to update if the particle is still within its fattened AABB.
if (!alwaysReinsert && nodes[node].aabb.contains(aabb)) return false;

Expand Down Expand Up @@ -613,7 +598,6 @@ namespace aabb
// Make sure that this is a valid particle.
if (particleMap.count(particle) == 0)
{

assert("[ERROR]: Invalid particle index!");
}

Expand Down
5 changes: 3 additions & 2 deletions daabbcc/src/AABB.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ namespace aabb
/*! \brief The axis-aligned bounding box object.
Axis-aligned bounding boxes (AABBs) store information for the minimum
orthorhombic bounding-box for an object in two- or three-dimensional
space (the bounding box is either a rectangle, or rectangular prism).
orthorhombic bounding-box for an object. Support is provided for
dimensions >= 2. (In 2D the bounding box is either a rectangle,
in 3D it is a rectangular prism.)
Class member functions provide functionality for merging AABB objects
and testing overlap with other AABBs.
Expand Down
Loading

0 comments on commit 38bccd4

Please sign in to comment.