In order to use provided python utils package it is stronlgy recommended to use Anaconda package.
Clone this project along with nanocpp-src to your local workstation.
$ git clone https://gitlab.kaust.edu.sa/primalight/nanocpp-extras
$ git clone https://gitlab.kaust.edu.sa/primalight/nanocpp-src
The nanocpp-src folder contains all core functionality of the NANOCPP code, which written in C++.
The nanocpp-utils contains two folders: utils and examples. Utils folder provides an auxiliary python functions you may need. The examples folder contains all executable examples from this tutotial.
Since NANOCPP has been written on C++, you need C++ language compiler along with MPI. In case you are using workstation provided bu KAUST , it is recommend to add the following strings to your .bashrc file
in order to specify right gcc-mpi combination. Please make sure to substitute “path-to” with your actual path.
After you have completed this step, you can compile C++ source code by typing
Now you’re ready to launch simulations and start the other tutorials. The NANOCPP FIRST SIM is the most common starting point, and provides the basic functions needed run FDTD simulations with the NANOCPP package.
- NANOCPP FIRST SIM: the tutorial covers basic functionalities of NANOCPP package.
- NANOCPP UTILS: the tutorial covers auxillary python wrapping libraries.
- DISPERSION: the tutorial covers basic usage of dispersion in NANOCPP simulations.
Note: remember to recompile with make clean every time a change is made in compilation parameters in input.txt.
PYTHON SETTING (Ananconda users)
It is recommend to create a separate virtual environment for this tasks. To do that, simply create an environment from provided ‘prima.yml’ file by typing
conda env create -f prima.yml
in your shell. The final step is to add utils folder to the PYTHONPATH variable: