This is a C++ based library for finite element problems that are foremost solved with domain decomposition methods. FEDDLib is short for Finite Element and Domain Decomposition Library. The FEDDLib is based in large parts on the open source library Trilinos and uses CMake with TriBITS (repository on GitHub) as its build system. A Doxygen documentation is hosted at feddlib.github.io/FEDDLib.
In order to install the FEDDLib, you need to have an installed Trilinos version that can be linked against. The FEDDLib repository contains a link to a specific commit of the Trilinos repository as a git submodule. This commit serves as a reference, a version of Trilinos that the current state of the FEDDLib (its branch develop) has been tested against.
Help for an installation of Trilinos can be found in the doc folder.
Trilinos contains its own direct solver KLU2 in Amesos2. As a result, you are not required to install any additional direct solvers (e.g., PardisoMKL, UMFPACK, MUMPS). The following Trilinos dependencies need to be installed: METIS, ParMETIS, BOOST, BLAS.
The most important CMake configuration flags for Trilinos are
-D Trilinos_ENABLE_Teuchos:BOOL=ON \ # Smart pointers and other tools
-D Trilinos_ENABLE_Tpetra:BOOL=ON \ # Linear algebra backend (matrices, vectors etc.)
-D Trilinos_ENABLE_Belos:BOOL=ON \ # Iterative linear solver
-D Trilinos_ENABLE_Amesos2:BOOL=ON \ # Direct solver
-D Trilinos_ENABLE_NOX:BOOL=ON \ # Nonlinear solver
-D Trilinos_ENABLE_Zoltan2:BOOL=ON \ # Graph partitioning
-D Trilinos_ENABLE_Thyra:BOOL=ON \ # Abstract linear algebra (linear operator etc.)
-D Trilinos_ENABLE_ShyLU_DDFROSch:BOOL=ON \ # Preconditioner (Overlapping Schwarz)
-D Trilinos_ENABLE_Stratimikos:BOOL=ON \ # Abstract interface to preconditioners etc.
To install the FEDDLib, HDF5 needs to be installed as a direct dependency. Note that HDF5 itself depends on the compression library z. MUMPS also depends on zlib (or zlib-ng). There is a risk of and a risk in mixing different z libraries, depending on how the dependencies are installed.
HDF5 is a required dependency of the FEDDLib, which means that it does not have to be specifically enabled via CMake flags.
-D TPL_ENABLE_Trilinos:BOOL=ON \
-D Trilinos_INCLUDE_DIRS:PATH=$TRILINOS_DIR/include \
-D Trilinos_LIBRARY_DIRS:PATH=$TRILINOS_DIR/lib \
Check your Trilinos installation folder if the library was placed in the lib or the lib64 folder and make the corresponding adjustment above ($TRILINOS_DIR/lib vs. $TRILINOS_DIR/lib64).
The FEDDLib has an optional dependency on an interface to AceGEN. To enable its use and installation, you can use the following CMake flags and adapt them to your setup.
-D TPL_ENABLE_AceGENInterface:BOOL=ON \
-D TPL_AceGENInterface_LIBRARIES:STRING=" "\
-D TPL_AceGENInterface_INCLUDE_DIRS:STRING=" "\
-
Mesh
- As a starting point, a discretization of the physical domain is needed. FEDDLib provides functionalities to read meshes that are written in the INRIA mesh format (
.mesh) that is used by Medit. For mesh generation, one can use, for example, Gmsh and export to an.meshfile directly. A post-processing step is required, however, to set the flags of vertices. Alternatively, Gmsh's internal msh format can be converted to.meshfiles (seemeshes/Msh2Mesh/for a MATLAB and Python script). Various meshes are included in the directorymeshes.
- As a starting point, a discretization of the physical domain is needed. FEDDLib provides functionalities to read meshes that are written in the INRIA mesh format (
-
Simulation
- The FEDDLib contains assembly routines for specific model problems such as the Poisson equation, linear and nonlinear elasticity, a Stokes problem, the (transient) Navier-Stokes equations, or fluid-structure interaction problems; see
feddlib/problems/testsandfeddlib/problems/example. The user can select one of these problem types and perform simulations for their computational domain adjusting the parameter files accordingly (seedoc/parameterFilesfor a documentation on parameters). - To change the boundary conditions of a model problem, e.g.,
feddlib/problems/tests/stokes/, one has to modify the corresponding main file and set the desired boundary condition, e.g., the no-slip condition, corresponding to a specific boundary flag in the mesh. The code must then be rebuilt. - The simulation can then be run from the command line via
mpirun -np N ./problem_name.exe. In the case of parallel computations, the partitioning into N subdomains corresponding to N MPI ranks is done automatically.
- The FEDDLib contains assembly routines for specific model problems such as the Poisson equation, linear and nonlinear elasticity, a Stokes problem, the (transient) Navier-Stokes equations, or fluid-structure interaction problems; see
-
Visualization