FASTSolver is a comprehensive scientific computing framework designed for high-performance numerical solutions, computational fluid dynamics (CFD), linear algebra operations, and scientific visualization.
- Linear algebra operations
- Iterative solvers (GMRES, CG)
- Multi-grid methods
- ODE solvers
- Newton Method for Nonlinear Systems
- Solves nonlinear systems of equations
- Supports custom Jacobian computation
- Integration with GMRES for linear system solving
- Convergence checks
- Lattice Boltzmann Method (LBM)
- D2Q9 and D3Q19 models
- Various boundary conditions
- Immersed Boundary Method (IBM)
- Flow visualization
- Performance monitoring
- VTK output generation
- Real-time flow visualization
- Performance metrics logging
- C++17 or higher
- CMake 3.15+
- Python 3.9+ (optional)
Clone the repository and run the setup script:
git clone https://github.com/Yin169/FASTSolver.git
cd FASTSolver
bash script_test.sh
For Python installation:
cd FASTSolver
python setup.py install
Here's an example of how to use the FASTSolver
module in Python:
import fastsolver as fs
A = fs.SparseMatrix(2, 2)
A.addValue(0, 0, 4.0)
A.addValue(0, 1, 1.0)
A.addValue(1, 0, 1.0)
A.addValue(1, 1, 3.0)
A.finalize()
b = fs.Vector(2)
b[0] = 1.0
b[1] = 2.0
x = fs.Vector(2)
x[0] = 0.0
x[1] = 0.0
amg = fs.AlgebraicMultiGrid()
levels = 2
smoothing_steps = 10
theta = 0.5
amg.amgVCycle(A, b, x, levels, smoothing_steps, theta)
print("Solution x:", [x[i] for i in range(x.size())])
FASTSolver
├── Doxyfile
├── LICENSE
├── README.md
├── application
│ ├── LatticeBoltz
│ │ └── LBMSolver.hpp
│ ├── Mesh
│ │ └── MeshObj.hpp
│ └── PostProcess
│ └── Visual.hpp
├── code
│ ├── test.ipynb
│ └── test.py
├── conanfile.txt
├── data
│ ├── Chem97ZtZ
│ │ └── Chem97ZtZ.mtx
│ └── Chem97ZtZ.tar
├── examples
│ ├── CylinderFlow.cpp
│ ├── JetFlow_2D.cpp
│ └── JetFlow_3D.cpp
├── python
│ └── pybind.cpp
├── script_test.sh
├── src
│ ├── Intergal
│ │ └── GaussianQuad.hpp
│ ├── LinearAlgebra
│ │ ├── Factorized
│ │ │ └── basic.hpp
│ │ ├── Krylov
│ │ │ ├── ConjugateGradient.hpp
│ │ │ ├── GMRES.hpp
│ │ │ └── KrylovSubspace.hpp
│ │ ├── Preconditioner
│ │ │ ├── LU.hpp
│ │ │ └── MultiGrid.hpp
│ │ └── Solver
│ │ └── IterSolver.hpp
│ ├── ODE
│ │ └── RungeKutta.hpp
│ ├── Obj
│ │ ├── DenseObj.hpp
│ │ ├── MatrixObj.hpp
│ │ ├── SparseObj.hpp
│ │ └── VectorObj.hpp
│ ├── PDEs
│ │ └── SpectralElementMethod.hpp
│ └── utils.hpp
└── test
├── ConjugateGradient_test.cpp
├── GMRES_test.cpp
├── GaussianQuad_test.cpp
├── KrylovSubspace_test.cpp
├── LBMSolver_test.cpp
├── LU_test.cpp
├── MeshObj_test.cpp
├── MultiGrid_test.cpp
├── RungeKutta_test.cpp
├── SparseMatrixCSCTest.cpp
├── SpectralElementMethod_test.cpp
├── Visual_test.cpp
├── basic_test.cpp
├── debuglogger.cpp
├── demo.cpp
├── itersolver_test.cpp
├── matrix_obj_test.cpp
├── test.cpp
└── testfile.cpp
Contributions are welcome! Feel free to fork the repository and submit a pull request.
- Fork the project
- Create a feature branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature-branch
) - Open a Pull Request
This project is licensed under the MIT License.
- Pybind11 for seamless C++ and Python integration
- Community contributions to numerical methods and solvers
If you use FASTSolver in your research, please cite it as follows:
@software{FASTSolver2024,
author = {NG YIN CHEANG},
title = {FASTSolver: High-Performance Scientific Computing Framework},
year = {2024},
url = {https://github.com/Yin169/FASTSolver}
}