How tudo-math-ls3/feat3 works
Based on our analysis of the file tree and the README file, FEAT3 is a modular, open‐source finite element analysis library written in standard C++17. It is specialized for solving the incompressible Navier–Stokes equations (and related problems) using both conforming and non‐conforming finite element techniques. In addition, the project is designed for parallel execution (using MPI) and for offloading computations to GPUs via CUDA. The system is organized into several key components such as the core “kernel” (which is subdivided into numerous modules like assembly, analytic, geometry, cubature, solver, space, etc.), “control” modules (which include configuration settings, domain and time control, and mesh optimization settings), and numerous “applications” which serve as both demonstration and benchmark codes.
Main Components
• Kernel Library (Core Computational Engine):
– This includes submodules for assembly, analytic functions, geometry, cubature, solver routines, finite element spaces, transformation (trafo), mesh optimization, and other utilities.
• Control and Configuration:
– Modules dealing with domain control, time management, solver checkpointing, and various simulation settings.
• Applications & Benchmarks:
– Separate simulation applications (under “applications”, “area51”, “tutorials”) that use the kernel and control modules to set up and run simulations.
• Build System and Third-Party Integration:
– The build configuration (using CMake and custom configure scripts), third-party libraries (MPI, CUDA, MKL, etc.), and integration with external solver packages.
• Tools and Utilities:
– Mesh tools, matrix utilities, and I/O utilities (in the “tools”, “doxy_in”, and “test_system” directories) that support pre- and postprocessing as well as testing.
Relationships and Interactions
• The “applications” layer is built on top of the kernel and control libraries. These applications call into various solver routines and mesh handling functions to simulate physical problems.
• The “kernel” is the core where low-level numerical algorithms (assembly, cubature, analytic evaluation, geometry construction, etc.) reside. Internal dependencies exist – for example, the solver often depends on the assembly and geometry modules.
• The “control” module orchestrates simulation aspects like configuring the domain, applying boundary conditions, time stepping, and organizing checkpointing and statistics. It interfaces directly with both the kernel and the application layer.
• The build system and configuration layer integrate external dependencies (MPI, CUDA, third-party libraries) with the compile-time setup of the software. They ensure that the appropriate modules are built with the correct flags.
• Tools and utilities support these components by providing mesh generation, file conversion, visualization (VTK, SVG/EPS export), and additional debugging functions.
Important Architectural Patterns and Design Principles
• Modularity: Each major functionality (e.g., geometry, solver, assembly, control) is developed as a separate module; this separation is clearly reflected in the directory structure.
• Layered Architecture: There is a clear layering from the low-level kernel routines to the mid-level control configuration and finally to the high-level simulation applications and tools.
• Extensibility: The design shows the use of “factory” and “assembler” patterns in several subsystems (e.g., in the assembly and solver directories) which facilitate plugging in different algorithms or solver strategies.
• Platform-Specific Optimizations: The system supports MPI for distributed computations and uses CUDA offloading for accelerator-based performance in critical code paths.
Relevant Technologies and Frameworks
• C++17 as the programming language.
• CMake for configuring and building the project.
• MPI for parallel scale-out execution.
• CUDA for GPU-based acceleration.
• Integration with third-party libraries such as MKL, Hypre, SuperLU, and Zoltan (conditional on build options).