PLEASE NOTE THIS PROJECT IS UNDER DEVELOPMENT SO CURRENTLY YOU MAY NOT BE ABLE TO FIND SUFFICIENT INFORMATION
PLEASE CHECK EXAMPLE FILES UNDER THE EXAMPLE FOLDER
suanPan is a finite element method (FEM) simulation platform for applications in solid mechanics, civil/structural/seismic engineering, etc. The name suanPan (in some places such as suffix also it is abbreviated as suPan) comes from the term Suan Pan (算盤), which is Chinese abacus. suanPan is written in high quality C++ code and is targeted to provide an efficient, concise and reliable FEM simulation platform.
suanPan is partially influenced by popular (non-)commercial FEA packages, such as ABAQUS UNIFIED FEA, ANSYS and OpenSees.
Documentation is available.
The highlights of suanPan are
The binaries are pre-compiled with OpenBLAS on both Windows and Ubuntu via CI. Please download the file by visiting release page.
Linux users can obtain the binaries via snap. The snap supports visualization.
In order to enable GPU support which requires available MAGMA libraries and visualization support which requires VTK libraries, users have to compile the program by them own.
On Windows, to add file associations with .sp and .supan files, please run the AddAssociation.bat file with admin privilege.
As suanPan uses new language features, please use compilers that support C++17 standard. For example,
On Ubuntu, the external libraries are compiled with GCC 7.5 using binutils 2.30. On Windows, all libraries are compiled as dynamic libraries with GCC 10.1 in MinGW-w64. To avoid any potential linking error, please use later versions. WinLibs also provides an easy to use toolkit.
The software is deliberately designed to disable the backward compatibility. suanPan uses CMake to manage builds.
The package is tested under Windows with MSVC++ and GNU GCC. The libraries (only 64-bit, no 32-bit support anymore) currently used:
are bundled with the source code package.
The solution file under MSVC can be compiled directly. The Release and Debug configurations use external OpenBLAS. The Release-MKL uses Intel MKL, magma and VTK. The Release-GPU further uses CUDA to offload sparse matrix solving on GPUs. To successfully build Release-MKL and Release-GPU, you need to set VTK_INC and VTK_LIB variables that point to correct location of your VTK distribution. Simply hit Build (F7) to build the solution. You can change the linked library to other equivalent libraries such as Intel MKL manually, if those libraries are available. The bundled OpenBLAS is compiled with GCC 10.1 and dynamic architecture. If it does not work on your machine, please compile your own version. To do so, you may need to download MSYS, or Cygwin with necessary packages such as gcc and perl.
The compiled program cannot run directly as it depends on other dynamic libraries. Please copy all dynamic link library into the path that can be found by the program.
1/Libs/gcc-win/*.dllIn addition, the TBB libraries shall be copied as well since by default multithreading is enabled.
xxxxxxxxxx31/Libs/vs/tbb.dll2/Libs/vs/tbbmalloc.dll3/Libs/vs/tbbmalloc_proxy.dllThe VS solution can also be generated via CMake.
The solution under MSVC folder currently pairs Visual Studio 2019.
You are highly recommended to compile your own version of OpenBLAS as the shipped one may not be optimal on your machine.
Use CMake to generate Makefiles, assume current folder is the root of the package and your are using MinGW, the commands should look like this.
xxxxxxxxxx41# current folder is /suanPan-source-code-path2mkdir cmake-build && cd cmake-build3cmake -G "MinGW Makefiles" ..4makeFor MSYS, you may change the generator to "MSYS Makefiles". The GUI may be a better tool for beginners to configure the build. There are several options provided to build the software with different configurations.
After successful compilation, the executable file is under /cmake-build folder. The dynamic libraries should also be copied.
xxxxxxxxxx41# current folder is cmake-build2cp ../Libs/gcc-win/*.dll .3# run the program4./suanPan.exeAgain, the shipped OpenBLAS may not work on your platform, please compile your own library if any error occurs.
Make sure the compilers are installed.
xxxxxxxxxx11sudo apt install gcc g++ gfortran binutils cmakePlease do check the versions of those tools. A default configuration is enough for most cases if the platform is not too old. Simply create a build folder next to the source code folder and configure/make the program, such as
xxxxxxxxxx51# current folder is /suanPan-source-code-path2mkdir cmake-build3cd cmake-build4cmake ../suanPan5makeThe multi-threaded version uses TBB, the corresponding path can be added.
xxxxxxxxxx51# current folder cmake-build2LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../Libs/gcc-linux3export LD_LIBRARY_PATH4# run the program5./suanPanAdditional libraries that are used in suanPan are
Additional tools may be used by suanPan, they are
Those libraries may depend on the libraries that are used in the project, such as