Skip to content

Conversation

@Nikhil-4595
Copy link

@Nikhil-4595 Nikhil-4595 commented Nov 25, 2025

Gitlab username: nikhilnl

This PR provides the complete configuration required for the exercise: Let's Fight With CMake, Docker, and Some Dependencies.

Key additions:

  • Added Dockerfile based on Ubuntu 24.04 with all required dependencies: Boost, deal.II, and manual installation of yaml-cpp v0.6.3.
  • Implemented CMakeLists.txt integrating:
    • Boost filesystem
    • deal.II FEM macros (initialize + setup target)
    • yaml-cpp (found via find_library and linked explicitly)
    • Project sources and include directories
  • Updated main.cpp to enable all dependency-based features (FEM solver, Boost flatset, filesystem inspection, YAML parsing).
  • Added .gitignore and .dockerignore to exclude build artifacts.

The resulting Docker image builds successfully and running the container allows executing to compile and run the full program, producing correct outputs including via deal.II.

Steps to build and run the container

  1. Build the Docker image from the repository root:
docker build -t cmake-exercise .
  1. Start an interactive container from the built image:
docker run -it cmake-exercise
  1. Inside the container, go to the project directory (this is set as the working directory in the Dockerfile, but the directory is shown explicitly for clarity):
cd /workspace/cmake-exercise
  1. Clean any previous build directory (optional but recommended when testing):
rm -rf build
  1. Run the provided build_and_run.sh script, which will:

    • Create the build directory
    • Run CMake configuration
    • Compile the executable
    • Run the program with the config.yml file from yamlParser
./build_and_run.sh

Expected output

When build_and_run.sh completes successfully inside the container, the program output should look similar to this:

Let's fight with CMake, Docker, and some dependencies!

Solve Poisson problem with FEM using deal.II
FEM results available in `solution.vtk`. Try visualizing with Paraview.

Modify a flat set using boost container
Elements in s1: 1    2    3    4    

Inspect the current directory using boost filesystem
"." is a directory containing:
    "CMakeCache.txt"
    "CMakeFiles"
    "Makefile"
    "cmake_install.cmake"
    "main"
    "solution.vtk"

Parse some yaml file with yaml-cpp
  ../yamlParser/config.yml
Version: 1.2.3

This commit provides the complete configuration required for the exercise:
Let's Fight With CMake, Docker, and Some Dependencies.

Key additions:
- Added Dockerfile based on Ubuntu 24.04 with all required dependencies:
  Boost, deal.II, and manual installation of yaml-cpp v0.6.3.
- Implemented CMakeLists.txt integrating:
  * Boost filesystem
  * deal.II FEM macros (initialize + setup target)
  * yaml-cpp (found via find_library and linked explicitly)
  * Project sources and include directories
- Updated main.cpp to enable all dependency-based features
  (FEM solver, Boost flatset, filesystem inspection, YAML parsing).
- Added .gitignore and .dockerignore to exclude build artifacts.

The resulting Docker image builds successfully and running the container
allows executing  to compile and run the full program,
producing correct outputs including  via deal.II.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant