Getting NekMesh
Below is a set of instructions for installation and build of NekMesh on your computer. We support Linux, macOS and Windows.
NekMesh is built on and ships with the [Nektar++ spectral element framework](https://www.nektar.info/). However, for those interested only in NekMesh and not the wider Nektar++ framework, on this site we provide a number of smaller, NekMesh-only source and binary packages.Docker
Easiest way for you to start using NekMesh is through Docker Images or Virtual Boxes, where we would have already setup the environments with all dependencies installed. If you're running [Docker](https://www.docker.com), you can grab a complete version of _Nektar++_ including _NekMesh_, from Dockerhub:
docker pull nektarpp/nektar
Binaries and source code
The more advanced way, but also giving you more capabilities is by using one of our binary packages for Linux, macOS and Windows. If you prefer to build NekMesh as a standalone package, you can do this from the provided sources. The _NekMesh_ source can be checked out from [our git repository](https://gitlab.nektar.info/). For compilation instructions, blah blah
git clone https://gitlab.nektar.info/nektar/nektar.git
By building it from source you ensure to have our most recent capabilities, bug fixes and
extensions with third-party libraries.
Building from Source
Depending on your experience with building open-source software, this might be straight-forward or take some time. Here we provide a short recommendation on the steps and flags that you should turn on during the compilation process, to get the most of NekMesh.To build NekMesh from source, follow these steps:
1. Install Dependencies
First, install the required dependencies:
On Linux (Ubuntu/Debian):
sudo apt install cmake libboost-all-dev libtinyxml-dev build-essential vtk
On macOS (using Homebrew):
brew install cmake boost tinyxml vtk
2. Configure Build
Create a build directory and configure with CMake:
mkdir build
cd build
cmake -DNEKTAR_BUILD_UTILITIES=ON \
-DNEKTAR_BUILD_MESHUTILS=ON \
-DNEKTAR_USE_CCACHE=ON \
-DNEKTAR_USE_MESHGEN=ON \
-DNEKTAR_USE_CCM=ON \
-DNEKTAR_USE_OPENCASCADE=ON \
..
3. Build and Install
Compile and install the software:
make -j 4
make install
Important CMake Flags
NEKTAR_BUILD_UTILITIES=ON- Enables building of utilities including NekMeshNEKTAR_BUILD_MESHUTILS=ON- Builds mesh manipulation utilitiesNEKTAR_USE_MPI=ON- Enables parallel processing supportNEKTAR_USE_SCOTCH- Enables SCOTCH partitioning supportNEKTAR_USE_PETSC- Enables PETSc solver supportNEKTAR_USE_HDF5- Enables HDF5 file format support
After installation, verify the unit and functional Ctests are passed:
ctest
You should be ready to use NekMesh with executable in:
../nektar/build/dist/bin/NekMesh
../nektar/build/dist/bin/FieldConvert (PostProcessing utility)
Create your alias for Linux/MacOS system (Terminal).
vi ~/.zshrc (MacOS) / vi ~/.bashrc (Linux)
alias NekMesh='..path../nektar/build/dist/bin/NekMesh' (Add Alias)
alias FieldConvert='..path../nektar/build/dist/bin/FieldConvert' (Add Alias)
:wq + Enter (to save and exit the VIM file)
Check NekMesh is installed - should print you the available modules.
NekMesh -l