How newton-raphson/spm2025 works
This project is a high‐performance simulation framework (dendrite-kt) built in C++ that targets multi-dimensional computations (2D, 3D, 4D and experimental IBM modes) for solving partial differential equations via finite element methods in parallel. It tightly couples various external scientific libraries (PETSc for solving sparse linear systems via MPI, BLAS/LAPACK for linear algebra, libconfig for reading simulation parameters, etc.), and its internal structure is organized into multiple submodules covering geometry, mesh management, boundary handling, traversal algorithms, and checkpointing.
Main Components
• Build and Configuration Layer:
– CMake build scripts, toolchain configuration (using mpicc and mpicxx), and custom CMake modules (in the “cmake-modules” folder).
– Support for conditional builds (e.g. ENABLE_2D, ENABLE_3D, ENABLE_4D, IBM mode, TENSOR assembly) that indicate how the build is tuned.
• External Dependencies:
– PETSc (with inherent MPI support and an integrated build process) that is the backbone for parallel sparse solver routines.
– libconfig (for parsing configuration files with simulation parameters).
– BLAS, LAPACK, LAPACKE (for optimized linear algebra operations).
– Other external libraries (e.g., Dendro-KT, talylite, ray_tracing) that supplement or extend functionality via external modules in “external/”.
• Core Internal Modules:
– Core Simulation and Numerical Kernels: modules in “src” and “include” follow a modular design with directories for Boundary, Checkpoint, Geometry, Mesh, PETSc interfacing, SubDA (domain decomposition), and Traversal algorithms.
– These modules coordinate to set up the simulation domain, load parameters, construct the finite element mesh, apply boundary conditions, and carry out the solve (using PETSc’s solvers internally).
– Data structure headers (as seen under “include/”) define common types (e.g. Node and Mesh data, equations, vector/matrix operations) that are used across modules.
• Example and Testing Suites:
– A large “examples” directory with multiple simulation cases and regression tests (for SSHT, transient heat, various benchmarks, etc.) that demonstrate the functionality and help ensure the system remains stable.
– The “test” directory contains unit/regression tests (with CMakeLists.txt and dedicated source files) which validate simulation correctness.
• Projects and Specialized Applications:
– The “projects” directory hosts derivative projects (DeepTrace, Elasticity-SBM, variants of Navier-Stokes solvers, etc.) that build on the dendrite-kt framework.
– These projects show how the core modules can be extended or combined to tackle different simulation and analysis tasks.
• Supporting Scripts and Tools:
Lay Out Interactions and Data Flow
• At initialization, configuration files (processed via libconfig) supply simulation parameters that drive the setup.
• The build layer (CMake) organizes conditional compilation, linking the various modules and specifying external dependency paths.
• The core simulation modules (Mesh, Geometry, Boundary, and Traversal) ingest the simulation parameters to build the computational domain.
• When the simulation runs, PETSc (leveraging MPI) orchestrates the solution of sparse systems generated by the finite element discretization.
• Input/output functionalities (under IO/VTU, PETSc/IO, etc.) package simulation results for visualization or further post-processing.
• Regression tests (in examples and test directories) automatically invoke simulation runs and compare outputs against reference data.
Final Checklist
• Clearly labelled components for:
– Build/Configuration (CMake, toolchain, environment variables like PETSC_DIR, PETSC_ARCH, LIBCONFIG_DIR)
– External dependencies: PETSc with MPI, libconfig, BLAS, LAPACK, and any other external libraries.
– Core simulation modules (e.g., Geometry, Mesh, Boundary, Checkpoint, SubDA, Traversal).
– Examples/Regression Tests.
– Specialized projects/applications.
• Details like compile flags (e.g., ENABLE_2D/3D/4D switches) are captured as annotations that explain optional features.