... | ... | @@ -3,20 +3,76 @@ The source code is published here as free and open-source under the same license |
|
|
### Windows
|
|
|
|
|
|
Building the binaries from source is not straightforward on Windows because several dependencies are required and they should be first installed on the system. We do not provide the user with detailled information about how to install these dependencies but rather a few comments on each one:
|
|
|
* [Gmsh](https://gmsh.info/): this library provides the pre- and post-processing functions. It also gives us access to the values of Jacobians, shape functions, Gauss quadrature data, etc.
|
|
|
* [Eigen](https://eigen.tuxfamily.org/): this library is used fopr the linear algebra in C++
|
|
|
* [Python](https://www.python.org/) with the following packages:
|
|
|
* [Gmsh](https://gmsh.info/): this library provides the pre- and post-processing functions. It also gives us access to the values of Jacobians, shape functions, Gauss quadrature data, etc. Gmsh-SDK should be uncompressed in a dedicated folder; then the `INCLUDE`, `LIB`, `PYTHONPATH` and `PATH` environment varibales should be set to `path2gmsh\include`, `path2gmsh\lib`, `path2gmsh\bin`, `path2gmsh\bin` respectively.
|
|
|
* [Eigen](https://eigen.tuxfamily.org/): this library is used for the linear algebra in C++. Installation consists in extracting the source code of Eigen into a dedicated folder, then adding this folder to the `INCLUDE` environment variable.
|
|
|
* [Python](https://www.python.org/) with the following packages installed from PyPI with `pip install`:
|
|
|
* [PyQt5](https://pypi.org/project/PyQt5/)
|
|
|
* [numpy](https://pypi.org/project/numpy/)
|
|
|
* [VTK](https://pypi.org/project/vtk/)
|
|
|
* [CMake](https://cmake.org/):
|
|
|
* [SWIG](https://www.swig.org/):
|
|
|
* [Intel OneAPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/) (not mandatory): this high-performance library adds the Pardiso Solver for solving the linear system of equations in parallel (shared-memory parllelism). This is one of the fastest direct solver available.
|
|
|
* [CMake](https://cmake.org/): installed from the official installer and added to the `PATH`.
|
|
|
* [SWIG](https://www.swig.org/): the binaries are uncompressed to a specific folder which should be added to the `PATH`.
|
|
|
* [Intel OneAPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/) (not mandatory): this high-performance library adds the Pardiso Solver for solving the linear system of equations in parallel (shared-memory parllelism). This is one of the fastest direct solver available. See [envs/win-msvc.cmd](https://gitlab.uliege.be/rboman/fossils/-/blob/master/envs/win-msvc.cmd) or [envs/win-mingw64.cmd](https://gitlab.uliege.be/rboman/fossils/-/blob/master/envs/win-mingw64.cmd) for an example of how to set the Math Kernel Library environment before the build.
|
|
|
|
|
|
The build procedure also requires a suitable C++ compiler: 2 compilers have been successfully tested on Windows:
|
|
|
* [Microsoft Visual Studio](https://visualstudio.microsoft.com/)
|
|
|
* [MinGW-w64](https://www.mingw-w64.org/)
|
|
|
* [MinGW-w64](https://www.mingw-w64.org/): the [mingw-builds](https://www.mingw-w64.org/downloads/#mingw-builds) version is recommended.
|
|
|
They can be easily installed from their respective website. Their build environment should be run prior starting the build procedure (see [envs/win-msvc.cmd](https://gitlab.uliege.be/rboman/fossils/-/blob/master/envs/win-msvc.cmd) or [envs/win-mingw64.cmd](https://gitlab.uliege.be/rboman/fossils/-/blob/master/envs/win-mingw64.cmd))
|
|
|
|
|
|
|
|
|
### Windows + Visual Studio
|
|
|
|
|
|
```
|
|
|
git clone git@gitlab.uliege.be:rboman/fossils.git
|
|
|
cd fossils
|
|
|
envs\win-msvc.cmd
|
|
|
cd cxxfem
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake ..
|
|
|
cmake --build . --config Release
|
|
|
cd ..\..
|
|
|
fossils.py
|
|
|
```
|
|
|
The critical part is the `cmake ..` command. Check the output if it fails and fix your environment is something is not found (add folders to include files, libaries or executables to `INCLUDE`, `LIB` and `PATH` respectively), then retry until evrything is found.
|
|
|
|
|
|
It is possible to build the code without Intel OneAPI with the following command:
|
|
|
```
|
|
|
cmake -DFEM_USE_MKL=OFF ..
|
|
|
```
|
|
|
Python modules are only required at runtime. Use `pip install` to install the missing dependencies if something is not found.
|
|
|
|
|
|
|
|
|
### Windows + MinGW
|
|
|
|
|
|
The build procedure is similar to the one used with Visual Studio. The same libraries can be used with both compilers.
|
|
|
```
|
|
|
git clone git@gitlab.uliege.be:rboman/fossils.git
|
|
|
cd fossils
|
|
|
envs\win-mingw64.cmd
|
|
|
cd cxxfem
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake -G "MinGW Makefiles" ..
|
|
|
cmake --build . -- -j 4
|
|
|
cd ..\..
|
|
|
fossils.py
|
|
|
```
|
|
|
|
|
|
### Linux
|
|
|
|
|
|
The build has been successfully tested on Ubuntu 20.04LTS and should be rather easy to perform on any other Linux distribution.
|
|
|
|
|
|
The [Dockerfile](https://gitlab.com/rboman_docker/gmsh_python/-/blob/main/Dockerfile) used for the GitLab CI of this repository shows how to install the various dependencies.
|
|
|
|
|
|
Then, the build commands are similar to the ones used on Windows:
|
|
|
```
|
|
|
git clone git@gitlab.uliege.be:rboman/fossils.git
|
|
|
cd fossils
|
|
|
cd cxxfem
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake ..
|
|
|
make -j 4
|
|
|
cd ../..
|
|
|
./fossils.py
|
|
|
``` |