FLIP Fluids is a production-grade Blender addon for liquid simulation, integrating a custom C++ FLIP (Fluid Implicit Particle) engine with a comprehensive Python UI. The engine implements advanced numerical methods including level sets, variational pressure solvers, PCG with MIC(0) preconditioning, force fields, whitewater particles, and viscosity solvers, all backed by a vendored Eigen linear algebra library. The Blender addon provides property groups, UI panels, preset management, material libraries, and command-line scripts for baking, rendering, and Alembic/USD export. The architecture is a hybrid: the C++ engine is compiled as a shared library and accessed via C bindings and Python ctypes wrappers, while the addon code follows standard Blender patterns (operators, panels, property groups). Key entry points include the baking operators, simulation domain properties, and the engine's Python bindings in `ffengine/`. External dependencies include Blender (4.5+), Eigen, and optionally Mixbox for color blending. The codebase is well-structured with extensive version compatibility layers, but the vendored Eigen and reliance on Blender's evolving API introduce moderate technical drift.
CppNumericalSolvers is a header-only C++17 library for numerical optimization that provides a suite of modern solvers for both unconstrained and constrained problems. The library features a sophisticated expression template system for building complex objective functions, implementations of popular algorithms like L-BFGS, BFGS, and Newton's method, and advanced constrained optimization via the Augmented Lagrangian method. It uses Eigen3 as its sole dependency for linear algebra operations and is designed for easy integration into other projects. The architecture is modular with separate components for function interfaces, solvers, line searches, and utilities, all leveraging C++ templates for flexibility and performance.
This repository provides **NEC2++**, a from-scratch C++ implementation of the Numerical Electromagnetics Code (NEC-2), a well-known Method of Moments (MoM) solver for wire and patch antenna simulation. The code is distributed as a standalone command-line tool (`nec2++`), a shared library (`libnecpp`) with a stable C API, and Python bindings (separate repository `python-necpp`). It reads standard NEC-2 input files (`.nec`) and produces output files with radiation patterns, impedances, near fields, and structure currents. The library is designed for embedding into optimization systems and GUI applications, supporting large models with tens of thousands of segments. Architecturally, the simulation is driven by a `nec_context` class that orchestrates geometry construction (via `c_geometry`), matrix assembly using Eigen's dense linear algebra, network solving, and result extraction. Input parsing uses an ANTLR 4 grammar to handle the free-format NEC card syntax, with a table-driven handler dispatch replacing a large switch statement. The ground model includes Sommerfeld/Norton integrals, implemented in both C (direct Fortran translation) and C++ wrappers. The codebase is well-tested, with a comprehensive test harness comparing outputs against the original Fortran NEC-2 and a C port (`nec2c`), plus unit tests using Catch2. The repository is actively maintained (last commit in 2026, recent PRs fixing bugs and adding features), uses C++17, and bundles a known version of Eigen (v3.4) for linear algebra, avoiding external BLAS/LAPACK dependencies. While the code has some legacy C sections and occasional commented-out dead code, the overall architecture is clean and extensible. Notable reusable components include the ANTLR grammar for parsing structured free-form input, the wire intersection algorithm in `nec_wire.h`, and the ground parameter abstraction in `nec_ground.h`.