The library represents a parallel solver for the Stokes system through Boundary Element Methods. We have developed the software in C++ on top of many high performance libraries, the deal.II library for Finite Element Handling, the METIS project and Trilinos library for automatic Workload balance, OpenCASCADE for CAD integration, and deal2lkit for parameter handling.
We provide the following capabilities
- Read of the grid through an external file in one of the following formats (.prm, .msh, .vtk), the files specifies the kind of boundary condition to be applied on the nodes.
- Possibility of solving mixed boundary value problem aiming micromotility issyes.
- Recovery of both primal (velocity) and dual (Cauchy stresses) unknowns.
- Extensive tuning via parameter file using the deal2lkit library
We have subdivided the code in main classes to handle the many different aspects of a complete BEM simulation.
- BEMStokes. This class is in charge of organising the overall Stokes simulation. It has interfaces with all the other classes in order to perform a complete simulation.
- DirectPreconditioner. This class builds a preconditioner based on a direct factorisation of the system matrix provided by BEMStokes.
- FreeSurfaceStokesKernel. A stokes kernel for free surface interfaces
- StokesKernel. container for the Stokes fundamental solutions.
To install from scratch all the needed library you can look to the automatic installation procedure using spack developed by the deal.II authors.
To install from scratch all the needed library you can look to the automatic installation procedure provided by CANDI developed Uwe Köcher.
We provide the possibility of using Docker as a tool to provide a fully operational environment for our library. To use such tool you need to install Docker following the instructions provided by its authors. Then you can execute the following command line instruction
docker run -v `pwd`:/pwd_to_your_own_directory/ -i -t mathlab/deal2lkit:latest bash
to retrieve the environment. In such a shell you can easily compile the
In order to successfully compile the code you need
- to install the Trilinos and Metis wrappers of the library, see the official instructions
- to install the deal.II library allowing both for multiprocessors and multithreaded environment.
- to install the deal2lkit library allowing both for multiprocessors and multithreaded environment.
Follow the detailed instruction to install deal with METIS and Trilinos wrappers. We highlight that in order to fully exploit
- Download the latest version at OpenCASCADE
- Follow the instructions
- Download the latest version at METIS
- Follow the instructions for the correct installation of the package
-
Download the latest version at Trilinos
-
This is a possible configuration file
cmake -D Trilinos_ENABLE_OPTIONAL_PACKAGES:BOOL=ON \ -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=ON \ -D CMAKE_CXX_FLAGS:STRING="-O3" \ -D CMAKE_C_FLAGS:STRING="-O3" \ -D CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE \ -D Trilinos_VERBOSE_CONFIGURE:BOOL=FALSE \ -D TPL_ENABLE_MPI:BOOL=ON \ -D CMAKE_BUILD_TYPE:STRING=RELEASE \ -D Trilinos_ENABLE_Fortran:BOOL=ON \ -D BLAS_LIBRARY_NAMES:STRING="blas" \ -D BLAS_LIBRARY_DIRS:PATH=/usr/lib/libblas/ \ -D TPL_BLAS_LIBRARIES:PATH=/usr/lib/libblas/ \ -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING="" \ -D CMAKE_INSTALL_PREFIX:PATH=/usr/local/ \ -D BUILD_SHARED_LIBS:BOOL=ON ../ make install
-
if some packages create conflicts they can be disabled as seen on the Trilinos webpage
Follow the detailed instruction to install deal2lkit. We strongly recommend to install also the Open Asset Import library Assimp and to enable the deal2lkit features regarding such library.
Then you can clone the repository and compile it
git clone https://github.com/mathLab/BEMStokes.git cd BEMStokes
mkdir build
cd build
cmake ../
make -j4
After you have compiled your application, you can run
make test
or
ctest
to start the testsuite.
Take a look at https://www.dealii.org/developer/developers/testsuite.html for more information on how to create tests and add categories of tests.
If you want you can run a preliminary execution in the build library typing
mpirun -np 1 bem_stokes_2d
this will automatically generate the parameter file for the bi-dimensional run while
mpirun -np 1 bem_stokes_3d
will create a proper parameter file for a 3 dimensional simulation.
#Notice to developers
Before making a pull request, please make sure you run the script
./scripts/indent
from the base directory of this project, to ensure that no random white space changes are inserted in the repository.
The script requires Artistic Style Version 2.04 (astyle) to work properly.
#Licence
Please see the file LICENSE for details