Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Holzer
waLBerla
Commits
b6f607c7
Commit
b6f607c7
authored
Mar 18, 2021
by
Markus Holzer
Browse files
Update master
parents
5105aff5
cce82fcc
Pipeline
#31000
failed with stages
in 44 minutes and 47 seconds
Changes
933
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
.clang-tidy
View file @
b6f607c7
...
...
@@ -11,6 +11,7 @@ bugprone-*,
misc-*,
-misc-misplaced-const,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
modernize-*,
...
...
@@ -25,8 +26,11 @@ modernize-*,
-modernize-redundant-void-arg,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-modernize-concat-nested-namespaces,
-modernize-use-nodiscard,
mpi-*,
-mpi-type-mismatch,
openmp-*,
-openmp-exception-escape,
...
...
@@ -43,21 +47,24 @@ readability-deleted-default,
readability-isolate-declaration,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-non-const-parameter,
readability-redundant-access-specifiers,
readability-redundant-control-flow,
readability-redundant-declaration,
readability-redundant-function-ptr-dereference,
readability-redundant-preprocessor,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-simplify-boolean-expr,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release
readability-uniqueptr-delete-release,
readability-use-anyofallof
'
WarningsAsErrors: '*'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
HeaderFilterRegex: '.*'
...
.gitlab-ci.yml
View file @
b6f607c7
This diff is collapsed.
Click to expand it.
.gitmodules
0 → 100644
View file @
b6f607c7
[submodule "extern/pybind11"]
path = extern/pybind11
url = https://github.com/pybind/pybind11.git
.isort.cfg
0 → 100644
View file @
b6f607c7
[settings]
line_length=100
balanced_wrapping=True
multi_line_output=4
known_third_party=sympy
AUTHORS.txt
View file @
b6f607c7
...
...
@@ -13,7 +13,10 @@ Dominik Bartuschat
Ehsan Fattahi
Felix Winterhalter
Florian Schornbaum
Frederik Hennig
Grigorii Drozdov
Helen Schottenhamml
Igor Ostanin
Jan Götz
Jan Hönig
João Victor Tozatti Risso
...
...
CHANGELOG.md
View file @
b6f607c7
...
...
@@ -2,6 +2,11 @@
## [Unreleased]
-
Python Coupling now build upon pybind11. Boost.Python is no longer supported
-
lbm module dropped from python coupling due to deprecation for a long time
-
geometry, postprocessing and timeloop dropped from python coupling due to its low usage
-
PEP8-ification of Python API. This means all keyword arguments are now in snake_case and not in CamelCase as before.
## [4.1] - 2019-04-19
### Added
-
Galerkin coarsening for Multigrid
...
...
CMakeLists.txt
View file @
b6f607c7
This diff is collapsed.
Click to expand it.
README.md
View file @
b6f607c7
...
...
@@ -19,8 +19,8 @@ is documented in [Sphinx](http://walberla.net/sphinx/index.html).
## Getting started
The minimum requirements are a C++1
4
-compliant compiler (e.g. GCC or Clang)
,
the
[
Boost
](
http://www.boost.org
)
library
and the
[
CMake
](
http://www.cmake.org
)
The minimum requirements are a C++1
7
-compliant compiler (e.g. GCC or Clang)
and the
[
CMake
](
http://www.cmake.org
)
build system. Furthermore, you need an MPI library (like
[
Open MPI
](
http://www.open-mpi.org
)
) if you want to make use of parallel
processing capabilities. All of these dependencies are typically available in
...
...
@@ -47,15 +47,30 @@ Many thanks go to waLBerla's [contributors](AUTHORS.txt)
If you use waLBerla in a publication, please cite the following articles:
-
C. Godenschwager, F. Schornbaum, M. Bauer, H. Köstler, and U. Rüde. A
framework for hybrid parallel flow simulations with a trillion cells in complex
geometries. In: Proceedings of the International Conference on High Performance
Computing, Networking, Storage and Analysis, page 35. ACM, 2013.
-
M. Bauer, S. Eibl, C. Godenschwager, N. Kohl, M. Kuron, C. Rettinger,
F. Schornbaum, C. Schwarzmeier, D. Thönnes, H. Köstler, and U. Rüde. waLBerla:
A block-structured high-performance framework for multiphysics simulations. In:
Computers & Mathematics with Applications, doi:10.1016/j.camwa.2020.01.007.
Elsevier, 2020.
Overview:
-
M. Bauer et al,
*
waLBerla: A block-structured high-performance framework for
multiphysics simulations
*
. Computers & Mathematics with Applications, 2020.
https://doi.org/10.1016/j.camwa.2020.01.007.
Grid Refinement:
-
F. Schornbaum and U. Rüde,
*
Massively parallel algorithms for the lattice boltzmann
method on nonuniform grids
*
. SIAM Journal on Scientific Computing, 2016.
https://doi.org/10.1137/15M1035240
LBM - Particle Coupling:
-
C. Rettinger and U. Rüde,
*
A comparative study of fluid-particle coupling methods for
fully resolved lattice Boltzmann simulations
*
. Computers & Fluids, 2017.
https://doi.org/10.1016/j.compfluid.2017.05.033
MESA-PD:
-
S. Eibl and U. Rüde,
*A Modular and Extensible Software Architecture for Particle Dynamics*
.
Proceedings Of The 8Th International Conference On Discrete Element Methods.
https://mercurylab.co.uk/dem8/full-papers/#page-content
Carbon Nanotubes:
-
G. Drozdov et al,
*
Densification of single-walled carbon nanotube films:
Mesoscopic distinct element method simulations and experimental validation
*
.
Journal of Applied Physics, 2020. https://doi.org/10.1063/5.0025505
## License
...
...
apps/CMakeLists.txt
View file @
b6f607c7
...
...
@@ -32,6 +32,4 @@ endif()
# Python module
if
(
WALBERLA_BUILD_WITH_PYTHON
)
add_subdirectory
(
pythonmodule
)
# no else with "EXLUDE_FROM_ALL" here, since if WALBERLA_BUILD_WITH_PYTHON_MODULE is not activated
# waLBerla was build without -fPIC , so no linking into shared library is possible
endif
()
\ No newline at end of file
apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSedimentSettling.cpp
View file @
b6f607c7
...
...
@@ -90,25 +90,25 @@ using walberla::uint_t;
//////////////
// PDF field, flag field & body field
typedef
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
false
>
LatticeModel_T
;
typedef
LatticeModel_T
::
Stencil
Stencil_T
;
typedef
lbm
::
PdfField
<
LatticeModel_T
>
PdfField_T
;
using
LatticeModel_T
=
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
false
>
;
using
Stencil_T
=
LatticeModel_T
::
Stencil
;
using
PdfField_T
=
lbm
::
PdfField
<
LatticeModel_T
>
;
typedef
walberla
::
uint8_t
flag_t
;
typedef
FlagField
<
flag_t
>
FlagField
_T
;
typedef
GhostLayerField
<
pe
::
BodyID
,
1
>
BodyField_T
;
typedef
GhostLayerField
<
Vector3
<
real_t
>
,
1
>
VelocityField_T
;
using
flag_t
=
walberla
::
uint8_t
;
using
FlagField
_T
=
FlagField
<
flag_t
>
;
using
BodyField_T
=
GhostLayerField
<
pe
::
BodyID
,
1
>
;
using
VelocityField_T
=
GhostLayerField
<
Vector3
<
real_t
>
,
1
>
;
const
uint_t
FieldGhostLayers
=
4
;
// boundary handling
typedef
lbm
::
NoSlip
<
LatticeModel_T
,
flag_t
>
NoSlip_T
;
using
NoSlip_T
=
lbm
::
NoSlip
<
LatticeModel_T
,
flag_t
>
;
typedef
pe_coupling
::
CurvedLinear
<
LatticeModel_T
,
FlagField_T
>
MO_T
;
using
MO_T
=
pe_coupling
::
CurvedLinear
<
LatticeModel_T
,
FlagField_T
>
;
typedef
BoundaryHandling
<
FlagField_T
,
Stencil_T
,
NoSlip_T
,
MO_T
>
BoundaryHandling_T
;
using
BoundaryHandling_T
=
BoundaryHandling
<
FlagField_T
,
Stencil_T
,
NoSlip_T
,
MO_T
>
;
typedef
std
::
tuple
<
pe
::
Sphere
,
pe
::
Ellipsoid
,
pe
::
Plane
>
BodyTypeTuple
;
using
BodyTypeTuple
=
std
::
tuple
<
pe
::
Sphere
,
pe
::
Ellipsoid
,
pe
::
Plane
>
;
///////////
// FLAGS //
...
...
@@ -135,8 +135,8 @@ template< typename LatticeModel_T, typename Filter_T >
class
VectorGradientRefinement
{
public:
typedef
GhostLayerField
<
Vector3
<
real_t
>
,
1
>
VectorField_T
;
typedef
typename
LatticeModel_T
::
Stencil
Stencil_T
;
using
VectorField_T
=
GhostLayerField
<
Vector3
<
real_t
>
,
1
>
;
using
Stencil_T
=
typename
LatticeModel_T
::
Stencil
;
VectorGradientRefinement
(
const
ConstBlockDataID
&
fieldID
,
const
Filter_T
&
filter
,
const
real_t
upperLimit
,
const
real_t
lowerLimit
,
const
uint_t
maxLevel
)
:
...
...
@@ -1504,7 +1504,7 @@ int main( int argc, char **argv )
// add velocity field and utility
BlockDataID
velocityFieldID
=
field
::
addToStorage
<
VelocityField_T
>
(
blocks
,
"velocity field"
,
Vector3
<
real_t
>
(
real_t
(
0
)),
field
::
zyxf
,
uint_t
(
2
)
);
typedef
lbm
::
VelocityFieldWriter
<
PdfField_T
,
VelocityField_T
>
VelocityFieldWriter_T
;
using
VelocityFieldWriter_T
=
lbm
::
VelocityFieldWriter
<
PdfField_T
,
VelocityField_T
>
;
BlockSweepWrapper
<
VelocityFieldWriter_T
>
velocityFieldWriter
(
blocks
,
VelocityFieldWriter_T
(
pdfFieldID
,
velocityFieldID
)
);
...
...
@@ -1847,7 +1847,7 @@ int main( int argc, char **argv )
"Body Mapping"
,
finestLevel
);
// add sweep for restoring PDFs in cells previously occupied by pe bodies
typedef
pe_coupling
::
EquilibriumReconstructor
<
LatticeModel_T
,
BoundaryHandling_T
>
Reconstructor_T
;
using
Reconstructor_T
=
pe_coupling
::
EquilibriumReconstructor
<
LatticeModel_T
,
BoundaryHandling_T
>
;
Reconstructor_T
reconstructor
(
blocks
,
boundaryHandlingID
,
bodyFieldID
);
refinementTimestep
->
addPostStreamVoidFunction
(
lbm
::
refinement
::
SweepAsFunctorWrapper
(
pe_coupling
::
PDFReconstruction
<
LatticeModel_T
,
BoundaryHandling_T
,
Reconstructor_T
>
(
blocks
,
pdfFieldID
,
boundaryHandlingID
,
bodyStorageID
,
globalBodyStorage
,
bodyFieldID
,
reconstructor
,
FormerMO_Flag
,
Fluid_Flag
),
blocks
),
...
...
apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/AMRSettlingSphere.cpp
View file @
b6f607c7
...
...
@@ -84,25 +84,25 @@ using walberla::uint_t;
//////////////
// PDF field, flag field & body field
typedef
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
false
>
LatticeModel_T
;
typedef
LatticeModel_T
::
Stencil
Stencil_T
;
typedef
lbm
::
PdfField
<
LatticeModel_T
>
PdfField_T
;
using
LatticeModel_T
=
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
false
>
;
using
Stencil_T
=
LatticeModel_T
::
Stencil
;
using
PdfField_T
=
lbm
::
PdfField
<
LatticeModel_T
>
;
typedef
walberla
::
uint8_t
flag_t
;
typedef
FlagField
<
flag_t
>
FlagField
_T
;
typedef
GhostLayerField
<
pe
::
BodyID
,
1
>
BodyField_T
;
typedef
GhostLayerField
<
Vector3
<
real_t
>
,
1
>
VelocityField_T
;
using
flag_t
=
walberla
::
uint8_t
;
using
FlagField
_T
=
FlagField
<
flag_t
>
;
using
BodyField_T
=
GhostLayerField
<
pe
::
BodyID
,
1
>
;
using
VelocityField_T
=
GhostLayerField
<
Vector3
<
real_t
>
,
1
>
;
const
uint_t
FieldGhostLayers
=
4
;
// boundary handling
typedef
lbm
::
NoSlip
<
LatticeModel_T
,
flag_t
>
NoSlip_T
;
using
NoSlip_T
=
lbm
::
NoSlip
<
LatticeModel_T
,
flag_t
>
;
typedef
pe_coupling
::
CurvedLinear
<
LatticeModel_T
,
FlagField_T
>
MO_T
;
using
MO_T
=
pe_coupling
::
CurvedLinear
<
LatticeModel_T
,
FlagField_T
>
;
typedef
BoundaryHandling
<
FlagField_T
,
Stencil_T
,
NoSlip_T
,
MO_T
>
BoundaryHandling_T
;
using
BoundaryHandling_T
=
BoundaryHandling
<
FlagField_T
,
Stencil_T
,
NoSlip_T
,
MO_T
>
;
typedef
std
::
tuple
<
pe
::
Sphere
,
pe
::
Ellipsoid
,
pe
::
Plane
>
BodyTypeTuple
;
using
BodyTypeTuple
=
std
::
tuple
<
pe
::
Sphere
,
pe
::
Ellipsoid
,
pe
::
Plane
>
;
///////////
// FLAGS //
...
...
@@ -128,8 +128,8 @@ template< typename LatticeModel_T, typename Filter_T >
class
VectorGradientRefinement
{
public:
typedef
GhostLayerField
<
Vector3
<
real_t
>
,
1
>
VectorField_T
;
typedef
typename
LatticeModel_T
::
Stencil
Stencil_T
;
using
VectorField_T
=
GhostLayerField
<
Vector3
<
real_t
>
,
1
>
;
using
Stencil_T
=
typename
LatticeModel_T
::
Stencil
;
VectorGradientRefinement
(
const
ConstBlockDataID
&
fieldID
,
const
Filter_T
&
filter
,
const
real_t
upperLimit
,
const
real_t
lowerLimit
,
const
uint_t
maxLevel
)
:
...
...
@@ -994,7 +994,7 @@ int main( int argc, char **argv )
// add velocity field and utility
BlockDataID
velocityFieldID
=
field
::
addToStorage
<
VelocityField_T
>
(
blocks
,
"velocity field"
,
Vector3
<
real_t
>
(
real_t
(
0
)),
field
::
zyxf
,
uint_t
(
2
)
);
typedef
lbm
::
VelocityFieldWriter
<
PdfField_T
,
VelocityField_T
>
VelocityFieldWriter_T
;
using
VelocityFieldWriter_T
=
lbm
::
VelocityFieldWriter
<
PdfField_T
,
VelocityField_T
>
;
BlockSweepWrapper
<
VelocityFieldWriter_T
>
velocityFieldWriter
(
blocks
,
VelocityFieldWriter_T
(
pdfFieldID
,
velocityFieldID
)
);
...
...
@@ -1177,7 +1177,7 @@ int main( int argc, char **argv )
"Body Mapping"
,
finestLevel
);
// add sweep for restoring PDFs in cells previously occupied by pe bodies
typedef
pe_coupling
::
EquilibriumReconstructor
<
LatticeModel_T
,
BoundaryHandling_T
>
Reconstructor_T
;
using
Reconstructor_T
=
pe_coupling
::
EquilibriumReconstructor
<
LatticeModel_T
,
BoundaryHandling_T
>
;
Reconstructor_T
reconstructor
(
blocks
,
boundaryHandlingID
,
bodyFieldID
);
refinementTimestep
->
addPostStreamVoidFunction
(
lbm
::
refinement
::
SweepAsFunctorWrapper
(
pe_coupling
::
PDFReconstruction
<
LatticeModel_T
,
BoundaryHandling_T
,
Reconstructor_T
>
(
blocks
,
pdfFieldID
,
boundaryHandlingID
,
bodyStorageID
,
globalBodyStorage
,
bodyFieldID
,
reconstructor
,
FormerMO_Flag
,
Fluid_Flag
),
blocks
),
...
...
apps/benchmarks/AdaptiveMeshRefinementFluidParticleCoupling/WorkloadEvaluation.cpp
View file @
b6f607c7
...
...
@@ -86,23 +86,23 @@ using namespace walberla;
using
walberla
::
uint_t
;
// PDF field, flag field & body field
typedef
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
false
>
LatticeModel_T
;
using
LatticeModel_T
=
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
false
>
;
typedef
LatticeModel_T
::
Stencil
Stencil_T
;
typedef
lbm
::
PdfField
<
LatticeModel_T
>
PdfField_T
;
using
Stencil_T
=
LatticeModel_T
::
Stencil
;
using
PdfField_T
=
lbm
::
PdfField
<
LatticeModel_T
>
;
typedef
walberla
::
uint8_t
flag_t
;
typedef
FlagField
<
flag_t
>
FlagField
_T
;
typedef
GhostLayerField
<
pe
::
BodyID
,
1
>
BodyField_T
;
using
flag_t
=
walberla
::
uint8_t
;
using
FlagField
_T
=
FlagField
<
flag_t
>
;
using
BodyField_T
=
GhostLayerField
<
pe
::
BodyID
,
1
>
;
const
uint_t
FieldGhostLayers
=
1
;
// boundary handling
typedef
pe_coupling
::
CurvedLinear
<
LatticeModel_T
,
FlagField_T
>
MO_CLI_T
;
using
MO_CLI_T
=
pe_coupling
::
CurvedLinear
<
LatticeModel_T
,
FlagField_T
>
;
typedef
BoundaryHandling
<
FlagField_T
,
Stencil_T
,
MO_CLI_T
>
BoundaryHandling_T
;
using
BoundaryHandling_T
=
BoundaryHandling
<
FlagField_T
,
Stencil_T
,
MO_CLI_T
>
;
typedef
std
::
tuple
<
pe
::
Sphere
,
pe
::
Ellipsoid
,
pe
::
Plane
>
BodyTypeTuple
;
using
BodyTypeTuple
=
std
::
tuple
<
pe
::
Sphere
,
pe
::
Ellipsoid
,
pe
::
Plane
>
;
///////////
// FLAGS //
...
...
@@ -754,7 +754,7 @@ int main( int argc, char **argv )
<<
Sweep
(
pe_coupling
::
BodyMapping
<
LatticeModel_T
,
BoundaryHandling_T
>
(
blocks
,
pdfFieldID
,
boundaryHandlingID
,
bodyStorageID
,
globalBodyStorage
,
bodyFieldID
,
MO_CLI_Flag
,
FormerMO_Flag
,
pe_coupling
::
selectRegularBodies
),
"Body Mapping"
);
// sweep for restoring PDFs in cells previously occupied by pe bodies
typedef
pe_coupling
::
EquilibriumReconstructor
<
LatticeModel_T
,
BoundaryHandling_T
>
Reconstructor_T
;
using
Reconstructor_T
=
pe_coupling
::
EquilibriumReconstructor
<
LatticeModel_T
,
BoundaryHandling_T
>
;
Reconstructor_T
reconstructor
(
blocks
,
boundaryHandlingID
,
bodyFieldID
);
timeloop
.
add
()
<<
Sweep
(
pe_coupling
::
PDFReconstruction
<
LatticeModel_T
,
BoundaryHandling_T
,
Reconstructor_T
>
...
...
apps/benchmarks/CMakeLists.txt
View file @
b6f607c7
add_subdirectory
(
AdaptiveMeshRefinementFluidParticleCoupling
)
add_subdirectory
(
ComplexGeometry
)
add_subdirectory
(
DEM
)
add_subdirectory
(
FieldCommunication
)
add_subdirectory
(
MeshDistance
)
add_subdirectory
(
CouetteFlow
)
add_subdirectory
(
FluidParticleCoupling
)
add_subdirectory
(
FluidParticleCouplingWithLoadBalancing
)
add_subdirectory
(
ForcesOnSphereNearPlaneInShearFlow
)
add_subdirectory
(
GranularGas
)
add_subdirectory
(
IntegratorAccuracy
)
add_subdirectory
(
LennardJones
)
add_subdirectory
(
NonUniformGrid
)
add_subdirectory
(
MotionSingleHeavySphere
)
...
...
@@ -14,10 +15,20 @@ add_subdirectory( PoiseuilleChannel )
add_subdirectory
(
ProbeVsExtraMessage
)
add_subdirectory
(
SchaeferTurek
)
add_subdirectory
(
UniformGrid
)
if
(
WALBERLA_BUILD_WITH_CODEGEN
)
add_subdirectory
(
UniformGridGenerated
)
add_subdirectory
(
PhaseFieldAllenCahn
)
endif
()
if
(
WALBERLA_BUILD_WITH_CODEGEN AND WALBERLA_BUILD_WITH_CUDA
)
add_subdirectory
(
UniformGridGPU
)
if
(
WALBERLA_BUILD_WITH_PYTHON
)
add_subdirectory
(
FieldCommunication
)
if
(
WALBERLA_BUILD_WITH_CODEGEN
)
add_subdirectory
(
UniformGridGenerated
)
add_subdirectory
(
PhaseFieldAllenCahn
)
endif
()
if
(
WALBERLA_BUILD_WITH_CODEGEN AND WALBERLA_BUILD_WITH_CUDA
)
add_subdirectory
(
UniformGridGPU
)
endif
()
endif
()
apps/benchmarks/CouetteFlow/CouetteFlow.cpp
View file @
b6f607c7
...
...
@@ -118,21 +118,21 @@ using walberla::real_t;
// TYPEDEFS //
//////////////
typedef
lbm
::
D3Q15
<
lbm
::
collision_model
::
SRT
,
false
>
D3Q15_SRT_INCOMP
;
typedef
lbm
::
D3Q15
<
lbm
::
collision_model
::
SRT
,
true
>
D3Q15_SRT_COMP
;
typedef
lbm
::
D3Q15
<
lbm
::
collision_model
::
TRT
,
false
>
D3Q15_TRT_INCOMP
;
typedef
lbm
::
D3Q15
<
lbm
::
collision_model
::
TRT
,
true
>
D3Q15_TRT_COMP
;
typedef
lbm
::
D3Q19
<
lbm
::
collision_model
::
SRT
,
false
>
D3Q19_SRT_INCOMP
;
typedef
lbm
::
D3Q19
<
lbm
::
collision_model
::
SRT
,
true
>
D3Q19_SRT_COMP
;
typedef
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
false
>
D3Q19_TRT_INCOMP
;
typedef
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
true
>
D3Q19_TRT_COMP
;
typedef
lbm
::
D3Q19
<
lbm
::
collision_model
::
D3Q19MRT
,
false
>
D3Q19_MRT_INCOMP
;
typedef
lbm
::
D3Q27
<
lbm
::
collision_model
::
SRT
,
false
>
D3Q27_SRT_INCOMP
;
typedef
lbm
::
D3Q27
<
lbm
::
collision_model
::
SRT
,
true
>
D3Q27_SRT_COMP
;
typedef
lbm
::
D3Q27
<
lbm
::
collision_model
::
TRT
,
false
>
D3Q27_TRT_INCOMP
;
typedef
lbm
::
D3Q27
<
lbm
::
collision_model
::
TRT
,
true
>
D3Q27_TRT_COMP
;
using
D3Q15_SRT_INCOMP
=
lbm
::
D3Q15
<
lbm
::
collision_model
::
SRT
,
false
>
;
using
D3Q15_SRT_COMP
=
lbm
::
D3Q15
<
lbm
::
collision_model
::
SRT
,
true
>
;
using
D3Q15_TRT_INCOMP
=
lbm
::
D3Q15
<
lbm
::
collision_model
::
TRT
,
false
>
;
using
D3Q15_TRT_COMP
=
lbm
::
D3Q15
<
lbm
::
collision_model
::
TRT
,
true
>
;
using
D3Q19_SRT_INCOMP
=
lbm
::
D3Q19
<
lbm
::
collision_model
::
SRT
,
false
>
;
using
D3Q19_SRT_COMP
=
lbm
::
D3Q19
<
lbm
::
collision_model
::
SRT
,
true
>
;
using
D3Q19_TRT_INCOMP
=
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
false
>
;
using
D3Q19_TRT_COMP
=
lbm
::
D3Q19
<
lbm
::
collision_model
::
TRT
,
true
>
;
using
D3Q19_MRT_INCOMP
=
lbm
::
D3Q19
<
lbm
::
collision_model
::
D3Q19MRT
,
false
>
;
using
D3Q27_SRT_INCOMP
=
lbm
::
D3Q27
<
lbm
::
collision_model
::
SRT
,
false
>
;
using
D3Q27_SRT_COMP
=
lbm
::
D3Q27
<
lbm
::
collision_model
::
SRT
,
true
>
;
using
D3Q27_TRT_INCOMP
=
lbm
::
D3Q27
<
lbm
::
collision_model
::
TRT
,
false
>
;
using
D3Q27_TRT_COMP
=
lbm
::
D3Q27
<
lbm
::
collision_model
::
TRT
,
true
>
;
template
<
typename
LatticeModel_T
>
struct
Types
...
...
@@ -370,10 +370,10 @@ class MyBoundaryHandling
{
public:
typedef
lbm
::
NoSlip
<
LatticeModel_T
,
flag_t
>
NoSlip_T
;
typedef
lbm
::
SimpleUBB
<
LatticeModel_T
,
flag_t
>
UBB_T
;
using
NoSlip_T
=
lbm
::
NoSlip
<
LatticeModel_T
,
flag_t
>
;
using
UBB_T
=
lbm
::
SimpleUBB
<
LatticeModel_T
,
flag_t
>
;
typedef
BoundaryHandling
<
FlagField_T
,
typename
Types
<
LatticeModel_T
>::
Stencil_T
,
NoSlip_T
,
UBB_T
>
BoundaryHandling_T
;
using
BoundaryHandling_T
=
BoundaryHandling
<
FlagField_T
,
typename
Types
<
LatticeModel_T
>::
Stencil_T
,
NoSlip_T
,
UBB_T
>
;
...
...
@@ -616,7 +616,7 @@ struct AddRefinementTimeStep
}
else
{
typedef
lbm
::
SplitSweep
<
LatticeModel_T
,
FlagField_T
>
Sweep_T
;
using
Sweep_T
=
lbm
::
SplitSweep
<
LatticeModel_T
,
FlagField_T
>
;
auto
mySweep
=
make_shared
<
Sweep_T
>
(
pdfFieldId
,
flagFieldId
,
Fluid_Flag
);
addRefinementTimeStep
<
LatticeModel_T
,
Sweep_T
>
(
timeloop
,
blocks
,
pdfFieldId
,
boundaryHandlingId
,
timingPool
,
levelwiseTimingPool
,
...
...
apps/benchmarks/DEM/DEM.cpp
View file @
b6f607c7
...
...
@@ -48,7 +48,7 @@ int main( int argc, char** argv )
using
namespace
walberla
;
using
namespace
walberla
::
pe
;
typedef
std
::
tuple
<
Sphere
,
Plane
>
BodyTuple
;
using
BodyTuple
=
std
::
tuple
<
Sphere
,
Plane
>
;
walberla
::
MPIManager
::
instance
()
->
initializeMPI
(
&
argc
,
&
argv
);
...
...
apps/benchmarks/FieldCommunication/CMakeLists.txt
View file @
b6f607c7
...
...
@@ -4,4 +4,4 @@ waLBerla_link_files_to_builddir( "*.py" )
waLBerla_add_executable
(
NAME FieldCommunication
DEPENDS blockforest core domain_decomposition field postprocessing sqlite
)
DEPENDS blockforest core domain_decomposition field postprocessing sqlite
python_coupling
)
apps/benchmarks/FieldCommunication/FieldCommunication.cpp
View file @
b6f607c7
...
...
@@ -36,7 +36,7 @@ class SingleMessageBufferedScheme
public:
typedef
Stencil_T
Stencil
;
SingleMessageBufferedScheme
(
const
weak_ptr
_wrapper
<
StructuredBlockForest
>
&
bf
,
const
int
tag
=
17953
)
SingleMessageBufferedScheme
(
const
weak_ptr
<
StructuredBlockForest
>
&
bf
,
const
int
tag
=
17953
)
:
blockForest_
(
bf
),
tag_
(
tag
)
{}
inline
void
addDataToCommunicate
(
const
shared_ptr
<
communication
::
UniformPackInfo
>
&
packInfo
)
...
...
@@ -67,7 +67,7 @@ public:
private:
std
::
vector
<
shared_ptr
<
UniformBufferedScheme
<
Stencil
>>
>
schemes_
;
weak_ptr
_wrapper
<
StructuredBlockForest
>
blockForest_
;
weak_ptr
<
StructuredBlockForest
>
blockForest_
;
int
tag_
;
};
...
...
apps/benchmarks/FluidParticleCoupling/CMakeLists.txt
View file @
b6f607c7
...
...
@@ -38,6 +38,10 @@ if( WALBERLA_BUILD_WITH_CODEGEN )
DEPENDS blockforest boundary core domain_decomposition field lbm lbm_mesapd_coupling mesa_pd
postprocessing timeloop vtk FluidParticleCouplingGeneratedLBM
)
waLBerla_add_executable
(
NAME MotionSettlingSphere FILES MotionSettlingSphere.cpp
DEPENDS blockforest boundary core domain_decomposition field lbm lbm_mesapd_coupling mesa_pd
postprocessing timeloop vtk FluidParticleCouplingGeneratedLBM
)
else
()
waLBerla_add_executable
(
NAME SphereWallCollision FILES SphereWallCollision.cpp
...
...
apps/benchmarks/FluidParticleCoupling/DragForceSphere.cpp
View file @
b6f607c7
...
...
@@ -79,6 +79,11 @@
#ifdef WALBERLA_BUILD_WITH_CODEGEN
#include "GeneratedLBMWithForce.h"
#define USE_TRTLIKE
//#define USE_D3Q27TRTLIKE
//#define USE_CUMULANTTRT
//#define USE_CUMULANT
#endif
namespace
drag_force_sphere_mem
...
...
@@ -529,17 +534,27 @@ int main( int argc, char **argv )
real_t
omegaBulk
=
(
useSRT
)
?
lambda_e
:
lbm_mesapd_coupling
::
omegaBulkFromOmega
(
omega
,
bulkViscRateFactor
);
// add omega bulk field
BlockDataID
omegaBulkFieldID
=
field
::
addToStorage
<
ScalarField_T
>
(
blocks
,
"omega bulk field"
,
omegaBulk
,
field
::
fzyx
,
uint_t
(
0
)
);
BlockDataID
omegaBulkFieldID
=
field
::
addToStorage
<
ScalarField_T
>
(
blocks
,
"omega bulk field"
,
omegaBulk
,
field
::
fzyx
);
// create the lattice model
#ifdef WALBERLA_BUILD_WITH_CODEGEN
#if defined(USE_TRTLIKE) || defined(USE_D3Q27TRTLIKE)
WALBERLA_LOG_INFO_ON_ROOT
(
"Using generated TRT-like lattice model!"
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - magic number "
<<
magicNumber
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - omegaBulk = "
<<
omegaBulk
<<
", bulk visc. = "
<<
lbm_mesapd_coupling
::
bulkViscosityFromOmegaBulk
(
omegaBulk
)
<<
" (bvrf "
<<
bulkViscRateFactor
<<
")"
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - lambda_e "
<<
lambda_e
<<
", lambda_d "
<<
lambda_d
<<
", omegaBulk "
<<
omegaBulk
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - use omega bulk adaption = "
<<
useOmegaBulkAdaption
<<
" (adaption layer size = "
<<
adaptionLayerSize
<<
")"
);
LatticeModel_T
latticeModel
=
LatticeModel_T
(
omegaBulkFieldID
,
setup
.
extForce
,
lambda_d
,
lambda_e
);
#elif defined(USE_CUMULANTTRT)
WALBERLA_LOG_INFO_ON_ROOT
(
"Using generated cumulant TRT lattice model!"
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - magic number "
<<
magicNumber
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - lambda_e "
<<
lambda_e
<<
", lambda_d "
<<
lambda_d
);
LatticeModel_T
latticeModel
=
LatticeModel_T
(
setup
.
extForce
,
lambda_d
,
lambda_e
);
#elif defined(USE_CUMULANT)
LatticeModel_T
latticeModel
=
LatticeModel_T
(
setup
.
extForce
,
omega
);
#endif
#else
WALBERLA_LOG_INFO_ON_ROOT
(
"Using waLBerla built-in MRT lattice model and ignoring omega bulk field since not supported!"
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - magic number "
<<
magicNumber
);
...
...
apps/benchmarks/FluidParticleCoupling/ForcesOnSphereNearPlane.cpp
View file @
b6f607c7
...
...
@@ -407,6 +407,7 @@ int main( int argc, char **argv )
bool
initializeVelocityProfile
=
false
;
bool
useOmegaBulkAdaption
=
false
;
real_t
adaptionLayerSize
=
real_t
(
2
);
std
::
string
boundaryCondition
=
"CLI"
;
// SBB, CLI
real_t
relativeChangeConvergenceEps
=
real_t
(
1e-5
);
real_t
physicalCheckingFrequency
=
real_t
(
0.1
);
...
...
@@ -420,6 +421,7 @@ int main( int argc, char **argv )
if
(
std
::
strcmp
(
argv
[
i
],
"--timesteps"
)
==
0
)
{
maximumNonDimTimesteps
=
real_c
(
std
::
atof
(
argv
[
++
i
]
)
);
continue
;
}
if
(
std
::
strcmp
(
argv
[
i
],
"--wallDistance"
)
==
0
)
{
normalizedWallDistance
=
real_c
(
std
::
atof
(
argv
[
++
i
]
)
);
continue
;
}
if
(
std
::
strcmp
(
argv
[
i
],
"--Re"
)
==
0
)
{
ReynoldsNumberShear
=
real_c
(
std
::
atof
(
argv
[
++
i
]
)
);
continue
;
}
if
(
std
::
strcmp
(
argv
[
i
],
"--boundaryCondition"
)
==
0
)
{
boundaryCondition
=
argv
[
++
i
];
continue
;
}
if
(
std
::
strcmp
(
argv
[
i
],
"--velocity"
)
==
0
)
{
wallVelocity
=
real_c
(
std
::
atof
(
argv
[
++
i
]
)
);
continue
;
}
if
(
std
::
strcmp
(
argv
[
i
],
"--xOffset"
)
==
0
)
{
xOffsetOfSpherePosition
=
real_c
(
std
::
atof
(
argv
[
++
i
]
)
);
continue
;
}
if
(
std
::
strcmp
(
argv
[
i
],
"--yOffset"
)
==
0
)
{
yOffsetOfSpherePosition
=
real_c
(
std
::
atof
(
argv
[
++
i
]
)
);
continue
;
}
...
...
@@ -438,6 +440,7 @@ int main( int argc, char **argv )
WALBERLA_CHECK_GREATER_EQUAL
(
normalizedWallDistance
,
real_t
(
0.5
));
WALBERLA_CHECK_GREATER_EQUAL
(
ReynoldsNumberShear
,
real_t
(
0
));
WALBERLA_CHECK_GREATER_EQUAL
(
diameter
,
real_t
(
0
));
WALBERLA_CHECK
(
boundaryCondition
==
"SBB"
||
boundaryCondition
==
"CLI"
);
//////////////////////////
// NUMERICAL PARAMETERS //
...
...
@@ -484,6 +487,7 @@ int main( int argc, char **argv )
WALBERLA_LOG_INFO_ON_ROOT
(
" - use omega bulk adaption = "
<<
useOmegaBulkAdaption
<<
" (adaption layer size = "
<<
adaptionLayerSize
<<
")"
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - sphere diameter = "
<<
diameter
<<
", position = "
<<
initialPosition
<<
" ( xOffset = "
<<
xOffsetOfSpherePosition
<<
", yOffset = "
<<
yOffsetOfSpherePosition
<<
" )"
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - base folder VTK = "
<<
baseFolderVTK
<<
", base folder logging = "
<<
baseFolderLogging
);
WALBERLA_LOG_INFO_ON_ROOT
(
" - boundary condition = "
<<
boundaryCondition
);
///////////////////////////
// BLOCK STRUCTURE SETUP //
...
...
@@ -562,7 +566,7 @@ int main( int argc, char **argv )
////////////////////////
// add omega bulk field
BlockDataID
omegaBulkFieldID
=
field
::
addToStorage
<
ScalarField_T
>
(
blocks
,
"omega bulk field"
,
omegaBulk
,
field
::
fzyx
,
uint_t
(
0
)
);
BlockDataID
omegaBulkFieldID
=
field
::
addToStorage
<
ScalarField_T
>
(
blocks
,
"omega bulk field"
,
omegaBulk
,
field
::
fzyx
);
// create the lattice model
real_t
lambda_e
=
lbm
::
collision_model
::
TRT
::
lambda_e
(
omega
);
...
...
@@ -594,11 +598,21 @@ int main( int argc, char **argv )
lbm_mesapd_coupling
::
MovingParticleMappingKernel
<
BoundaryHandling_T
>
movingParticleMappingKernel
(
blocks
,
boundaryHandlingID
,
particleFieldID
);
lbm_mesapd_coupling
::
AverageHydrodynamicForceTorqueKernel
averageHydrodynamicForceTorque
;
if
(
boundaryCondition
==
"CLI"
)
{
// map sphere into the LBM simulation
ps
->
forEachParticle
(
false
,
lbm_mesapd_coupling
::
RegularParticlesSelector
(),
*
accessor
,
movingParticleMappingKernel
,
*
accessor
,
CLI_Flag
);
// map planes
ps
->
forEachParticle
(
false
,
lbm_mesapd_coupling
::
GlobalParticlesSelector
(),
*
accessor
,
movingParticleMappingKernel
,
*
accessor
,
CLI_Flag
);
}
else
{
// map sphere into the LBM simulation
ps
->
forEachParticle
(
false
,
lbm_mesapd_coupling
::
RegularParticlesSelector
(),
*
accessor
,
movingParticleMappingKernel
,
*
accessor
,
SBB_Flag
);