Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Amazingkivas authored May 14, 2024
1 parent 01596aa commit 3a77e88
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions README.md
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`

0 comments on commit 3a77e88

Please sign in to comment.