| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
gprMax is open source software that simulates electromagnetic wave propagation. It solves Maxwell's equations in 3D using the Finite-Difference Time-Domain (FDTD) method. gprMax was designed for modelling Ground Penetrating Radar (GPR) but can also be used to model electromagnetic wave propagation for many other applications.
gprMax is currently released under the GNU General Public License v3 or higher.
gprMax is principally written in Python 3 with performance-critical parts written in Cython. It includes a CPU-based solver parallelised using OpenMP, and a GPU-based solver written using the NVIDIA CUDA programming model.
If you use gprMax and publish your work we would be grateful if you could cite our work using:
For further information on referencing gprMax visit the Publications section of our website.
gprMax/
conda_env.yml
CONTRIBUTORS
docs/
gprMax/
gsoc/
LICENSE
README.rst
setup.cfg
setup.py
tests/
tools/
user_libs/
user_models/The following steps provide guidance on how to install gprMax:
You can watch screencasts that demonstrate the installation and update processes.
We recommend using Miniconda to install Python and the required Python packages for gprMax in a self-contained Python environment. Miniconda is a mini version of Anaconda which is a completely free Python distribution (including for commercial use and redistribution). It includes more than 300 of the most popular Python packages for science, math, engineering, and data analysis.
$ conda update conda
$ conda install git
$ git clone https://github.com/gprMax/gprMax.git
$ cd gprMax
$ conda env create -f conda_env.ymlThis will make sure conda is up-to-date, install Git, get the latest gprMax source code from GitHub, and create an environment for gprMax with all the necessary Python packages.
If you prefer to install Python and the required Python packages manually, i.e. without using Anaconda/Miniconda, look in the conda_env.yml file for a list of the requirements.
If you are using Arch Linux (https://www.archlinux.org/) you may need to also install wxPython by adding it to the conda environment file (conda_env.yml).
$ brew install gccAlternatively if you are using Windows 10/11 you can install the Windows Subsystem for Linux and then follow the Linux install instructions for gprMax. Note however that currently WSL does not aim to support GUI desktops or applications, e.g. Gnome, KDE, etc....
Once you have installed the aforementioned tools follow these steps to build and install gprMax:
(gprMax)$ python setup.py build
(gprMax)$ python setup.py installYou are now ready to proceed to running gprMax.
gprMax is designed as a Python package, i.e. a namespace which can contain multiple packages and modules, much like a directory.
Open a Terminal (Linux/macOS) or Command Prompt (Windows), navigate into the top-level gprMax directory, and if it is not already active, activate the gprMax conda environment conda activate gprMax.
Basic usage of gprMax is:
(gprMax)$ python -m gprMax path_to/name_of_input_fileFor example to run one of the test models:
(gprMax)$ python -m gprMax user_models/cylinder_Ascan_2D.inWhen the simulation is complete you can plot the A-scan using:
(gprMax)$ python -m tools.plot_Ascan user_models/cylinder_Ascan_2D.outYour results should like those from the A-scan from the metal cylinder example in introductory/basic 2D models section
When you are finished using gprMax, the conda environment can be deactivated using conda deactivate.
| Argument name | Type | Description |
|---|---|---|
| -n | integer | number of times to run the input file. This option can be used to run a series of models, e.g. to create a B-scan with 60 traces: (gprMax)$ python -m gprMax user_models/cylinder_Bscan_2D.in -n 60 |
| -gpu | flag/list | flag to use NVIDIA GPU or list of NVIDIA GPU device ID(s) for specific GPU card(s), e.g. -gpu 0 1 |
| -restart | integer | model number to start/restart simulation from. It would typically be used to restart a series of models from a specific model number, with the -n argument, e.g. to restart from A-scan 45 when creating a B-scan with 60 traces: (gprMax)$ python -m gprMax user_models/cylinder_Bscan_2D.in -n 15 -restart 45 |
| -task | integer | task identifier (model number) when running simulation as a job array on Open Grid Scheduler/Grid Engine. For further details see the parallel performance section of the User Guide |
| -mpi | integer | number of Message Passing Interface (MPI) tasks, i.e. master + workers, for MPI task farm. This option is most usefully combined with -n to allow individual models to be farmed out using a MPI task farm, e.g. to create a B-scan with 60 traces and use MPI to farm out each trace: (gprMax)$ python -m gprMax user_models/cylinder_Bscan_2D.in -n 60 -mpi 61. For further details see the parallel performance section of the User Guide |
| --mpi-no-spawn | flag | use MPI task farm without spawn mechanism. For further details see the parallel performance section of the User Guide |
| -benchmark | flag | switch on benchmarking mode. This can be used to benchmark the threading (parallel) performance of gprMax on different hardware. For further details see the benchmarking section of the User Guide |
| --geometry-only | flag | build a model and produce any geometry views but do not run the simulation, e.g. to check the geometry of a model is correct: (gprMax)$ python -m gprMax user_models/heterogeneous_soil.in --geometry-only |
| --geometry-fixed | flag | run a series of models where the geometry does not change between models, e.g. a B-scan where only the position of simple sources and receivers, moved using #src_steps and #rx_steps, changes between models. |
| --opt-taguchi | flag | run a series of models using an optimisation process based on Taguchi's method. For further details see the user libraries section of the User Guide |
| --write-processed | flag | write another input file after any Python code and include commands in the original input file have been processed. Useful for checking that any Python code is being correctly processed into gprMax commands. |
| -h or --help | flag | used to get help on command line options. |
(gprMax)$ git pull
(gprMax)$ python setup.py cleanall
(gprMax)$ python setup.py build
(gprMax)$ python setup.py installThis will pull the most recent gprMax source code form GitHub, remove/clean previously built modules, and then build and install the latest version of gprMax.
Periodically you should update conda and the required Python packages. With the gprMax environment deactivated and from the top-level gprMax directory, run the following commands:
$ conda update conda
$ conda env update -f conda_env.yml| Back | FazBrowse Home | New Git URL |