From aedc4443663ec346da1332314d8f33db4508aa9b Mon Sep 17 00:00:00 2001 From: JanHab <jan.habscheid@rwth-aachen.de> Date: Fri, 7 Mar 2025 10:53:31 +0100 Subject: [PATCH] Update info in readme --- Dockerfile | 31 ----------- Dockerfile_ | 41 -------------- ...Problem_2_3.ipynb => 02_Problem_2_3.ipynb} | 0 README.md | 12 ++++ docker-compose.yml | 11 ---- gitlab-ci.yml | 55 ------------------- 6 files changed, 12 insertions(+), 138 deletions(-) delete mode 100644 Dockerfile delete mode 100644 Dockerfile_ rename Project2/src/{Problem_2_3.ipynb => 02_Problem_2_3.ipynb} (100%) delete mode 100644 docker-compose.yml delete mode 100644 gitlab-ci.yml diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 0106e1a..0000000 --- a/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -# Use Ubuntu 22.04 as the base image -# FROM ubuntu:25.04 -FROM ubuntu:latest - -# Metadata -# LABEL maintainer="Prakhar Sharma" -# LABEL version="1.0" -# LABEL description="Dockerised LyX" - -# Set environment variables to non-interactive (this prevents some prompts) -# ENV DEBIAN_FRONTEND==noninteractive - -# Install dependencies and LyX -RUN apt-get update -RUN apt-get install -y tzdata -y -RUN apt-get install -y imagemagick python3 -RUN apt-get install -y lyx -RUN apt-get install -y x11-apps fonts-lyx texlive-full -RUN rm -rf /var/lib/apt/lists/* - -# Modify ImageMagick policy to allow PDF operations (https://cromwell-intl.com/open-source/pdf-not-authorized.html) -RUN sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml - -# Set environment variable for display -ENV DISPLAY=unix:0.0 - -# Set the working directory (can be overridden in CI/CD pipeline) -WORKDIR /root - -# Start LyX -CMD ["lyx"] \ No newline at end of file diff --git a/Dockerfile_ b/Dockerfile_ deleted file mode 100644 index 9183641..0000000 --- a/Dockerfile_ +++ /dev/null @@ -1,41 +0,0 @@ -# Use the official Ubuntu base image -# FROM ubuntu:20.04 -FROM dockette/debian:buster-slim -# FROM alpine:latest - -# Set environment variables to avoid prompts during package installation -ENV DEBIAN_FRONTEND=noninteractive - -# Install dependencies for LyX -RUN apt update && apt-get install wget -y -# apt-get install software-properties-common -y - - -# # Install Python3 -# RUN apt install python3 -y -# # Install texlive # You can change it to texlive-full if you want to install all packages -# RUN apt install texlive -y -# # # Install tex-common version -# # RUN apt install tex-common -y -# RUN wget http://ftp.de.debian.org/debian/pool/main/t/tex-common/tex-common_6.18_all.deb -# RUN dpkg -i tex-common_6.18_all.deb -# # Install lyx-common -# RUN wget http://ftp.de.debian.org/debian/pool/main/l/lyx/lyx-common_2.4.1-2~bpo12+1_all.deb -# RUN dpkg -i lyx-common_2.4.1-2~bpo12+1_all.deb -# # Install deb file -# RUN wget http://ftp.de.debian.org/debian/pool/main/l/lyx/lyx_2.4.1-2~bpo12+1_arm64.deb -# RUN dpkg -i lyx_2.4.1-2~bpo12+1_arm64.deb - -# Install stable version via PPA -# Get LyX repository key -# RUN add-apt-repository ppa:lyx-devel/release -y -# update so that apt is aware of the new PPA -# RUN apt-get update -y -# install LyX from the PPA -# RUN apt-get install lyx -y - -# Set the working directory (can be overridden in CI/CD pipeline) -WORKDIR /root - -# Default command when container runs -CMD ["bash"] diff --git a/Project2/src/Problem_2_3.ipynb b/Project2/src/02_Problem_2_3.ipynb similarity index 100% rename from Project2/src/Problem_2_3.ipynb rename to Project2/src/02_Problem_2_3.ipynb diff --git a/README.md b/README.md index 744ca2e..dab1fc6 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,18 @@ Open the Notebook `main.ipynb` to see all the calculations in a single notebook. The source code to this is stored in the file `System.py` in the class `System`. Furthermore, a finite element approximation with the open-source software FEniCSx was used and implemented in `FEniCS.py`. +Find the report written with the tool "LyX" in "Project1/LyX" + +### Project 2 +Go to the folder "Project2/src". +The python file `SystemGeneric.py` includes the python implementation of the mathematical formulation with a solver and visualizations. +`Example.ipynb` shows two two first examples (with different initial distributions) not included in the final report. +`01_A_First_Example.ipynb` includes a first example for the scalar conservation law. +`02_Problem_2_3.iynb` shows the solution for problem 2.3 with a convergence analysis and `03_Traffic_Flow_Problem.ipynb` shows the solution to the full traffic flow problem. + +Find the report written with the tool "LyX" in "Project2/LyX" + + ## Contact ### Author diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 6b31027..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,11 +0,0 @@ -services: - solver: - build: - context: . - dockerfile: Dockerfile - volumes: - - .:/root/solver - stdin_open: true # Equivalent to -i for interactive mode - tty: true # Equivalent to -t for a terminal interface - command: ["/bin/bash"] - diff --git a/gitlab-ci.yml b/gitlab-ci.yml deleted file mode 100644 index d060d9c..0000000 --- a/gitlab-ci.yml +++ /dev/null @@ -1,55 +0,0 @@ -image: docker:20.10.16 # Define the Docker image - -stages: # Define stages in the pipeline - - prepare - - build - - deploy - -prepare: - stage: prepare - tags: - - docker - services: - - docker:20.10.16-dind - before_script: - - echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin - script: - - docker pull $CI_REGISTRY_IMAGE:latest || true - - docker build - --cache-from $CI_REGISTRY_IMAGE:latest - --tag $CI_REGISTRY_IMAGE:latest . - - docker push $CI_REGISTRY_IMAGE:latest - - -# job to build html -html: - stage: build - tags: docker - script: # Export the lyx files to xhtml - - lyx --export xhtml Project1/lyx/main.lyx - - lyx --export xhtml Project2/lyx/main.lyx - artifacts: # Store the resulting xhtml files - paths: - - Project1/lyx/main.xhtml - - Project2/lyx/main.xhtml - expire_in: 12 month # Optional: keep the artifacts for 12 months - -# job to deploy -pages: - stage: deploy - dependencies: - - html - image: - name: $CI_REGISTRY_IMAGE:latest - entrypoint: [""] - tags: - - docker - script: - - mv Project1/lyx/main.xhtml public - - mv Project1/lyx/main.xhtml public - artifacts: - paths: - - public # Files in the "public" folder will be deployed to GitLab Pages - only: - - main # Only deploy if the changes are in the default branch - -- GitLab