diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 378e2caa..4856985b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,6 +5,14 @@ # Required version: 2 +build: + os: ubuntu-22.04 + tools: + python: "mambaforge-22.9" + jobs: + post_create_environment: + - python -m pip install sphinx_rtd_theme + conda: environment: conda_env.yml @@ -17,5 +25,4 @@ python: sphinx: configuration: docs/source/conf.py -formats: - - pdf + diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..6e73e568 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,126 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +codeofconduct@globalsecuritydatabase.org. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. diff --git a/CREDITS b/CREDITS index 387a4e10..506c8bf2 100644 --- a/CREDITS +++ b/CREDITS @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This is the official list of entities and people who have contributed to gprMax diff --git a/gprMax/cmds_geometry/add_grass.py b/gprMax/cmds_geometry/add_grass.py index 9ad23844..3fa7a9f9 100644 --- a/gprMax/cmds_geometry/add_grass.py +++ b/gprMax/cmds_geometry/add_grass.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/add_surface_roughness.py b/gprMax/cmds_geometry/add_surface_roughness.py index ea1cb7f4..0880c3b8 100644 --- a/gprMax/cmds_geometry/add_surface_roughness.py +++ b/gprMax/cmds_geometry/add_surface_roughness.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/add_surface_water.py b/gprMax/cmds_geometry/add_surface_water.py index af3d8eab..93f60e0f 100644 --- a/gprMax/cmds_geometry/add_surface_water.py +++ b/gprMax/cmds_geometry/add_surface_water.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/box.py b/gprMax/cmds_geometry/box.py index 9ca1b0ba..1544f7e5 100644 --- a/gprMax/cmds_geometry/box.py +++ b/gprMax/cmds_geometry/box.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/build_templates.py b/gprMax/cmds_geometry/build_templates.py index 211511cd..e3298917 100644 --- a/gprMax/cmds_geometry/build_templates.py +++ b/gprMax/cmds_geometry/build_templates.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/cmds_geometry.py b/gprMax/cmds_geometry/cmds_geometry.py index 0e4f28c3..00c19529 100644 --- a/gprMax/cmds_geometry/cmds_geometry.py +++ b/gprMax/cmds_geometry/cmds_geometry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/cone.py b/gprMax/cmds_geometry/cone.py index 18c745bd..c8f53219 100644 --- a/gprMax/cmds_geometry/cone.py +++ b/gprMax/cmds_geometry/cone.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/cylinder.py b/gprMax/cmds_geometry/cylinder.py index 0e85fd2a..d29c015f 100644 --- a/gprMax/cmds_geometry/cylinder.py +++ b/gprMax/cmds_geometry/cylinder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/cylindrical_sector.py b/gprMax/cmds_geometry/cylindrical_sector.py index e30b4c28..40a9e0ce 100644 --- a/gprMax/cmds_geometry/cylindrical_sector.py +++ b/gprMax/cmds_geometry/cylindrical_sector.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/edge.py b/gprMax/cmds_geometry/edge.py index 5ee68d29..e6a0ca88 100644 --- a/gprMax/cmds_geometry/edge.py +++ b/gprMax/cmds_geometry/edge.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/ellipsoid.py b/gprMax/cmds_geometry/ellipsoid.py index 08ade3cb..dc4f16a1 100644 --- a/gprMax/cmds_geometry/ellipsoid.py +++ b/gprMax/cmds_geometry/ellipsoid.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/fractal_box.py b/gprMax/cmds_geometry/fractal_box.py index 2a4c5100..d89bd346 100644 --- a/gprMax/cmds_geometry/fractal_box.py +++ b/gprMax/cmds_geometry/fractal_box.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/geometry_objects_read.py b/gprMax/cmds_geometry/geometry_objects_read.py index 5e104476..b156e8a9 100644 --- a/gprMax/cmds_geometry/geometry_objects_read.py +++ b/gprMax/cmds_geometry/geometry_objects_read.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/plate.py b/gprMax/cmds_geometry/plate.py index 79811cca..8ac92cb2 100644 --- a/gprMax/cmds_geometry/plate.py +++ b/gprMax/cmds_geometry/plate.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/sphere.py b/gprMax/cmds_geometry/sphere.py index 44ffa9ed..185cac80 100644 --- a/gprMax/cmds_geometry/sphere.py +++ b/gprMax/cmds_geometry/sphere.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_geometry/triangle.py b/gprMax/cmds_geometry/triangle.py index 56823e3b..714524c2 100644 --- a/gprMax/cmds_geometry/triangle.py +++ b/gprMax/cmds_geometry/triangle.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_multiuse.py b/gprMax/cmds_multiuse.py index ed015864..b151cb9a 100644 --- a/gprMax/cmds_multiuse.py +++ b/gprMax/cmds_multiuse.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cmds_singleuse.py b/gprMax/cmds_singleuse.py index 263060db..42d7cbed 100644 --- a/gprMax/cmds_singleuse.py +++ b/gprMax/cmds_singleuse.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/config.pxd b/gprMax/config.pxd index 653171b9..cdd76ac7 100644 --- a/gprMax/config.pxd +++ b/gprMax/config.pxd @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/config.py b/gprMax/config.py index c50e3d65..2ab11051 100644 --- a/gprMax/config.py +++ b/gprMax/config.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/contexts.py b/gprMax/contexts.py index 4e389259..67bbaa48 100644 --- a/gprMax/contexts.py +++ b/gprMax/contexts.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cuda_opencl/knl_fields_updates.py b/gprMax/cuda_opencl/knl_fields_updates.py index 8b0a7836..c9ccb73a 100644 --- a/gprMax/cuda_opencl/knl_fields_updates.py +++ b/gprMax/cuda_opencl/knl_fields_updates.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cuda_opencl/knl_pml_updates_electric_HORIPML.py b/gprMax/cuda_opencl/knl_pml_updates_electric_HORIPML.py index 48492b58..7382504c 100644 --- a/gprMax/cuda_opencl/knl_pml_updates_electric_HORIPML.py +++ b/gprMax/cuda_opencl/knl_pml_updates_electric_HORIPML.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cuda_opencl/knl_pml_updates_electric_MRIPML.py b/gprMax/cuda_opencl/knl_pml_updates_electric_MRIPML.py index 3a33aab3..e56788ee 100644 --- a/gprMax/cuda_opencl/knl_pml_updates_electric_MRIPML.py +++ b/gprMax/cuda_opencl/knl_pml_updates_electric_MRIPML.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cuda_opencl/knl_pml_updates_magnetic_HORIPML.py b/gprMax/cuda_opencl/knl_pml_updates_magnetic_HORIPML.py index 22f55911..c16b48ff 100644 --- a/gprMax/cuda_opencl/knl_pml_updates_magnetic_HORIPML.py +++ b/gprMax/cuda_opencl/knl_pml_updates_magnetic_HORIPML.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cuda_opencl/knl_pml_updates_magnetic_MRIPML.py b/gprMax/cuda_opencl/knl_pml_updates_magnetic_MRIPML.py index 48c18e46..384738d4 100644 --- a/gprMax/cuda_opencl/knl_pml_updates_magnetic_MRIPML.py +++ b/gprMax/cuda_opencl/knl_pml_updates_magnetic_MRIPML.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cuda_opencl/knl_snapshots.py b/gprMax/cuda_opencl/knl_snapshots.py index 2a1e1989..07addd30 100644 --- a/gprMax/cuda_opencl/knl_snapshots.py +++ b/gprMax/cuda_opencl/knl_snapshots.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cuda_opencl/knl_source_updates.py b/gprMax/cuda_opencl/knl_source_updates.py index 85203c32..8ee43ecb 100644 --- a/gprMax/cuda_opencl/knl_source_updates.py +++ b/gprMax/cuda_opencl/knl_source_updates.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cuda_opencl/knl_store_outputs.py b/gprMax/cuda_opencl/knl_store_outputs.py index bbf66552..85371903 100644 --- a/gprMax/cuda_opencl/knl_store_outputs.py +++ b/gprMax/cuda_opencl/knl_store_outputs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/fields_updates_dispersive_template.jinja b/gprMax/cython/fields_updates_dispersive_template.jinja index 74ddc4bf..eac7601a 100644 --- a/gprMax/cython/fields_updates_dispersive_template.jinja +++ b/gprMax/cython/fields_updates_dispersive_template.jinja @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/fields_updates_hsg.pyx b/gprMax/cython/fields_updates_hsg.pyx index 075ea4de..878999ee 100644 --- a/gprMax/cython/fields_updates_hsg.pyx +++ b/gprMax/cython/fields_updates_hsg.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/fields_updates_normal.pyx b/gprMax/cython/fields_updates_normal.pyx index 43c20fbd..6eb8fae9 100644 --- a/gprMax/cython/fields_updates_normal.pyx +++ b/gprMax/cython/fields_updates_normal.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/fractals_generate.pyx b/gprMax/cython/fractals_generate.pyx index cdf25c73..7ae2c4db 100644 --- a/gprMax/cython/fractals_generate.pyx +++ b/gprMax/cython/fractals_generate.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. @@ -27,7 +27,7 @@ cpdef void generate_fractal2D( int nx, int ny, int nthreads, - int b, + float D, np.float64_t[:] weighting, np.float64_t[:] v1, np.complex128_t[:, ::1] A, @@ -38,7 +38,7 @@ cpdef void generate_fractal2D( Args: nx, ny: int for fractal surface size in cells. nthreads: int for number of threads to use - b: int for constant related to fractal dimension. + D: float for fractal dimension. weighting: memoryview for access to weighting vector. v1: memoryview for access to positional vector at centre of array, scaled by weighting. @@ -59,7 +59,7 @@ cpdef void generate_fractal2D( # Calulate norm of v2 - v1 rr = ((v2x - v1[0])**2 + (v2y - v1[1])**2)**(1/2) - B = rr**b + B = rr**D if B == 0: B = 0.9 @@ -71,7 +71,7 @@ cpdef void generate_fractal3D( int ny, int nz, int nthreads, - int b, + float D, np.float64_t[:] weighting, np.float64_t[:] v1, np.complex128_t[:, :, ::1] A, @@ -82,7 +82,7 @@ cpdef void generate_fractal3D( Args: nx, ny, nz: int for fractal volume size in cells. nthreads: int for number of threads to use - b: int for constant related to fractal dimension. + D: float for fractal dimension. weighting: memoryview for access to weighting vector. v1: memoryview for access to positional vector at centre of array, scaled by weighting. @@ -105,7 +105,7 @@ cpdef void generate_fractal3D( # Calulate norm of v2 - v1 rr = ((v2x - v1[0])**2 + (v2y - v1[1])**2 + (v2z - v1[2])**2)**(1/2) - B = rr**b + B = rr**D if B == 0: B = 0.9 diff --git a/gprMax/cython/geometry_outputs.pyx b/gprMax/cython/geometry_outputs.pyx index 1312fec7..8cefaa5f 100644 --- a/gprMax/cython/geometry_outputs.pyx +++ b/gprMax/cython/geometry_outputs.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/geometry_primitives.pyx b/gprMax/cython/geometry_primitives.pyx index f12592a8..0b362dff 100644 --- a/gprMax/cython/geometry_primitives.pyx +++ b/gprMax/cython/geometry_primitives.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/pml_build.pyx b/gprMax/cython/pml_build.pyx index fbff8ef2..10edac00 100644 --- a/gprMax/cython/pml_build.pyx +++ b/gprMax/cython/pml_build.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/pml_updates_electric_HORIPML.pyx b/gprMax/cython/pml_updates_electric_HORIPML.pyx index 4ea872fa..f73530c4 100644 --- a/gprMax/cython/pml_updates_electric_HORIPML.pyx +++ b/gprMax/cython/pml_updates_electric_HORIPML.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/pml_updates_electric_MRIPML.pyx b/gprMax/cython/pml_updates_electric_MRIPML.pyx index 51cc64fb..44d497cf 100644 --- a/gprMax/cython/pml_updates_electric_MRIPML.pyx +++ b/gprMax/cython/pml_updates_electric_MRIPML.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/pml_updates_magnetic_HORIPML.pyx b/gprMax/cython/pml_updates_magnetic_HORIPML.pyx index 7088467d..1b0ea55a 100644 --- a/gprMax/cython/pml_updates_magnetic_HORIPML.pyx +++ b/gprMax/cython/pml_updates_magnetic_HORIPML.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/pml_updates_magnetic_MRIPML.pyx b/gprMax/cython/pml_updates_magnetic_MRIPML.pyx index bd7161ee..fd4ac73b 100644 --- a/gprMax/cython/pml_updates_magnetic_MRIPML.pyx +++ b/gprMax/cython/pml_updates_magnetic_MRIPML.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/snapshots.pyx b/gprMax/cython/snapshots.pyx index 5a4fcf37..ec91e3b8 100644 --- a/gprMax/cython/snapshots.pyx +++ b/gprMax/cython/snapshots.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/yee_cell_build.pyx b/gprMax/cython/yee_cell_build.pyx index d726c25a..17832691 100644 --- a/gprMax/cython/yee_cell_build.pyx +++ b/gprMax/cython/yee_cell_build.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/yee_cell_setget_rigid.pxd b/gprMax/cython/yee_cell_setget_rigid.pxd index bc80bf46..001124ce 100644 --- a/gprMax/cython/yee_cell_setget_rigid.pxd +++ b/gprMax/cython/yee_cell_setget_rigid.pxd @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/cython/yee_cell_setget_rigid.pyx b/gprMax/cython/yee_cell_setget_rigid.pyx index 6aab5ed1..99fb470d 100644 --- a/gprMax/cython/yee_cell_setget_rigid.pyx +++ b/gprMax/cython/yee_cell_setget_rigid.pyx @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/fields_outputs.py b/gprMax/fields_outputs.py index 24b0b6fa..c27d343d 100644 --- a/gprMax/fields_outputs.py +++ b/gprMax/fields_outputs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/fractals.py b/gprMax/fractals.py index 50388f90..256c173d 100644 --- a/gprMax/fractals.py +++ b/gprMax/fractals.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. @@ -56,9 +56,7 @@ class FractalSurface: self.nz = zf - zs self.dtype = np.dtype(np.complex128) self.seed = seed - self.dimension = dimension - # Constant related to fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695 - self.b = -(2 * self.dimension - 7) / 2 + self.dimension = dimension # Fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695 self.weighting = np.array([1, 1], dtype=np.float64) self.fractalrange = (0, 0) self.filldepth = 0 @@ -100,7 +98,7 @@ class FractalSurface: surfacedims[0], surfacedims[1], config.get_model_config().ompthreads, - self.b, + self.dimension, self.weighting, v1, A, @@ -159,9 +157,7 @@ class FractalVolume: self.averaging = False self.dtype = np.dtype(np.complex128) self.seed = seed - self.dimension = dimension - # Constant related to fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695 - self.b = -(2 * self.dimension - 7) / 2 + self.dimension = dimension # Fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695 self.weighting = np.array([1, 1, 1], dtype=np.float64) self.nbins = 0 self.fractalsurfaces = [] @@ -207,7 +203,7 @@ class FractalVolume: self.ny, self.nz, config.get_model_config().ompthreads, - self.b, + self.dimension, self.weighting, v1, A, diff --git a/gprMax/geometry_outputs.py b/gprMax/geometry_outputs.py index d8973c9c..674938e8 100644 --- a/gprMax/geometry_outputs.py +++ b/gprMax/geometry_outputs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/gprMax.py b/gprMax/gprMax.py index 089955f8..1e967eea 100644 --- a/gprMax/gprMax.py +++ b/gprMax/gprMax.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/grid.py b/gprMax/grid.py index 1b3f4e1c..319b0854 100644 --- a/gprMax/grid.py +++ b/gprMax/grid.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/hash_cmds_file.py b/gprMax/hash_cmds_file.py index f717f9f9..372489d6 100644 --- a/gprMax/hash_cmds_file.py +++ b/gprMax/hash_cmds_file.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/hash_cmds_geometry.py b/gprMax/hash_cmds_geometry.py index 271c3885..1b3c5e90 100644 --- a/gprMax/hash_cmds_geometry.py +++ b/gprMax/hash_cmds_geometry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/hash_cmds_multiuse.py b/gprMax/hash_cmds_multiuse.py index 18d29e2a..2c99f78f 100644 --- a/gprMax/hash_cmds_multiuse.py +++ b/gprMax/hash_cmds_multiuse.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/hash_cmds_singleuse.py b/gprMax/hash_cmds_singleuse.py index 2a490a4b..60cba910 100644 --- a/gprMax/hash_cmds_singleuse.py +++ b/gprMax/hash_cmds_singleuse.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/materials.py b/gprMax/materials.py index 21e09875..5de9c7c6 100644 --- a/gprMax/materials.py +++ b/gprMax/materials.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. @@ -278,7 +278,8 @@ class PeplinskiSoil: watereri, waterer, watertau, watersig = calculate_water_properties(T, S) f = 1.3e9 w = 2 * np.pi * f - erealw = watereri + ((waterer - watereri) / (1 + (w * watertau) ** 2)) + waterdeltaer = waterer - watereri + erealw = watereri + (waterdeltaer / (1 + (w * watertau) ** 2)) a = 0.65 # Experimentally derived constant es = (1.01 + 0.44 * self.rs) ** 2 - 0.062 #  Relative permittivity of sand particles @@ -309,7 +310,7 @@ class PeplinskiSoil: er = 1.15 * er - 0.68 # Permittivity at infinite frequency - eri = er - (muiter[0] ** (b2 / a) * DispersiveMaterial.waterdeltaer) + eri = er - (muiter[0] ** (b2 / a) * waterdeltaer) # Effective conductivity sig = muiter[0] ** (b2 / a) * ((sigf * (self.rs - self.rb)) / (self.rs * muiter[0])) @@ -324,7 +325,7 @@ class PeplinskiSoil: m.er = eri m.se = sig m.deltaer.append(er - eri) - m.tau.append(DispersiveMaterial.watertau) + m.tau.append(watertau) m.ID = f"|{float(m.er):.4f}+{float(m.se):.4f}+{float(m.mr):.4f}+{float(m.sm):.4f}|" G.materials.append(m) self.matID.append(m.numID) @@ -481,7 +482,7 @@ def calculate_water_properties(T=25, S=0): """Get extended Debye model properties for water. Args: - T: float for emperature of water (degrees centigrade). + T: float for temperature of water (degrees centigrade). S: float for salinity of water (part per thousand). Returns: diff --git a/gprMax/model_build_run.py b/gprMax/model_build_run.py index 6f24dc94..acc74684 100644 --- a/gprMax/model_build_run.py +++ b/gprMax/model_build_run.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/mpi.py b/gprMax/mpi.py index 61b46ead..f1407a5c 100644 --- a/gprMax/mpi.py +++ b/gprMax/mpi.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Tobias Schruff # # This file is part of gprMax. diff --git a/gprMax/pml.py b/gprMax/pml.py index 38032728..83d95ebc 100644 --- a/gprMax/pml.py +++ b/gprMax/pml.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/receivers.py b/gprMax/receivers.py index 64193636..f95b64e2 100644 --- a/gprMax/receivers.py +++ b/gprMax/receivers.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/scene.py b/gprMax/scene.py index 06fdd899..28b93cde 100644 --- a/gprMax/scene.py +++ b/gprMax/scene.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/snapshots.py b/gprMax/snapshots.py index bf6b79bc..033ebf32 100644 --- a/gprMax/snapshots.py +++ b/gprMax/snapshots.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/solvers.py b/gprMax/solvers.py index ac510956..74507be3 100644 --- a/gprMax/solvers.py +++ b/gprMax/solvers.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/sources.py b/gprMax/sources.py index 82648ed7..52028f74 100644 --- a/gprMax/sources.py +++ b/gprMax/sources.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/subgrids/grid.py b/gprMax/subgrids/grid.py index 5ab51817..1711c2cb 100644 --- a/gprMax/subgrids/grid.py +++ b/gprMax/subgrids/grid.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/subgrids/precursor_nodes.py b/gprMax/subgrids/precursor_nodes.py index 03a981f4..cd421fef 100644 --- a/gprMax/subgrids/precursor_nodes.py +++ b/gprMax/subgrids/precursor_nodes.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/subgrids/subgrid_hsg.py b/gprMax/subgrids/subgrid_hsg.py index f74863ce..62e50fc7 100644 --- a/gprMax/subgrids/subgrid_hsg.py +++ b/gprMax/subgrids/subgrid_hsg.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/subgrids/updates.py b/gprMax/subgrids/updates.py index 9e75a013..464a8cfc 100644 --- a/gprMax/subgrids/updates.py +++ b/gprMax/subgrids/updates.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/subgrids/user_objects.py b/gprMax/subgrids/user_objects.py index 82bf646f..3baa1028 100644 --- a/gprMax/subgrids/user_objects.py +++ b/gprMax/subgrids/user_objects.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/updates.py b/gprMax/updates.py index f75626ef..06c7424f 100644 --- a/gprMax/updates.py +++ b/gprMax/updates.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/user_inputs.py b/gprMax/user_inputs.py index 430ceca6..f80ba032 100644 --- a/gprMax/user_inputs.py +++ b/gprMax/user_inputs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/utilities/host_info.py b/gprMax/utilities/host_info.py index 02ad8866..62a48179 100644 --- a/gprMax/utilities/host_info.py +++ b/gprMax/utilities/host_info.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. @@ -301,12 +301,11 @@ def mem_check_host(mem): mem: int for memory required (bytes). """ if mem > config.sim_config.hostinfo["ram"]: - logger.exception( - f"Memory (RAM) required ~{humanize.naturalsize(mem)} exceeds " - f"{humanize.naturalsize(config.sim_config.hostinfo['ram'], True)} " - "detected!\n" + logger.warning( + f"Memory (RAM) required (~{humanize.naturalsize(mem)}) exceeds " + f"({humanize.naturalsize(config.sim_config.hostinfo['ram'], True)}) " + " physical memory detected!\n" ) - raise ValueError def mem_check_device_snaps(total_mem, snaps_mem): @@ -324,12 +323,11 @@ def mem_check_device_snaps(total_mem, snaps_mem): device_mem = config.get_model_config().device["dev"].global_mem_size if total_mem - snaps_mem > device_mem: - logger.exception( - f"Memory (RAM) required ~{humanize.naturalsize(total_mem)} exceeds " - f"{humanize.naturalsize(device_mem, True)} " - f"detected on specified {' '.join(config.get_model_config().device['dev'].name.split())} device!\n" + logger.warning( + f"Memory (RAM) required (~{humanize.naturalsize(total_mem)}) exceeds " + f"({humanize.naturalsize(device_mem, True)}) physical memory detected " + f"on specified {' '.join(config.get_model_config().device['dev'].name.split())} device!\n" ) - raise ValueError # If the required memory without the snapshots will fit on the GPU then # transfer and store snaphots on host diff --git a/gprMax/utilities/logging.py b/gprMax/utilities/logging.py index eb30d720..a1020ea3 100644 --- a/gprMax/utilities/logging.py +++ b/gprMax/utilities/logging.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/gprMax/utilities/utilities.py b/gprMax/utilities/utilities.py index 6be0614f..25fff366 100644 --- a/gprMax/utilities/utilities.py +++ b/gprMax/utilities/utilities.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. @@ -183,4 +183,4 @@ def fft_power(waveform, dt): def timer(): """Time in fractional seconds.""" - return timer_fn() + return timer_fn() diff --git a/gprMax/waveforms.py b/gprMax/waveforms.py index 36901e45..6c2de0ba 100644 --- a/gprMax/waveforms.py +++ b/gprMax/waveforms.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/setup.py b/setup.py index 7c201976..743af3c6 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/analytical_solutions.py b/testing/analytical_solutions.py index 877826d5..bbbd5f94 100644 --- a/testing/analytical_solutions.py +++ b/testing/analytical_solutions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/diff_output_files.py b/testing/diff_output_files.py index a36a8f6a..0ee81d36 100644 --- a/testing/diff_output_files.py +++ b/testing/diff_output_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/models_pmls/pml_3D_pec_plate/plot_pml_comparison.py b/testing/models_pmls/pml_3D_pec_plate/plot_pml_comparison.py index b22fecda..f958259d 100644 --- a/testing/models_pmls/pml_3D_pec_plate/plot_pml_comparison.py +++ b/testing/models_pmls/pml_3D_pec_plate/plot_pml_comparison.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/models_pmls/pml_basic/plot_pml_comparison.py b/testing/models_pmls/pml_basic/plot_pml_comparison.py index b4baeac1..767ca972 100644 --- a/testing/models_pmls/pml_basic/plot_pml_comparison.py +++ b/testing/models_pmls/pml_basic/plot_pml_comparison.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/test_experimental.py b/testing/test_experimental.py index b9e8f366..62118c5e 100644 --- a/testing/test_experimental.py +++ b/testing/test_experimental.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/testing/test_models.py b/testing/test_models.py index c5022234..2545ee56 100644 --- a/testing/test_models.py +++ b/testing/test_models.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/DebyeFit/Debye_Fit.py b/toolboxes/DebyeFit/Debye_Fit.py index 4df28463..47fa6aab 100644 --- a/toolboxes/DebyeFit/Debye_Fit.py +++ b/toolboxes/DebyeFit/Debye_Fit.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023, Iraklis Giannakis and Sylwia Majchrowska +# Copyright (C) 2015-2024, Iraklis Giannakis and Sylwia Majchrowska # # This module is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. # To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/. diff --git a/toolboxes/DebyeFit/optimization.py b/toolboxes/DebyeFit/optimization.py index ff94b2f6..0953bb6f 100644 --- a/toolboxes/DebyeFit/optimization.py +++ b/toolboxes/DebyeFit/optimization.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023, Iraklis Giannakis and Sylwia Majchrowska +# Copyright (C) 2015-2024, Iraklis Giannakis and Sylwia Majchrowska # # This module is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. # To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/. diff --git a/toolboxes/GPRAntennaModels/GSSI.py b/toolboxes/GPRAntennaModels/GSSI.py index c0b867f7..d6d8a8ee 100644 --- a/toolboxes/GPRAntennaModels/GSSI.py +++ b/toolboxes/GPRAntennaModels/GSSI.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023, Craig Warren +# Copyright (C) 2015-2024, Craig Warren # # This module is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. # To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/. diff --git a/toolboxes/GPRAntennaModels/MALA.py b/toolboxes/GPRAntennaModels/MALA.py index a663df04..937ec7b0 100644 --- a/toolboxes/GPRAntennaModels/MALA.py +++ b/toolboxes/GPRAntennaModels/MALA.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023, Craig Warren +# Copyright (C) 2015-2024, Craig Warren # # This module is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. # To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/. diff --git a/toolboxes/Plotting/plot_Ascan.py b/toolboxes/Plotting/plot_Ascan.py index 843bcaa8..a96d2bfe 100644 --- a/toolboxes/Plotting/plot_Ascan.py +++ b/toolboxes/Plotting/plot_Ascan.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Plotting/plot_Bscan.py b/toolboxes/Plotting/plot_Bscan.py index 7573db32..a2abb906 100644 --- a/toolboxes/Plotting/plot_Bscan.py +++ b/toolboxes/Plotting/plot_Bscan.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Plotting/plot_antenna_params.py b/toolboxes/Plotting/plot_antenna_params.py index 03ada0d9..affe98a1 100644 --- a/toolboxes/Plotting/plot_antenna_params.py +++ b/toolboxes/Plotting/plot_antenna_params.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Plotting/plot_source_wave.py b/toolboxes/Plotting/plot_source_wave.py index 1c25c375..2f7f6ac9 100644 --- a/toolboxes/Plotting/plot_source_wave.py +++ b/toolboxes/Plotting/plot_source_wave.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Utilities/Paraview/gprMax.py b/toolboxes/Utilities/Paraview/gprMax.py index 52530cf9..3c75aee1 100644 --- a/toolboxes/Utilities/Paraview/gprMax.py +++ b/toolboxes/Utilities/Paraview/gprMax.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. @@ -74,7 +74,7 @@ def display_pmls(pmlthick, dx_dy_dz, nx_ny_nz): pml_names = ["x0", "y0", "z0", "xmax", "ymax", "zmax"] pmls = dict.fromkeys(pml_names, None) - SetActiveSource(pv_src) + SetActiveSource(pv_data) if pmlthick[0] != 0: x0 = Box( @@ -159,15 +159,13 @@ def display_pmls(pmlthick, dx_dy_dz, nx_ny_nz): # Get whatever source is loaded - should be loaded file (.vt*) or files (.pvd) -data = GetActiveSource() +pv_data = GetActiveSource() # Hide display of root data -Hide(data) - +Hide(pv_data) # Single .vti or .vtu file -file = data.FileName -dirname = os.path.dirname(file[0]) +file = pv_data.FileName[0] # Read and display data from file, i.e. materials, sources, receivers, and PMLs with open(file, "rb") as f: @@ -187,12 +185,8 @@ with open(file, "rb") as f: ################ pv_view = GetActiveView() pv_view.AxesGrid.Visibility = 1 # Show Data Axes Grid -pv_data = OpenDataFile(file) pv_disp = Show(pv_data, pv_view) -pv_src = GetActiveSource() -Hide(pv_src) -src_name = os.path.split(file) -RenameSource(src_name[1]) +pv_disp.ColorArrayName = ["CELLS", "Material"] # Discretisation dl = c["dx_dy_dz"] @@ -202,7 +196,7 @@ nl = c["nx_ny_nz"] # Materials try: for i, mat in enumerate(c["Materials"]): - threshold = threshold_filt(pv_src, i, i, ["CELLS", "Material"]) + threshold = threshold_filt(pv_data, i, i, ["CELLS", "Material"]) RenameSource(mat, threshold) # Show data in view, except for free_space diff --git a/toolboxes/Utilities/convert_png2h5.py b/toolboxes/Utilities/convert_png2h5.py index 5f9a02bf..333220f9 100644 --- a/toolboxes/Utilities/convert_png2h5.py +++ b/toolboxes/Utilities/convert_png2h5.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Utilities/get_host_spec.py b/toolboxes/Utilities/get_host_spec.py index aa7c1412..184dfa3c 100644 --- a/toolboxes/Utilities/get_host_spec.py +++ b/toolboxes/Utilities/get_host_spec.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax. diff --git a/toolboxes/Utilities/outputfiles_merge.py b/toolboxes/Utilities/outputfiles_merge.py index cfbb1a49..65b5f211 100644 --- a/toolboxes/Utilities/outputfiles_merge.py +++ b/toolboxes/Utilities/outputfiles_merge.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2023: The University of Edinburgh, United Kingdom +# Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom # Authors: Craig Warren, Antonis Giannopoulos, and John Hartley # # This file is part of gprMax.