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

Split selector functions into header and source files

parent 9d28f33b
Branches
Tags
No related merge requests found
//======================================================================================================================
//
// This file is part of waLBerla. waLBerla is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// waLBerla is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
//! \file BodySelectorFunctions.cpp
//! \ingroup pe_coupling
//! \author Christoph Rettinger <christoph.rettinger@fau.de>
//
//======================================================================================================================
#include "BodySelectorFunctions.h"
#include "pe/rigidbody/RigidBody.h"
namespace walberla {
namespace pe_coupling {
bool selectAllBodies(pe::BodyID /*bodyID*/)
{
return true;
}
bool selectRegularBodies(pe::BodyID bodyID)
{
return !bodyID->hasInfiniteMass() && !bodyID->isGlobal();
}
bool selectFixedBodies(pe::BodyID bodyID)
{
return bodyID->hasInfiniteMass() && !bodyID->isGlobal();
}
bool selectGlobalBodies(pe::BodyID bodyID)
{
return bodyID->isGlobal();
}
} // namespace pe_coupling
} // namespace walberla
......@@ -21,29 +21,18 @@
#pragma once
#include "pe/Types.h"
#include "pe/rigidbody/RigidBody.h"
namespace walberla {
namespace pe_coupling {
bool selectAllBodies(pe::BodyID /*bodyID*/)
{
return true;
}
bool selectRegularBodies(pe::BodyID bodyID)
{
return !bodyID->hasInfiniteMass() && !bodyID->isGlobal();
}
bool selectFixedBodies(pe::BodyID bodyID)
{
return bodyID->hasInfiniteMass() && !bodyID->isGlobal();
}
bool selectGlobalBodies(pe::BodyID bodyID)
{
return bodyID->isGlobal();
}
bool selectAllBodies(pe::BodyID /*bodyID*/);
bool selectRegularBodies(pe::BodyID bodyID);
bool selectFixedBodies(pe::BodyID bodyID);
bool selectGlobalBodies(pe::BodyID bodyID);
} // namespace pe_coupling
} // namespace walberla
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