From 5e48cd50137c469d6eddc2d8d97c68aa706c3308 Mon Sep 17 00:00:00 2001 From: Christoph Rettinger <christoph.rettinger@fau.de> Date: Thu, 18 Jan 2018 10:59:41 +0100 Subject: [PATCH] Removed isFixed checks from lubrication force evaluators --- .../evaluators/LubricationForceEvaluator.h | 13 ++----------- src/pe_coupling/utility/LubricationCorrection.h | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/pe_coupling/discrete_particle_methods/evaluators/LubricationForceEvaluator.h b/src/pe_coupling/discrete_particle_methods/evaluators/LubricationForceEvaluator.h index d69046b3e..b13966987 100644 --- a/src/pe_coupling/discrete_particle_methods/evaluators/LubricationForceEvaluator.h +++ b/src/pe_coupling/discrete_particle_methods/evaluators/LubricationForceEvaluator.h @@ -107,10 +107,6 @@ void LubricationForceEvaluator::operator ()( ) { pe::SphereID sphereI = static_cast<pe::SphereID> ( *body1It ); - // only moving spheres are considered - if ( sphereI->isFixed() ) - continue; - auto copyBody1It = body1It; // loop over all rigid bodies after current body1 to avoid double forces for( auto body2It = (++copyBody1It); body2It != pe::BodyIterator::end(); ++body2It ) @@ -132,10 +128,6 @@ void LubricationForceEvaluator::operator ()( ) { pe::SphereID sphereI = static_cast<pe::SphereID> ( *body1It ); - // only moving spheres are considered - if ( sphereI->isFixed() ) - continue; - for (auto body2It = globalBodyStorage_->begin(); body2It != globalBodyStorage_->end(); ++body2It) { if ( body2It->getTypeID() == pe::Plane::getStaticTypeID() ) @@ -187,9 +179,8 @@ void LubricationForceEvaluator::treatLubricationSphrSphr( real_t nu_Lattice, rea if ( blockAABB.contains(midPoint) || sphereJ->isGlobal() ) { fLub = compLubricationSphrSphr(nu_Lattice, gap, cutOff, sphereI, sphereJ); - sphereI->addForce(fLub); - if( !sphereJ->isFixed() ) - sphereJ->addForce( -fLub); + sphereI->addForce( fLub); + sphereJ->addForce(-fLub); WALBERLA_LOG_DETAIL( "Lubrication force on sphere " << sphereI->getID() << " from sphere " << sphereJ->getID() << " is:" << fLub); WALBERLA_LOG_DETAIL( "Lubrication force on sphere " << sphereJ->getID() << " from sphere " << sphereI->getID() << " is:" << -fLub << "\n"); diff --git a/src/pe_coupling/utility/LubricationCorrection.h b/src/pe_coupling/utility/LubricationCorrection.h index e64c74030..e101ea2bc 100644 --- a/src/pe_coupling/utility/LubricationCorrection.h +++ b/src/pe_coupling/utility/LubricationCorrection.h @@ -96,10 +96,6 @@ void LubricationCorrection::operator ()( ) { pe::SphereID sphereI = static_cast<pe::SphereID> ( *body1It ); - // only moving spheres are considered - if ( sphereI->isFixed() ) - continue; - auto copyBody1It = body1It; // loop over all rigid bodies after current body1 to avoid double forces for( auto body2It = (++copyBody1It); body2It != pe::BodyIterator::end(); ++body2It ) @@ -121,10 +117,6 @@ void LubricationCorrection::operator ()( ) { pe::SphereID sphereI = static_cast<pe::SphereID> ( *body1It ); - // only moving spheres are considered - if ( sphereI->isFixed() ) - continue; - for (auto body2It = globalBodyStorage_->begin(); body2It != globalBodyStorage_->end(); ++body2It) { if ( body2It->getTypeID() == pe::Plane::getStaticTypeID() ) @@ -183,9 +175,8 @@ void LubricationCorrection::treatLubricationSphrSphr( real_t nu_Lattice, real_t if ( blockAABB.contains(midPoint) || sphereJ->isGlobal() ) { fLub = compLubricationSphrSphr(nu_Lattice, gap, cutOff, sphereI, sphereJ); - sphereI->addForce(fLub); - if( !sphereJ->isFixed() ) //TODO needed? - sphereJ->addForce( -fLub); + sphereI->addForce( fLub); + sphereJ->addForce(-fLub); WALBERLA_LOG_DETAIL( "Lubrication force on sphere " << sphereI->getID() << " from sphere " << sphereJ->getID() << " is:" << fLub); WALBERLA_LOG_DETAIL( "Lubrication force on sphere " << sphereJ->getID() << " from sphere " << sphereI->getID() << " is:" << -fLub << "\n"); -- GitLab