Sparse solver for Laplace equation using technology of data compression (HSS) based on singular value decomposition
We solve Laplace equation with Dirichlet boundary conditions on the grid n1 x n2 x n3 points for the domain xl x yl x zl with HSS technique for matrix compression.
The core of all functionalities for working with compressed HSS matrices is impelmented by using LAPACK and BLAS functions from Intel Math Kernel Library.
Test in main.cpp is working in a following way. The known solution is generated by function u_ex(). Then we check how correct we has constructed coefficient matrix as: ||A * u_ex - F_ex|| < eps.
If test is passed, we run the solver for matrix A and right hand side F.
In the output we compare the relative norm of the solutuon as: ||u_ex - u_sol|| / ||u_ex|| < eps.
The two version of solver is enabled: a) with storing the result of factorization in the array G of double b) with storing the result of factorization in the set of structures Gstr, which is defined in the definitions.h
The second variant, also, is supported by storing the initial coefficient matrix A in sparse CSR format to save memory.
Compilation is prefered with Intel Compiler (on Linux) icc -O2 -xHost -qopenmp -o a.out main.cpp functions.cpp Tests.cpp BinaryTrees.cpp Queue.cpp
Run: ./a.out