From 3a77e88dd96cb58ab2b72c2317c80db21ac6efb3 Mon Sep 17 00:00:00 2001 From: Saveliy Borisov <94908850+Amazingkivas@users.noreply.github.com> Date: Tue, 14 May 2024 23:46:45 +0300 Subject: [PATCH] Create README.md --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..92161e1 --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +[![Build application](https://github.com/learning-process/ppc-2024-threads/actions/workflows/main.yml/badge.svg)](https://github.com/learning-process/ppc-2024-threads/actions/workflows/main.yml) + +# FDTD Method + +Finite-difference time-domain (FDTD) is a numerical analysis technique used for modeling computational electrodynamics. + +This repository contains a C++ project with the main implementation of the method. The following python script is used for testing and visualization: +* `PlotScript/visualization.py` +## Install packages + +``` +pip install pandas +pip install matplotlib +``` + +## Build the project with `CMake` + +* **Windows (MSVC)**: + + ``` + cd sln + cmake . + cmake --build . --config RELEASE + ``` +* **Linux (gcc)**: + + ``` + cd sln + cmake --build . --config RELEASE + ``` + +## Run and visualise + +![](https://github.com/Amazingkivas/FDTD_Method/blob/main/PlotScript/Animations/animation_Ex.gif) + +### Go to the folder +``` +cd PlotScript +``` + +### To run the method and save the data +* **Linux (gcc)**: + + ``` + python3 visualization.py --run_cpp --grid_size --iters_num + ``` +* **Windows (MSVC)**: + + ``` + python visualization.py --run_cpp --grid_size --iters_num + ``` +### To create an animation +* **Linux (gcc)**: + + ``` + python3 visualization.py --function animation + ``` +* **Windows (MSVC)**: + + ``` + python visualization.py --function animation + ``` +The result will be saved to a folder `PlotScript/animations` +### To create a heatmap +* **Linux (gcc)**: + + ``` + python3 visualization.py --function heatmap --iteration + ``` +* **Windows (MSVC)**: + + ``` + python visualization.py --function heatmap --iteration + ``` +The result will be saved to a folder `PlotScript/heatmap`