If you want to modify or experiment with a tutorial, you can do so by copying it to the users_modules
source directory. This will make the tutorial an independent user module, allowing you to work with it freely. Follow these steps:
- Copy the tutorial: Use the following command to copy the tutorial to your
users_modules
directory:
cp -r ~/mofem_install/mofem-cephas/mofem/tutorials/vec-0 ~/mofem_install/mofem-cephas/mofem/users_modules/my_vec_0
- Copy file: which will indicate that copied tutorial is a module:
cp ~/mofem_install/mofem-cephas/mofem/users_modules/cmake/InstalledAddModule.tmp ~/mofem_install/mofem-cephas/mofem/users_modules/my_vec_0/InstalledAddModule.cmake
- Rebuild the CMake configuration: Change to the user modules build directory:
Then, rebuild the cache by running:
- Compile the code: Simply run make to compile the code:
Then, test the code by running:
Now, you can experiment with the code in your copied tutorial.
- Enjoy! Start exploring and making modifications to your independent user module.