Commit 1c3632b0 authored by Jonas Plewinski's avatar Jonas Plewinski
Browse files

Merge branch 'master' into master-p

parents cdcddc5a 59d728a8
Pipeline #40727 failed with stages
in 9 minutes and 57 seconds
......@@ -79,30 +79,34 @@ IncludeCategories:
Priority: 12
- Regex: '^"lbm/'
Priority: 13
- Regex: '^"mesh/'
- Regex: '^"lbm_mesapd_coupling/'
Priority: 14
- Regex: '^"pde/'
- Regex: '^"mesh/'
Priority: 15
- Regex: '^"pe/'
- Regex: '^"mesa_pd/'
Priority: 16
- Regex: '^"pe_coupling/'
- Regex: '^"pde/'
Priority: 17
- Regex: '^"postprocessing/'
- Regex: '^"pe/'
Priority: 18
- Regex: '^"python_coupling/'
- Regex: '^"pe_coupling/'
Priority: 19
- Regex: '^"simd/'
- Regex: '^"postprocessing/'
Priority: 20
- Regex: '^"stencil/'
- Regex: '^"python_coupling/'
Priority: 21
- Regex: '^"timeloop/'
- Regex: '^"simd/'
Priority: 22
- Regex: '^"vtk/'
- Regex: '^"stencil/'
Priority: 23
- Regex: '^<boost/'
- Regex: '^"timeloop/'
Priority: 24
- Regex: '^<'
- Regex: '^"vtk/'
Priority: 25
- Regex: '^<boost/'
Priority: 26
- Regex: '^<'
Priority: 27
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 3
......
......@@ -207,6 +207,7 @@ intel_20_serial:
WALBERLA_BUILD_WITH_MPI: "OFF"
WALBERLA_BUILD_WITH_OPENMP: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
CMAKE_CXX_FLAGS: "-qoverride-limits"
WALBERLA_BUILD_WITH_METIS: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
only:
......@@ -223,6 +224,7 @@ intel_20_mpionly:
variables:
WALBERLA_BUILD_WITH_CUDA: "ON"
WALBERLA_BUILD_WITH_OPENMP: "OFF"
CMAKE_CXX_FLAGS: "-qoverride-limits"
WALBERLA_BUILD_WITH_METIS: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
only:
......@@ -238,6 +240,7 @@ intel_20_hybrid:
image: i10git.cs.fau.de:5005/walberla/buildenvs/intel:20
variables:
WALBERLA_BUILD_WITH_CUDA: "ON"
CMAKE_CXX_FLAGS: "-qoverride-limits"
WALBERLA_BUILD_WITH_METIS: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
tags:
......@@ -254,6 +257,7 @@ intel_20_serial_dbg:
WALBERLA_BUILD_WITH_OPENMP: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
CMAKE_BUILD_TYPE: "DebugOptimized"
CMAKE_CXX_FLAGS: "-qoverride-limits"
WALBERLA_BUILD_WITH_METIS: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
tags:
......@@ -268,6 +272,7 @@ intel_20_mpionly_dbg:
WALBERLA_BUILD_WITH_CUDA: "ON"
CMAKE_BUILD_TYPE: "DebugOptimized"
WALBERLA_BUILD_WITH_OPENMP: "OFF"
CMAKE_CXX_FLAGS: "-qoverride-limits"
WALBERLA_BUILD_WITH_METIS: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
tags:
......@@ -281,6 +286,7 @@ intel_20_hybrid_dbg:
variables:
WALBERLA_BUILD_WITH_CUDA: "ON"
CMAKE_BUILD_TYPE: "DebugOptimized"
CMAKE_CXX_FLAGS: "-qoverride-limits"
WALBERLA_BUILD_WITH_METIS: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
tags:
......@@ -297,6 +303,7 @@ intel_20_hybrid_dbg_sp:
WALBERLA_DOUBLE_ACCURACY: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
WALBERLA_BUILD_WITH_METIS: "OFF"
CMAKE_CXX_FLAGS: "-qoverride-limits"
WALBERLA_BUILD_WITH_METIS: "OFF"
WALBERLA_BUILD_WITH_PARMETIS: "OFF"
tags:
......@@ -506,6 +513,7 @@ gcc_9_serial:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -529,6 +537,7 @@ gcc_9_mpionly:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -550,6 +559,7 @@ gcc_9_hybrid:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -570,6 +580,7 @@ gcc_9_serial_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -594,6 +605,7 @@ gcc_9_mpionly_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -616,6 +628,7 @@ gcc_9_hybrid_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -637,6 +650,7 @@ gcc_9_hybrid_dbg_sp:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -661,6 +675,7 @@ gcc_10_serial:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -684,6 +699,7 @@ gcc_10_mpionly:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -705,6 +721,7 @@ gcc_10_hybrid:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -725,6 +742,7 @@ gcc_10_serial_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -749,6 +767,7 @@ gcc_10_mpionly_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -771,6 +790,7 @@ gcc_10_hybrid_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -792,6 +812,7 @@ gcc_10_hybrid_dbg_sp:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -816,6 +837,7 @@ gcc_11_serial:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -839,6 +861,7 @@ gcc_11_mpionly:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -861,9 +884,9 @@ gcc_11_hybrid:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
- pip3 list
variables:
WALBERLA_BUILD_WITH_CUDA: "ON"
WALBERLA_BUILD_WITH_CODEGEN: "ON"
......@@ -879,6 +902,7 @@ gcc_11_serial_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -900,6 +924,7 @@ gcc_11_mpionly_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -919,6 +944,7 @@ gcc_11_hybrid_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -937,6 +963,7 @@ gcc_11_hybrid_dbg_sp:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1450,6 +1477,7 @@ clang_11.0_serial:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1473,6 +1501,7 @@ clang_11.0_mpionly:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1494,6 +1523,7 @@ clang_11.0_hybrid:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1514,6 +1544,7 @@ clang_11.0_serial_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1538,6 +1569,7 @@ clang_11.0_mpionly_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1560,6 +1592,7 @@ clang_11.0_hybrid_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1581,6 +1614,7 @@ clang_11.0_hybrid_dbg_sp:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1605,6 +1639,7 @@ clang_12.0_serial:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1628,6 +1663,7 @@ clang_12.0_mpionly:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1649,6 +1685,7 @@ clang_12.0_hybrid:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1669,6 +1706,7 @@ clang_12.0_serial_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1693,6 +1731,7 @@ clang_12.0_mpionly_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1715,6 +1754,7 @@ clang_12.0_hybrid_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1736,6 +1776,7 @@ clang_12.0_hybrid_dbg_sp:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1760,6 +1801,7 @@ clang_13.0_serial:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1783,6 +1825,7 @@ clang_13.0_mpionly:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1804,6 +1847,7 @@ clang_13.0_hybrid:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1821,6 +1865,7 @@ clang_13.0_serial_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1842,6 +1887,7 @@ clang_13.0_mpionly_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1861,6 +1907,7 @@ clang_13.0_hybrid_dbg:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......@@ -1880,6 +1927,7 @@ clang_13.0_hybrid_dbg_sp:
- pip3 install lbmpy==1.0 jinja2 pytest
- cd python
- python3 -m pytest --junitxml=report.xml pystencils_walberla lbmpy_walberla
- pip3 list
- cd ..
- CC=gcc CXX=g++ pip3 install pycuda
variables:
......
......@@ -103,6 +103,8 @@ public:
static const {{dtype}} wInv[{{Q}}];
static const bool compressible = {% if compressible %}true{% else %}false{% endif %};
static const bool zeroCentered = {% if zero_centered %}true{% else %}false{% endif %};
static const bool equilibriumDeviationOnly = {% if equilibrium_deviation_only %}true{% else %}false{% endif %};
class Sweep
{
......
......@@ -114,6 +114,8 @@ def __lattice_model(generation_context, class_name, config, lb_method, stream_co
'D': lb_method.stencil.D,
'Q': lb_method.stencil.Q,
'compressible': lb_method.conserved_quantity_computation.compressible,
'zero_centered': lb_method.conserved_quantity_computation.zero_centered_pdfs,
'equilibrium_deviation_only': lb_method.equilibrium_distribution.deviation_only,
'weights': ",".join(str(w.evalf()) + constant_suffix for w in lb_method.weights),
'inverse_weights': ",".join(str((1 / w).evalf()) + constant_suffix for w in lb_method.weights),
'dtype': "float" if is_float else "double",
......
......@@ -32,8 +32,12 @@ class AbstractBody {
public:
virtual ~AbstractBody() = default;
virtual bool contains (const Vector3<real_t> & point ) const = 0;
virtual FastOverlapResult fastOverlapCheck ( const Vector3<real_t> & cellMidpoint, const Vector3<real_t> & dx ) const = 0;
virtual FastOverlapResult fastOverlapCheck ( const AABB & box ) const = 0;
virtual FastOverlapResult fastOverlapCheck(const Vector3< real_t >& /*cellMidpoint*/,
const Vector3< real_t >& /*dx*/) const
{
return geometry::DONT_KNOW;
}
virtual FastOverlapResult fastOverlapCheck(const AABB& /*box*/) const { return geometry::DONT_KNOW; }
};
// this is an adaptor from static to dynamic polymorphism
......
......@@ -14,5 +14,6 @@ target_sources( lbm_mesapd_coupling
add_subdirectory( amr )
add_subdirectory( momentum_exchange_method )
add_subdirectory( partially_saturated_cells_method )
add_subdirectory( utility )
add_subdirectory( mapping )
\ No newline at end of file
add_subdirectory( mapping )
//======================================================================================================================
//
// This file is part of waLBerla. waLBerla is free software: you can
// 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
// 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
//
// 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/>.
//
......@@ -21,17 +21,26 @@
#pragma once
#include "field/GhostLayerField.h"
#include "core/DataTypes.h"
namespace walberla {
namespace lbm_mesapd_coupling {
#include "field/GhostLayerField.h"
namespace walberla
{
namespace lbm_mesapd_coupling
{
/*
* Typedefs specific to the lbm - mesa_pd coupling
*/
using ParticleField_T = walberla::GhostLayerField< walberla::id_t, 1 >;
namespace psm
{
// store the particle uid together with the overlap fraction
using ParticleAndVolumeFraction_T = std::pair< id_t, real_t >;
using ParticleAndVolumeFractionField_T = GhostLayerField< std::vector< ParticleAndVolumeFraction_T >, 1 >;
} // namespace psm
} // namespace lbm_mesapd_coupling
} // namespace walberla
//======================================================================================================================
//
// 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 OverlapFraction.h
//! \ingroup lbm_mesapd_coupling
//! \author Samuel Kemmler <samuel.kemmler@fau.de>
//! \brief Functor that provides overlap fraction computations for different MESA-PD shapes (used for SingleCast)
//
//======================================================================================================================
#pragma once
#include "core/DataTypes.h"
#include "geometry/bodies/BodyOverlapFunctions.h"
#include "mesa_pd/common/Contains.h"
#include "mesa_pd/data/DataTypes.h"
#include "mesa_pd/data/shape/Sphere.h"
#include "shapes/BoxWithOverlap.h"
#include "shapes/CylindricalBoundaryWithOverlap.h"
#include "shapes/EllipsoidWithOverlap.h"
#include "shapes/HalfSpaceWithOverlap.h"
#include "shapes/SphereWithOverlap.h"
namespace walberla
{
namespace lbm_mesapd_coupling
{
namespace psm
{
struct OverlapFractionFunctor
{
template< typename ParticleAccessor_T, typename Shape_T >
real_t operator()(const size_t /*particleIdx*/, const Shape_T& /*shape*/,
const shared_ptr< ParticleAccessor_T >& /*ac*/, const Vector3< real_t >& /*point*/,
const Vector3< real_t >& /*dxVec*/, uint_t /*superSamplingDepth*/)
{
WALBERLA_ABORT("OverlapFraction not implemented!");
}
template< typename ParticleAccessor_T >
real_t operator()(const size_t particleIdx, const mesa_pd::data::Sphere& sphere,
const shared_ptr< ParticleAccessor_T >& ac, const Vector3< real_t >& point,
const Vector3< real_t >& dxVec, uint_t superSamplingDepth)
{
WALBERLA_STATIC_ASSERT((std::is_base_of< mesa_pd::data::IAccessor, ParticleAccessor_T >::value));
SphereWithOverlap sphereWithOverlap(particleIdx, ac, sphere);
return geometry::overlapFraction< geometry::AbstractBody >(sphereWithOverlap, point, dxVec, superSamplingDepth);
}
template< typename ParticleAccessor_T >
real_t operator()(const size_t particleIdx, const mesa_pd::data::HalfSpace& halfSphere,
const shared_ptr< ParticleAccessor_T >& ac, const Vector3< real_t >& point, real_t dxVec,
uint_t superSamplingDepth)
{
WALBERLA_STATIC_ASSERT((std::is_base_of< mesa_pd::data::IAccessor, ParticleAccessor_T >::value));
HalfSpaceWithOverlap halfSpaceWithOverlap(particleIdx, ac, halfSphere);
return geometry::overlapFraction< geometry::AbstractBody >(halfSpaceWithOverlap, point, dxVec,
superSamplingDepth);
}
template< typename ParticleAccessor_T >
real_t operator()(const size_t particleIdx, const mesa_pd::data::CylindricalBoundary& cylindricalBoundary,
const shared_ptr< ParticleAccessor_T >& ac, const Vector3< real_t >& point, real_t dxVec,
uint_t superSamplingDepth)
{
WALBERLA_STATIC_ASSERT((std::is_base_of< mesa_pd::data::IAccessor, ParticleAccessor_T >::value));
CylindricalBoundaryWithOverlap cylindricalBoundaryWithOverlap(particleIdx, ac, cylindricalBoundary);
return geometry::overlapFraction< geometry::AbstractBody >(cylindricalBoundaryWithOverlap, point, dxVec,
superSamplingDepth);
}
template< typename ParticleAccessor_T >
real_t operator()(const size_t particleIdx, const mesa_pd::data::Box& box,
const shared_ptr< ParticleAccessor_T >& ac, const Vector3< real_t >& point, real_t dxVec,
uint_t superSamplingDepth)
{
WALBERLA_STATIC_ASSERT((std::is_base_of< mesa_pd::data::IAccessor, ParticleAccessor_T >::value));
BoxWithOverlap boxWithOverlap(particleIdx, ac, box);
return geometry::overlapFraction< geometry::AbstractBody >(boxWithOverlap, point, dxVec, superSamplingDepth);
}
template< typename ParticleAccessor_T >
real_t operator()(const size_t particleIdx, const mesa_pd::data::Ellipsoid& ellipsoid,
const shared_ptr< ParticleAccessor_T >& ac, const Vector3< real_t >& point, real_t dxVec,
uint_t superSamplingDepth)
{
WALBERLA_STATIC_ASSERT((std::is_base_of< mesa_pd::data::IAccessor, ParticleAccessor_T >::value));
EllipsoidWithOverlap ellipsoidWithOverlap(particleIdx, ac, ellipsoid);
return geometry::overlapFraction< geometry::AbstractBody >(ellipsoidWithOverlap, point, dxVec,
superSamplingDepth);
}
};
} // namespace psm
} // namespace lbm_mesapd_coupling
} // namespace walberla