Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (1427)
Showing
with 4275 additions and 1841 deletions
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 3
ContinuationIndentWidth: 3
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"blockforest/'
Priority: 1
- Regex: '^"boundary/'
Priority: 2
- Regex: '^"communication/'
Priority: 3
- Regex: '^"core/'
Priority: 4
- Regex: '^"domain_decomposition/'
Priority: 5
- Regex: '^"executiontree/'
Priority: 6
- Regex: '^"fft/'
Priority: 7
- Regex: '^"field/'
Priority: 8
- Regex: '^"gather/'
Priority: 9
- Regex: '^"geometry/'
Priority: 10
- Regex: '^"gpu/'
Priority: 11
- Regex: '^"gpu/'
Priority: 12
- Regex: '^"lbm/'
Priority: 13
- Regex: '^"lbm_mesapd_coupling/'
Priority: 14
- Regex: '^"mesh/'
Priority: 15
- Regex: '^"mesa_pd/'
Priority: 16
- Regex: '^"pde/'
Priority: 17
- Regex: '^"pe/'
Priority: 18
- Regex: '^"pe_coupling/'
Priority: 19
- Regex: '^"postprocessing/'
Priority: 20
- Regex: '^"python_coupling/'
Priority: 21
- Regex: '^"simd/'
Priority: 22
- Regex: '^"sqlite/'
Priority: 23
- Regex: '^"stencil/'
Priority: 24
- Regex: '^"timeloop/'
Priority: 25
- Regex: '^"vtk/'
Priority: 26
- Regex: '^<boost/'
Priority: 27
- Regex: '^<'
Priority: 28
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 3
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: true
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 3
UseTab: Never
\ No newline at end of file
---
Checks: '-*,bugprone-*,-bugprone-exception-escape,misc-*,-misc-misplaced-const,modernize-*,-modernize-use-auto,-modernize-loop-convert,-modernize-pass-by-value,-modernize-raw-string-literal,-modernize-use-using,-modernize-avoid-bind,-modernize-return-braced-init-list,-modernize-use-transparent-functors,-modernize-redundant-void-arg,performance-*'
Checks: '
-*,
boost-*,
-boost-use-ranges,
bugprone-*,
-bugprone-branch-clone,
-bugprone-exception-escape,
-bugprone-easily-swappable-parameters,
-bugprone-crtp-constructor-accessibility,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-macro-parentheses,
-bugprone-narrowing-conversions,
-bugprone-switch-missing-default-case,
-bugprone-assignment-in-if-condition,
-bugprone-reserved-identifier,
misc-*,
-misc-misplaced-const,
-misc-const-correctness,
-misc-unused-parameters,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-include-cleaner,
-misc-header-include-cycle,
-misc-use-internal-linkage,
-misc-use-anonymous-namespace,
modernize-*,
-modernize-use-auto,
-modernize-loop-convert,
-modernize-pass-by-value,
-modernize-raw-string-literal,
-modernize-use-using,
-modernize-avoid-bind,
-modernize-return-braced-init-list,
-modernize-min-max-use-initializer-list,
-modernize-use-transparent-functors,
-modernize-redundant-void-arg,
-modernize-use-trailing-return-type,
-modernize-use-default-member-init,
-modernize-use-equals-delete,
-modernize-macro-to-enum,
-modernize-avoid-c-arrays,
-modernize-concat-nested-namespaces,
-modernize-use-nodiscard,
-modernize-type-traits,
-modernize-make-shared,
mpi-*,
-mpi-type-mismatch,
openmp-*,
-openmp-exception-escape,
-openmp-use-default-none,
performance-*,
-performance-enum-size,
-performance-noexcept-swap,
-performance-move-const-arg,
-performance-unnecessary-value-param,
-performance-avoid-endl,
-performance-no-int-to-ptr,
portability-*,
readability-container-size-empty,
readability-delete-null-pointer,
readability-deleted-default,
readability-misplaced-array-index,
readability-non-const-parameter,
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-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release,
readability-use-anyofallof
'
WarningsAsErrors: '*'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: none
User: si11fita
CheckOptions:
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-make-shared.IgnoreMacros
value: '1'
- key: modernize-make-shared.IncludeStyle
value: '0'
- key: modernize-make-shared.MakeSmartPtrFunction
value: 'std::make_shared'
- key: modernize-make-shared.MakeSmartPtrFunctionHeader
value: memory
- key: modernize-make-unique.IgnoreMacros
value: '1'
- key: modernize-make-unique.IncludeStyle
value: '0'
- key: modernize-make-unique.MakeSmartPtrFunction
value: 'std::make_unique'
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
value: memory
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-pass-by-value.ValuesOnly
value: '0'
- key: modernize-raw-string-literal.ReplaceShorterLiterals
value: '0'
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-replace-random-shuffle.IncludeStyle
value: llvm
- key: modernize-use-auto.RemoveStars
value: '0'
- key: modernize-use-default-member-init.IgnoreMacros
value: '1'
- key: modernize-use-default-member-init.UseAssignment
value: '0'
- key: modernize-use-emplace.ContainersWithPushBack
value: '::std::vector;::std::list;::std::deque'
- key: modernize-use-emplace.SmartPointers
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
- key: modernize-use-emplace.TupleMakeFunctions
value: '::std::make_pair;::std::make_tuple'
- key: modernize-use-emplace.TupleTypes
value: '::std::pair;::std::tuple'
- key: modernize-use-equals-default.IgnoreMacros
value: '1'
- key: modernize-use-noexcept.ReplacementString
value: ''
- key: modernize-use-noexcept.UseNoexceptFalse
value: '1'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: modernize-use-transparent-functors.SafeMode
value: '0'
- key: modernize-use-using.IgnoreMacros
value: '1'
HeaderFilterRegex: '.*'
...
# See https://editorconfig.org/
root = true # top-most .editorconfig-file
# top-most .editorconfig-file
root = true
[*]
tab_width = 3
......@@ -7,4 +8,9 @@ indent_style = space
indent_size = 3
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
\ No newline at end of file
insert_final_newline = false
[*.py]
tab_width = 4
indent_size = 4
insert_final_newline = true
\ No newline at end of file
[flake8]
max-line-length=120
exclude=apps/showcases/Mixer/GenerateModule.py, # contains only statements
apps/benchmarks/FieldCommunication/config.py # just a config file
utilities/bashhelper/createShortcuts.py # contains a lot of really long strings
ignore = W503 C901 E741
name: waLBerla Tests
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create build directory
run: mkdir build
- name: CMake
run: cmake -S . -B build -DWALBERLA_BUILD_WITH_MPI=OFF -DWALBERLA_BUILD_TESTS=ON -DWALBERLA_BUILD_WITH_OPENMP=ON
- name: make
run: cmake --build build -j 2
- name: ctest
run: cd build; ctest
......@@ -4,31 +4,51 @@ ui_*
qrc_*
*~
# macOS
**/.DS_Store
# Backup files of kate/kwrite
# CLion indexing
*.uuid
.fleet
# Generated files
*.out
/src/waLBerlaDefinitions.h
/src/core/waLBerlaBuildInfo.cpp
# Eclipse
/.cproject
/.project
/.pydevproject
/.settings
# Visual Studio
/CMakeSettings.json
/.vs
# Visual Studio Code
/.vscode
# Zed
/.cache*
# CLion
*.idea
*.clion*
# QtCreator
CMakeLists.txt.user.*
# Binary Files
/bin/
/lib/
*.a
/build
/build*
# Logfiles
......@@ -39,16 +59,14 @@ logfile*.txt
# Compiled python
*.pyc
# Jupyter Notebook
**/.ipynb_checkpoints
# Blockforest saves
*.sav
/utilities/.idea
/utilities/py_waLBerla/.idea
/python/.idea
/src/stencil/.idea
# CMake
/CMakeLists.txt.user
# CMake build files
......@@ -61,3 +79,11 @@ cmake_install.cmake
CMakeDefs.h
/moduleStatistics.json
/walberla-config.cmake
cmake-build-*
# Virtual environments
.venv/
env/
venv/
ENV/
This diff is collapsed.
File moved
[settings]
line_length=100
balanced_wrapping=True
multi_line_output=4
known_third_party=sympy
List of contributors
====================
Cameron Stewart
Christian Feichtinger
Christian Godenschwager
Christoph Rettinger
......@@ -12,22 +13,34 @@ 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
Johannes Habich
Klaus Iglberger
Kristina Pickl
Lorenz Hufnagel
Lukas Werner
Markus Holzer
Martin Bauer
Matthias Markl
Michael Kuron
Nils Kohl
Paulo Carvalho
Philipp Suffa
Regina Ammer
Sagar Dolas
Sebastian Eibl
Silke Bergler
Simon Bogner
Stefan Donath
Stephan Seitz
Sunil Kontham
Tobias Leemann
Tobias Preclik
Tobias Scharpff
Tobias Schruff
# Changelog
## [6.1] - 2022-07-25
### Added
- Free-surface LBM extension:
- Add implementation
- Add several showcases
- Add several tests
- LBM - MESA_PD coupling:
- Add partially saturated cells method (PSM)
- Add fluidized bed showcase
- Add virtual mass stabilization technique for light particles
- Add support for more shapes, e.g., convex polyhedron
- MESA_PD:
- Add extensive application for dense particle packing generation
- AMD - HIP support
- Support of the ROCm Toolchain and thus AMD HIP as second GPU language
- All CUDA related files, namespaces, folders etc are renamed to gpu.
- Include "GPUWrapper.h" to use general GPU functions cudaMalloc -> gpuMalloc
- WALBERLA_BUILD_WITH_HIP and WALBERLA_BUILD_WITH_GPU_SUPPORT as new CMake variables introduced
### Changed
- Update and extend phase-field LBM showcases
- Allow access to PDF centering information (for being used in generated LBM kernels)
- Adapt code generation backend to be compatible with pystencils 1.0 and lbmpy 1.0
- Required minimum dependencies:
- C++17-compliant compiler
- CMake 3.14
- pybind 2.6.2
- lbmpy 1.0
- pystencils 1.0
### Deprecated
- GUI
## [5.1] - 2020-04-09
### Added
- Add new tutorials and showcases
- Extend MESA-PD functionalities, including several molecular dynamics models
- Fluid-particle coupling with MESA-PD: functionalities, tests, benchmark scenarios
### Changed
- Update to C++17
- Update CUDA compiler support
- Extend Clang-Tidy coverage
- Add closer integration of code generation using pystencils and lbmpy
- 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.
### Fixed
- Guo force model for non-SRT, may change simulation results
## [4.1] - 2019-04-19
### Added
- Galerkin coarsening for Multigrid
- LBM-PE-Coupling:
- new coupling approach for unresolved particle interactions (discrete particle method)
- adaptive grid refinement for coupled simulations
- load balancing functionalities for coupled simulations
- module description
- integrated *pystencils* and *lbmpy* code generation for kernels and pack infos
- new GPU communication, including support for GPUDirect
- load balancing functionality for the pe
- implemented IProbe communication as an alternative to two message communication for unknown size communication
- new creation helpers for BlockForest
- Minor:
- dynamic load balancing now possible with levels ignored
- `ExtendedBoundaryHandlingFactory` now uses `ParserUBB` instead of `UBB` so that velocity profiles can be specified as an equation in a parameter file
- Enabled the body selection functions for PSM coupling method
- grid_generators now allow range based for loops
### Changed
- A compiler with full C++14 support is now required
- All Boost usage has been replaced with the corresponding standard library functionality, except for Boost.Python (used for the `python_coupling` module), Boost.PropertyTree (used in `config::configToBoostPropertyTree`) and Boost.Graph (used by `math::EquationSystem`). This usually means you need to replace `boost::` with `std::` in your code and change some `#include`s.
- API changes in blockforest::PhantomBlockForest, blockforest::loadbalancing, pe::amr::weight_assignment
- API change for vtk::VTKOutput::getFilenames
- made SendBuffer memory access more high level
- PE coupling:
- changed body mapping functions: removed most of them, added mapping-decider function, accomodated changes to test cases, added new mapping test case
- changed pe coupling mapping functions interfaces, added new mapping functions, adapted test cases and benchmarks
- change in lubrication correction functionality to not require the lattice model but use the dynamic viscosity directly
- PE:
- rebased Union on BodyStorage
- `pe::Union`, `boundary::BoundaryHandling` and `boundary::BoundaryHandlingCollection` are now variadic templates instead of taking a tuple of bodies/boundaries/handlers. This means that you need to replace `std::tuple<A,B>` with `A,B` in these cases.
- using smart pointers for all memory management
- made setMass protected
- extended DEM collision model with dt
- pe::createBlockForest changed to support a variable number of processes
- changed BodyStatistics to use shared_ptr instead of reference
### Removed
- Remove dependency resolution from Singleton
- from PE
- Node
- PtrVector
- contacts from RigidBody
- attached bodies
- attachables
### Fixed
- Fix implict/explict naming in pe::cr
### Deprecated
- all dynamic level-wise balance functions (use the more general ones, without "level-wise")
This diff is collapsed.
# waLBerla
waLBerla (widely applicable Lattice Boltzmann from Erlangen) is a massively
parallel framework for multi physics applications. Besides its original
objective, Lattice Boltzmann solvers for hydrodynamics, it now contains
modules for other applications like Multigrid and rigid body dynamics
as well. Great emphasis is placed on the interoperability between the modules
in particular the fluid-particle coupling.
It scales from laptops to current and future supercomputers while maintaining
waLBerla (widely applicable Lattice Boltzmann from Erlangen) is a massively
parallel framework for multi physics applications. Besides its original
objective, Lattice Boltzmann solvers for hydrodynamics, it now contains
modules for other applications like Multigrid and rigid body dynamics
as well. Great emphasis is placed on the interoperability between the modules
in particular the fluid-particle coupling.
It scales from laptops to current and future supercomputers while maintaining
near-perfect efficiency.
See http://walberla.net/ for more information and a showcase of applications.
See https://www.walberla.net/ for more information and a showcase of applications.
## Documentation and Tutorials
......@@ -19,13 +19,45 @@ is documented in [Sphinx](http://walberla.net/sphinx/index.html).
## Getting started
The minimum requirements are a C++14-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++17-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
your operating system's package manager.
### CMake
The typical steps, assuming your are in the waLBerla source directory, are:
- `mkdir build; cd build` create a build directory and change into it
- `cmake ..` call CMake with the waLBerla source directory as an argument
- `make` build waLBerla
To specify a CMake option you need to use `-D(Option)=(Value)`. For example to set the C++ compiler one can use:
`cmake -DCMAKE_CXX_COMILER=clang++`
To list and modify the CMake options the `ccmake` tool can be used. Just call `ccmake .` in your **build** directory to see and change the
CMake options and variables.
Some important CMake variables:
- `WALBERLA_BUILD_WITH_CODEGEN` Enable pystencils code generation"
- `Python_ROOT_DIR` Specify the directory of the `python` executable. e.g. `~/miniconda/bin/`
- `MPI_HOME` Specify the base directory of the MPI installation.
- `WALBERLA_BUILD_WITH_PYTHON` Support for embedding Python
- `WALBERLA_BUILD_WITH_CUDA` Enable CUDA support
For a full list of CMake Option see the [CMakeLists.txt](CMakeLists.txt) file or use `ccmake` as described above.
### Codegen and Python
To use the `lbmpy`/`pystencils` code generation please install the packages with e.g. `pip3 install lbmpy` and specify the correct python
environment when calling CMake.
In previous versions of CMake one could use `PYTHON_EXECUTABLE` or `PYTHON_ROOT_DIR` (all upper case) to specify the python executable or
the directory. This does **NOT** work anymore. Please use `Python_ROOT_DIR`.
## Get involved
### Contributing
......@@ -45,12 +77,42 @@ Many thanks go to waLBerla's [contributors](AUTHORS.txt)
### Please cite us
If you use waLBerla in a publication, please cite the following article:
- 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.
If you use waLBerla in a publication, please cite the following articles:
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
Free-surface LBM:
- C. Schwarzmeier et al., *Comparison of free-surface and conservative Allen-Cahn phase-field
lattice Boltzmann method*. Journal of Computational Physics, 2023.
https://doi.org/10.1016/j.jcp.2022.111753
Allen-Cahn phase-field LBM
- M. Holzer et al., *Highly efficient lattice Boltzmann multiphase simulations of immiscible
fluids at high-density ratios on CPUs and GPUs through code generation*. The International Journal of High Performance Computing Applications, 2021.
https://doi.org/10.1177/10943420211016525
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
......
......@@ -2,37 +2,26 @@
# Benchmarks
if ( WALBERLA_BUILD_BENCHMARKS )
add_subdirectory ( benchmarks )
else ()
add_subdirectory ( benchmarks EXCLUDE_FROM_ALL )
endif()
# Tools
if ( WALBERLA_BUILD_TOOLS )
add_subdirectory ( tools )
else ()
add_subdirectory ( tools EXCLUDE_FROM_ALL )
endif()
# Tutorials
if ( WALBERLA_BUILD_TUTORIALS )
add_subdirectory ( tutorials )
else ()
add_subdirectory ( tutorials EXCLUDE_FROM_ALL )
endif()
# Showcases
if ( WALBERLA_BUILD_SHOWCASES )
add_subdirectory ( showcases )
else ()
add_subdirectory ( showcases EXCLUDE_FROM_ALL )
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()
waLBerla_add_executable( NAME WorkloadEvaluation FILES WorkloadEvaluation.cpp DEPENDS blockforest boundary core field lbm pe pe_coupling postprocessing stencil timeloop vtk )
waLBerla_add_executable( NAME WorkloadEvaluation FILES WorkloadEvaluation.cpp DEPENDS walberla::blockforest walberla::boundary walberla::core walberla::field walberla::lbm walberla::pe walberla::pe_coupling walberla::postprocessing walberla::stencil walberla::timeloop walberla::vtk )
if( WALBERLA_BUILD_WITH_PARMETIS )
waLBerla_add_executable( NAME AMRSedimentSettling FILES AMRSedimentSettling.cpp DEPENDS blockforest boundary core field lbm pe pe_coupling postprocessing stencil timeloop vtk )
endif()
\ No newline at end of file
waLBerla_add_executable( NAME AMRSedimentSettling FILES AMRSedimentSettling.cpp DEPENDS walberla::blockforest walberla::boundary walberla::core walberla::field walberla::lbm walberla::pe walberla::pe_coupling walberla::postprocessing walberla::stencil walberla::timeloop walberla::vtk )
waLBerla_add_executable( NAME AMRSettlingSphere FILES AMRSettlingSphere.cpp DEPENDS walberla::blockforest walberla::boundary walberla::core walberla::field walberla::lbm walberla::pe walberla::pe_coupling walberla::postprocessing walberla::stencil walberla::timeloop walberla::vtk )
......@@ -86,24 +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 boost::tuples::tuple<MO_CLI_T > BoundaryConditions_T;
typedef BoundaryHandling< FlagField_T, Stencil_T, BoundaryConditions_T > BoundaryHandling_T;
using BoundaryHandling_T = BoundaryHandling<FlagField_T, Stencil_T, MO_CLI_T>;
typedef boost::tuple<pe::Sphere, pe::Ellipsoid, pe::Plane> BodyTypeTuple;
using BodyTypeTuple = std::tuple<pe::Sphere, pe::Ellipsoid, pe::Plane>;
///////////
// FLAGS //
......@@ -150,7 +149,7 @@ BoundaryHandling_T * MyBoundaryHandling::operator()( IBlock * const block, const
BoundaryHandling_T::Mode mode = (useEntireFieldTraversal_) ? BoundaryHandling_T::Mode::ENTIRE_FIELD_TRAVERSAL : BoundaryHandling_T::Mode::OPTIMIZED_SPARSE_TRAVERSAL ;
BoundaryHandling_T * handling = new BoundaryHandling_T( "fixed obstacle boundary handling", flagField, fluid,
boost::tuples::make_tuple( MO_CLI_T ( "MO_CLI", MO_CLI_Flag, pdfField, flagField, bodyField, fluid, *storage, *block ) ),
MO_CLI_T ( "MO_CLI", MO_CLI_Flag, pdfField, flagField, bodyField, fluid, *storage, *block ),
mode);
// boundaries are set by mapping the planes into the domain
......@@ -464,8 +463,8 @@ int main( int argc, char **argv )
real_t domainHeight = real_c(ZCells) - topWallOffset;
real_t fluidVolume = real_c( XCells * YCells ) * domainHeight;
real_t solidVolume = solidVolumeFraction * fluidVolume;
uint_t numberOfParticles = uint_c(std::ceil(solidVolume / ( math::M_PI / real_t(6) * diameter * diameter * diameter )));
diameter = std::cbrt( solidVolume / ( real_c(numberOfParticles) * math::M_PI / real_t(6) ) );
uint_t numberOfParticles = uint_c(std::ceil(solidVolume / ( math::pi / real_t(6) * diameter * diameter * diameter )));
diameter = std::cbrt( solidVolume / ( real_c(numberOfParticles) * math::pi / real_t(6) ) );
auto densityRatio = real_t(2.5);
......@@ -683,15 +682,15 @@ int main( int argc, char **argv )
LatticeModel_T latticeModel = LatticeModel_T( lbm::collision_model::TRT::constructWithMagicNumber( omega ) );
// add PDF field
BlockDataID pdfFieldID = lbm::addPdfFieldToStorage< LatticeModel_T >( blocks, "pdf field (zyxf)", latticeModel,
BlockDataID pdfFieldID = lbm::addPdfFieldToStorage< LatticeModel_T >( blocks, "pdf field (fzyx)", latticeModel,
Vector3< real_t >( real_t(0) ), real_t(1),
uint_t(1), field::zyxf );
uint_t(1), field::fzyx );
// add flag field
BlockDataID flagFieldID = field::addFlagFieldToStorage<FlagField_T>( blocks, "flag field" );
// add body field
BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::zyxf );
BlockDataID bodyFieldID = field::addToStorage<BodyField_T>( blocks, "body field", nullptr, field::fzyx );
// add boundary handling & initialize outer domain boundaries
BlockDataID boundaryHandlingID = blocks->addStructuredBlockData< BoundaryHandling_T >(
......@@ -752,14 +751,14 @@ int main( int argc, char **argv )
// sweep for updating the pe body mapping into the LBM simulation
timeloop.add()
<< Sweep( pe_coupling::BodyMapping< BoundaryHandling_T >( blocks, boundaryHandlingID, bodyStorageID, globalBodyStorage, bodyFieldID, MO_CLI_Flag, FormerMO_Flag, pe_coupling::selectRegularBodies ), "Body Mapping" );
<< 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;
Reconstructor_T reconstructor( blocks, boundaryHandlingID, pdfFieldID, bodyFieldID);
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 >
( blocks, boundaryHandlingID, bodyStorageID, globalBodyStorage, bodyFieldID, reconstructor, FormerMO_Flag, Fluid_Flag, pe_coupling::selectRegularBodies, optimizeForSmallObstacleFraction ), "PDF Restore" );
( blocks, pdfFieldID, boundaryHandlingID, bodyStorageID, globalBodyStorage, bodyFieldID, reconstructor, FormerMO_Flag, Fluid_Flag, pe_coupling::selectRegularBodies, optimizeForSmallObstacleFraction ), "PDF Restore" );
shared_ptr<pe_coupling::BodiesForceTorqueContainer> bodiesFTContainer1 = make_shared<pe_coupling::BodiesForceTorqueContainer>(blocks, bodyStorageID);
std::function<void(void)> storeForceTorqueInCont1 = std::bind(&pe_coupling::BodiesForceTorqueContainer::store, bodiesFTContainer1);
......@@ -822,7 +821,7 @@ int main( int argc, char **argv )
}
real_t sphereVolume = diameter * diameter * diameter * math::M_PI / real_t(6);
real_t sphereVolume = diameter * diameter * diameter * math::pi / real_t(6);
Vector3<real_t> gravitationalForce( real_t(0), real_t(0), -(densityRatio - real_t(1)) * gravitationalAcceleration * sphereVolume );
timeloop.addFuncAfterTimeStep(pe_coupling::ForceOnBodiesAdder( blocks, bodyStorageID, gravitationalForce ), "Gravitational force" );
......@@ -868,7 +867,12 @@ int main( int argc, char **argv )
peTimer.emplace_back("Simulation Step.Collision Response Resolution.Collision Response Solving");
timerKeys.push_back(peTimer);
uint_t numCells, numFluidCells, numNBCells, numLocalParticles, numShadowParticles, numContacts;
uint_t numCells;
uint_t numFluidCells;
uint_t numNBCells;
uint_t numLocalParticles;
uint_t numShadowParticles;
uint_t numContacts;
numCells = uint_t(0);
numFluidCells = uint_t(0);
numNBCells = uint_t(0);
......
add_subdirectory( AdaptiveMeshRefinementFluidParticleCoupling )
add_subdirectory( CNT )
add_subdirectory( ComplexGeometry )
add_subdirectory( DEM )
add_subdirectory( MeshDistance )
add_subdirectory( CouetteFlow )
add_subdirectory( FreeSurfaceAdvection )
add_subdirectory( FluidizedBed )
add_subdirectory( FluidParticleCoupling )
add_subdirectory( FluidParticleCouplingWithLoadBalancing )
add_subdirectory( ForcesOnSphereNearPlaneInShearFlow )
add_subdirectory(Percolation)
add_subdirectory( GranularGas )
add_subdirectory( IntegratorAccuracy )
add_subdirectory( LennardJones )
add_subdirectory( NonUniformGrid )
add_subdirectory( MotionSingleHeavySphere )
add_subdirectory( PeriodicGranularGas )
add_subdirectory( PoiseuilleChannel )
add_subdirectory( ProbeVsExtraMessage )
add_subdirectory( SchaeferTurek )
add_subdirectory( UniformGrid )
add_subdirectory( UniformGridGPU )
if ( WALBERLA_BUILD_WITH_PYTHON )
add_subdirectory( FieldCommunication )
if ( WALBERLA_BUILD_WITH_CODEGEN )
add_subdirectory( UniformGridCPU )
add_subdirectory( PhaseFieldAllenCahn )
add_subdirectory( NonUniformGridCPU )
add_subdirectory( TurbulentChannel )
endif()
if ( WALBERLA_BUILD_WITH_CODEGEN AND WALBERLA_BUILD_WITH_GPU_SUPPORT )
add_subdirectory( UniformGridGPU )
add_subdirectory( NonUniformGridGPU )
endif()
endif()
This diff is collapsed.