diff --git a/src/pe_coupling/utility/BodySelectorFunctions.cpp b/src/pe_coupling/utility/BodySelectorFunctions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4c10f95028c47e88b3340aef74840337dc723992 --- /dev/null +++ b/src/pe_coupling/utility/BodySelectorFunctions.cpp @@ -0,0 +1,50 @@ +//====================================================================================================================== +// +// 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 diff --git a/src/pe_coupling/utility/BodySelectorFunctions.h b/src/pe_coupling/utility/BodySelectorFunctions.h index 75bc5c93b1e12c5c970c8b0f11556f08e5980d06..a811d416b2fe440d2ff4a0c062b18b7f0823eae2 100644 --- a/src/pe_coupling/utility/BodySelectorFunctions.h +++ b/src/pe_coupling/utility/BodySelectorFunctions.h @@ -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