Skip to content
Snippets Groups Projects
Commit c8b936d6 authored by Soeren Peters's avatar Soeren Peters
Browse files

Add Function to BCArray to validate node for collision.

parent e4b0700b
No related branches found
No related tags found
3 merge requests!403minor release 0.1.1,!402minor release 0.1.1,!386Add Function to BCArray to validate node for collision.
......@@ -91,6 +91,8 @@ public:
//////////////////////////////////////////////////////////////////////////
inline bool isUndefined(std::size_t x1, std::size_t x2, std::size_t x3) const;
//////////////////////////////////////////////////////////////////////////
inline bool isUnvalidForCollision(std::size_t x1, std::size_t x2, std::size_t x3) const;
//////////////////////////////////////////////////////////////////////////
void setUndefined(std::size_t x1, std::size_t x2, std::size_t x3);
//////////////////////////////////////////////////////////////////////////
inline bool isInterfaceCF(std::size_t x1, std::size_t x2, std::size_t x3) const;
......@@ -201,6 +203,12 @@ inline bool BCArray3D::isUndefined(std::size_t x1, std::size_t x2, std::size_t x
return bcindexmatrix(x1, x2, x3) == UNDEFINED;
}
//////////////////////////////////////////////////////////////////////////
inline bool BCArray3D::isUnvalidForCollision(std::size_t x1, std::size_t x2, std::size_t x3) const
{
const int type = bcindexmatrix(x1, x2, x3);
return type == SOLID || type == UNDEFINED;
}
//////////////////////////////////////////////////////////////////////////
inline bool BCArray3D::isInterfaceCF(std::size_t x1, std::size_t x2, std::size_t x3) const
{
return bcindexmatrix(x1, x2, x3) == INTERFACECF;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -121,7 +121,7 @@ void K17CompressibleNavierStokes::calculate(int step)
for (int x2 = minX2; x2 < maxX2; x2++) {
for (int x1 = minX1; x1 < maxX1; x1++) {
if (bcArray->isSolid(x1, x2, x3) || bcArray->isUndefined(x1, x2, x3)) {
if (bcArray->isUnvalidForCollision(x1, x2, x3)) {
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment