-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01596aa
commit 3a77e88
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <grid size> --iters_num <iterations number> <component> | ||
``` | ||
* **Windows (MSVC)**: | ||
|
||
``` | ||
python visualization.py --run_cpp --grid_size <grid size> --iters_num <iterations number> <component> | ||
``` | ||
### To create an animation | ||
* **Linux (gcc)**: | ||
|
||
``` | ||
python3 visualization.py --function animation <component for analysis> | ||
``` | ||
* **Windows (MSVC)**: | ||
|
||
``` | ||
python visualization.py --function animation <component for analysis> | ||
``` | ||
The result will be saved to a folder `PlotScript/animations` | ||
### To create a heatmap | ||
* **Linux (gcc)**: | ||
|
||
``` | ||
python3 visualization.py --function heatmap --iteration <iteration number> <component> | ||
``` | ||
* **Windows (MSVC)**: | ||
|
||
``` | ||
python visualization.py --function heatmap --iteration <iteration number> <component> | ||
``` | ||
The result will be saved to a folder `PlotScript/heatmap` |