All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
BACKEND_SCALAR,BACKEND_SIMD,BACKEND_OMP,BACKEND_CUDAconstantsbackend_is_available(backend)- Check if backend is available at runtimebackend_get_name(backend)- Get human-readable backend namelist_solvers_by_backend(backend)- List solvers for specific backendget_available_backends()- List all available backend names
calculate_field_stats(data)- Compute min, max, avg, sum for a fieldcompute_velocity_magnitude(u, v, nx, ny)- Compute velocity magnitude fieldcompute_flow_statistics(u, v, p, nx, ny)- Comprehensive flow statistics
- Python exception hierarchy:
CFDError,CFDMemoryError,CFDInvalidError,CFDIOError,CFDUnsupportedError,CFDDivergedError,CFDMaxIterError raise_for_status(status_code, context)- Raise appropriate exception for status codes- Exception classes integrate with Python standard exceptions (e.g.,
CFDMemoryErrorinherits fromMemoryError)
SIMD_NONE,SIMD_AVX2,SIMD_NEONconstantsget_simd_arch()- Get SIMD architecture constantget_simd_name()- Get SIMD architecture name ("avx2", "neon", "none")has_avx2(),has_neon(),has_simd()- Check CPU SIMD capabilitiescreate_grid_stretched(nx, ny, xmin, xmax, ymin, ymax, beta)- Stretched grid with hyperbolic cosine distribution
- Dual-variant wheel builds supporting both CPU-only and CUDA-enabled configurations
- Matrix build strategy in CI for separate CPU and CUDA wheel artifacts
- Support for CFD library v0.1.6 modular backend libraries
- Comprehensive README with full API reference
- 15 example scripts demonstrating cfd_python features:
basic_example.py: Fundamental usage of all main functions with CFD conceptslid_driven_cavity.py: Classic CFD benchmark problemlid_driven_cavity_advanced.py: Cavity simulation with convergence monitoringchannel_flow.py: Poiseuille flow with parabolic inlet and analytical validationparameter_study.py: Running parameter studies and comparisonsvtk_output.py: VTK output for ParaView visualizationoutput_formats.py: Exporting to VTK and CSV formatsvisualization_numpy.py: NumPy analysis of simulation resultsvisualization_matplotlib.py: Matplotlib plots (contours, vectors, streamlines, 3D Rankine vortex)solver_discovery.py: Discovering and using different solverssolver_comparison.py: Backend performance comparison and benchmarkingbackend_detection.py: CPU feature and backend availability detectionboundary_conditions.py: Boundary condition API usage patternsderived_fields.py: Computing velocity magnitude and flow statisticserror_handling.py: Error handling best practices
- Physics explanations in all examples (Navier-Stokes, CFL condition, Reynolds number, etc.)
- All examples write output to
examples/output/directory (gitignored) - New test suites:
test_backend_availability.py- Backend constants and functionstest_derived_fields.py- Statistics and velocity magnitudetest_errors.py- Exception classes and raise_for_statustest_cpu_features.py- SIMD detection and grid stretchingtest_abi_compatibility.py- NULL handling and stress tests
- Updated build system to link modular CFD libraries (cfd_api, cfd_core, cfd_scalar, cfd_simd, cfd_omp, cfd_cuda)
- Migrated to CUDA 12.0.0 from 12.6.2 for better stability and compatibility
- Switched from
uv pipto standardpipfor wheel installation in CI tests - Updated CMakeLists.txt to use GNU linker groups on Linux for circular dependency resolution
- Example output files now written to dedicated
examples/output/subdirectory
- CMake library detection for CFD v0.1.6 static builds
- Wheel installation compatibility with Python stable ABI (abi3) wheels
- Removed non-standard wheel filename modifications for PEP 427 compliance
- CUDA toolkit installation by installing GCC 11 before CUDA on Linux
- Simplified CUDA toolkit installation by removing sub-packages parameter
- Test code style: moved pytest imports to module level for consistency
- Lid-driven cavity example convergence tracking now shows meaningful evolution
- Exception constructor parameter order in error_handling.py example
- Cross-platform compatibility for all example scripts
- Initial Python bindings for CFD library v0.1.5
- Core simulation API bindings (create, step, destroy)
- Solver registry and solver creation
- Grid management functions
- Boundary condition API (periodic, neumann, dirichlet, noslip, inlet, outlet)
- Backend selection for boundary conditions (scalar, SIMD, OpenMP, CUDA)
- Error handling API
- Basic test suite
- GitHub Actions CI/CD pipeline
- Updated to CFD library v0.1.5 API (context-bound registry, new type names)
- Migrated from bundled headers to system-installed CFD library
- Python 3.9+ support using stable ABI (abi3)
- Static linking of CFD library into extension module
- NumPy integration for array handling
- scikit-build-core for modern build system