Magix3d, is an interactive software dedicated to block-structured hex meshing. It provides many interactive tools to design blocks. It also give access to basic functionalities to build CAD models.
This project is part of the magix3d ecosystem and conforms to its CI policy.
The following graph shows the dependencies between magix3d and other LIHPC-CG projects. The red square nodes are external products: they are downloaded, built and installed in cmake-cgcore
docker image (not with apt install
). The black round nodes are LIHPC-CG projects.
This graph is built from the explicit Cmake dependencies specified in the ci
presets of each project (see CMakePresets.json
file).
Prerequisite: podman
or docker
is installed on your system.
Note: On Windows platforms install podman on your WSL Linux rather than directly on the Windows system to prevent from display connection problem.
Want to test magix3d ? Just:
- Download image
podman pull ghcr.io/lihpc-computational-geometry/spack-magix3d:latest
- Launch container
podman run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device /dev/dri ghcr.io/lihpc-computational-geometry/spack-magix3d:latest
The current magix3d version relies on Spack for the installation procedure and is limited to run on ubuntu 22.02.
In order to install magix3d and its dependencies on ubuntu 22.02, you can open a terminal and run the next command lines (see https://github.com/LIHPC-Computational-Geometry/spack_recipes/blob/main/build_spack.sh , it contains more detailed comments):
#==========================================
#get spack engine
git clone --depth=1 -b v0.20.1 https://github.com/spack/spack.git
#==========================================
#get CEA LIHPC meshing recipes
git clone https://github.com/LIHPC-Computational-Geometry/spack_recipes.git
#==========================================
# configure spack with our recipes
cp spack_recipes/config/packages.yaml spack/etc/spack/
cp spack_recipes/config/repos.yaml spack/etc/spack/defaults/repos.yaml
source ./spack/share/spack/setup-env.sh
spack clean -a
spack compiler find
spack external find cmake
#==========================================
# to install the latest release of magix3d
spack install magix3d+smooth3d+triton2+doc ^vtk-maillage~opengl2+qt~mpi ^hdf5~mpi ^cgns~mpi ^mesquite~mpi
# to build the current main branch
# git clone https://github.com/LIHPC-Computational-Geometry/magix3d.git
# spack install magix3d+smooth3d+triton2+doc dev_path=$PWD/magix3d build_type=Debug ^vtk-maillage~opengl2+qt~mpi ^hdf5~mpi ^cgns~mpi ^mesquite~mpi
Remark: Spack stores some data in your home (see ~/.spack
). If you use spack for installing
multiple libraries and software, it can be necessary to delete this directory to avoid conflicts
during the installation procedure.
Just a few words to explain the previous command lines:
- The first line downloads the version of spack we rely on.
- The second line downloads the specific spack recipes we have for our meshing projects.
- The third block of lines configures spack for installing magix3d on your computer. When it is done, check that a c++ compiler was found.
- Eventually, the last block of lines clones magix3d source code and install it locally with the specified variants.
There are many options to develop with clion. We just provide one here. The last command of the previous
script has compiled the magix3d source code into magix3d/
. In particular, it has generated the file named
magix3d/spack-build-env.txt
. You are going to source this file in a terminal, and then run clion from this terminal.
When opening magix3d
in clion, you will then have to add some compilation flags. For development purpose, we advise
to use the following ones:
-DWITH_DOC=OFF -DWITH_COV=ON
With this CMake options, you may get two CMake targets:
test_link
that runs the python test suite, that is located intest_link/
directory. This target requires to find the programpytest
code_cover
that runs the code coverage. The code coverage requires only to build the target and not to run it. This target requires to find the programlcov
. Once ran, it will generate a html report that will be located in you build directory incode_cover\index.html
.