From bca130fd1f34eae0d514833d36e9a400e738467d Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Thu, 2 Nov 2017 12:37:55 +0100 Subject: [PATCH] [API] extended dem collision model with dt --- src/pe/cr/ContactResolvers.h | 24 +++++++++++++++++++++++- src/pe/cr/DEM.impl.h | 4 ++-- src/pe/cr/Integrators.h | 22 ++++++++++++++++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/pe/cr/ContactResolvers.h b/src/pe/cr/ContactResolvers.h index d90b67835..f0b328974 100644 --- a/src/pe/cr/ContactResolvers.h +++ b/src/pe/cr/ContactResolvers.h @@ -1,3 +1,25 @@ +//====================================================================================================================== +// +// 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 ContactResolvers.h +//! \author Klaus Iglberger +//! \author Sebastian Eibl <sebastian.eibl@fau.de> +//! \brief Header file for DEM contact models +// +//====================================================================================================================== + #pragma once #include "pe/Types.h" @@ -11,7 +33,7 @@ namespace cr { class ResolveContactSpringDashpotHaffWerner { public: - void operator()( ContactID c ) const + void operator()( ContactID c, const real_t /*dt*/ ) const { WALBERLA_LOG_DETAIL( "resolving contact: " << c->getID() ); BodyID b1( c->getBody1()->getTopSuperBody() ); diff --git a/src/pe/cr/DEM.impl.h b/src/pe/cr/DEM.impl.h index 3a910f72c..c64669ba2 100644 --- a/src/pe/cr/DEM.impl.h +++ b/src/pe/cr/DEM.impl.h @@ -13,7 +13,7 @@ // 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 DEM.cpp +//! \file DEM.impl.h //! \author Klaus Iglberger //! \author Sebastian Eibl <sebastian.eibl@fau.de> //! \brief Source file for the DEM solver @@ -88,7 +88,7 @@ void DEMSolver<Integrator,ContactResolver>::timestep( real_t dt ) if (shouldContactBeTreated( &(*cIt), currentBlock.getAABB() )) { ++numberOfContactsTreated_; - resolveContact_( &(*cIt) ); + resolveContact_( &(*cIt), dt); } } diff --git a/src/pe/cr/Integrators.h b/src/pe/cr/Integrators.h index 7675caf6d..30b56e50a 100644 --- a/src/pe/cr/Integrators.h +++ b/src/pe/cr/Integrators.h @@ -1,3 +1,25 @@ +//====================================================================================================================== +// +// 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 Integrators.h +//! \author Klaus Iglberger +//! \author Sebastian Eibl <sebastian.eibl@fau.de> +//! \brief Integrators for the DEM collision resolver +// +//====================================================================================================================== + #pragma once #include "pe/Types.h" -- GitLab