Make RBF sampler work in both serial and parallel modes.
Facilitate ghost points distribution/collection and ghost point matrix construction.
Functionalised ghost point related activities.
Updated C and Fortran wrappers on the new RBF API.
Removes the Eigen library dependency.
Established MUI built-in linear algebra namespace, i.e. mui::linalg, with sparse matrix system, two linear system solvers (Gaussian Elimination direct solver and Conjugate Gradient iterative solver), and three preconditioners (Incomplete LU preconditioner, Incomplete Cholesky Preconditioner, Symmetric Successive Over-Relaxation Preconditioner).
The conjugate gradient solver is based on Algorithm 1 of the following paper:
Igor Baratta, Chris Richardson, and Garth Wells. "Performance analysis of matrix-free conjugate gradient kernels using SYCL." International Workshop on OpenCL. 2022.
The conjugate gradient solver can be worked in both w/o preconditioner mode and with one of the preconditioner modes.
The "linalg" folder contains three base files (matrix.h, solver.h and preconditioner.h) with implementations in separate files, which makes it easy to maintain and easy to extend in the long run.
Add unit test code (a separate folder named “test”) to verify arithmetic operations, manipulations and decompositions of the sparse matrix, verify matrix file I/O and verify GE solver and different combinations of preconditioner and CG by comparing calculated results with reference results.
Add ReadMe.md file for the mui::linalg folder.
Verifications:
The RBF sampler is verified by MUI demo 7-pseudo-diffusion. Both conservative mode and consistent mode have been tested.
The arithmetic operations of the mui::linalg sparse matrix system have been verified by the matrix.cpp code in the “test” folder. More specifically: matrix addition, matrix subtraction, matrix multiplication, matrix transpose, matrix I/O (includes print matrix to the console and matrix file I/O in CSV format), LU decomposition and QR decomposition.
The mui::linalg Gaussian Elimination solver and Conjugate Gradient solver have been verified with reference results by the solver.cpp code in the “test” folder. The following modes have been verified: TEST_0: CG Solver w/o Preconditioner & w/o Initial matrix Guess; TEST_1: CG solver with ILU Preconditioner & w/o Initial matrix Guess; TEST_2: CG solver with SSOR Preconditioner & w/o Initial matrix Guess; TEST_3: CG solver with IC Preconditioner & with Initial matrix Guess, TEST_4: CG solver with multi-dimensional matrix, TEST_5: GE solver, TEST_6: GE solver with multi-dimensional matrix.
Future works:
Generalise ghost cell functions, so that to enable other samplers/algorithms to access and use it.
Since the RBF sampler is no longer special compared with other samplers, some pieces of code like below can be removed.
If define RBF:
Do this;
else:
Do that;
Since RBF sampler has changed its API, corresponding lines in the Python wrapper have to be changed accordingly (C and Fortran wrappers have been changed already in this PR).
What has been done:
Make RBF sampler work in both serial and parallel modes.
Removes the Eigen library dependency.
Verifications:
Future works: