Skip to content
Snippets Groups Projects
Commit ae1c326d authored by Christoph Rettinger's avatar Christoph Rettinger
Browse files

Added some asserts, typo fix in pe coupling

parent 50487a2c
Branches
Tags
No related merge requests found
......@@ -57,7 +57,7 @@ CellInterval getCellBB( const pe::ConstBodyID body, const IBlock & block, Struct
// then determine the cell bounding box of the intersection
blockStorage.getCellBBFromAABB( cellBB, body->getAABB().getIntersection( extendedBlockAABB ), level );
// if infinte body does not intersect with the extended block AABB, return an empty interval
// if infinite body does not intersect with the extended block AABB, return an empty interval
if( cellBB.empty() ) return CellInterval();
}
......
......@@ -123,6 +123,9 @@ private:
CellInterval cellBB = getCellBB( body, *block, *blockStorage_, flagField->nrOfGhostLayers() );
WALBERLA_ASSERT_LESS_EQUAL(body->getLinearVel().length(), real_t(1),
"Velocity is above 1 (" << body->getLinearVel() << "), which violates the assumption made in the getCellBB() function. The coupling might thus not work properly. Body:\n" << *body);
Vector3<real_t> startCellCenter = blockStorage_->getBlockLocalCellCenter( *block, cellBB.min() );
real_t cz = startCellCenter[2];
......@@ -157,6 +160,9 @@ private:
}
// let pointer from body field point to this body
(*bodyField)(x,y,z) = body;
WALBERLA_ASSERT(isFlagSet( cellFlagPtr, obstacle ), "Flag mapping incorrect for body\n" << *body );
WALBERLA_ASSERT_EQUAL((*bodyField)(x,y,z), body, "Body field does not point to correct body\n" << *body << ".");
}
else
{
......
......@@ -108,7 +108,7 @@ private:
if (isFlagSet(flagField->get(x,y,z), formerObstacle)) {
boundaryHandling->setDomain( fluid, x, y, z );
removeFlag( flagField->get(x,y,z), formerObstacle );
(*bodyField)(x,y,z) = NULL;
(*bodyField)(x,y,z) = nullptr;
}
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment