Run the scripts in the 'install_external_libs' folder then:
mkdir build && cd build
cmake ..
cmake --build . -j$(nproc)
To provide a custom path to the petsc, gmsh (optional) or mpi (optional) folder use:
cmake .. -DPETSC_PATH=/yourpath/petsc -DGMSH_PATH=/yourpath/gmsh -DMPI_PATH=/yourpath/mpi
It may be convenient to use the cmake GUI:
cmake-gui
Simulation projects are located under simulations
.
In order to create a new simulation:
- Copy
simulations/default
folder with different name. Let's say that the new folder issimulations/newsim
- Replace target name
default
with the new one insimulations/newsim/CMakeLists.txt
- Add line
add_subdirectory(newsim)
tosimulations/CMakeLists.txt
- Build as usual. Executable file will be located in
build/simulations/newsim
folder