你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Install and run pre-commit
这个提交包含在:
@@ -1,4 +1,5 @@
|
||||
# See https://pre-commit.com for more information
|
||||
exclude: '\S*.map'
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
|
@@ -24,5 +24,3 @@ python:
|
||||
|
||||
sphinx:
|
||||
configuration: docs/source/conf.py
|
||||
|
||||
|
||||
|
@@ -56,7 +56,7 @@ class FractalSurface:
|
||||
self.nz = zf - zs
|
||||
self.dtype = np.dtype(np.complex128)
|
||||
self.seed = seed
|
||||
self.dimension = dimension # Fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695
|
||||
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
|
||||
@@ -157,7 +157,7 @@ class FractalVolume:
|
||||
self.averaging = False
|
||||
self.dtype = np.dtype(np.complex128)
|
||||
self.seed = seed
|
||||
self.dimension = dimension # Fractal dimension from: http://dx.doi.org/10.1017/CBO9781139174695
|
||||
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 = []
|
||||
|
@@ -14,6 +14,7 @@ scipy
|
||||
humanize
|
||||
# mpi4py
|
||||
numpy-stl
|
||||
pre-commit
|
||||
# pycuda
|
||||
# pyopencl
|
||||
terminaltables
|
||||
|
@@ -19,16 +19,15 @@
|
||||
import logging
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from colorama import Fore, Style
|
||||
|
||||
import h5py
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from colorama import Fore, Style
|
||||
|
||||
import gprMax
|
||||
from testing.analytical_solutions import hertzian_dipole_fs
|
||||
|
||||
from gprMax.utilities.logging import logging_config
|
||||
from testing.analytical_solutions import hertzian_dipole_fs
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging_config(name=__name__)
|
||||
|
2
tests/.gitignore
vendored
2
tests/.gitignore
vendored
@@ -5,4 +5,4 @@ reframe.log
|
||||
reframe.out
|
||||
reframe_perf.out
|
||||
|
||||
configuration/user_config.py
|
||||
configuration/user_config.py
|
||||
|
@@ -21,4 +21,4 @@ mkdir -p profile/archer2/
|
||||
|
||||
map -o="profile/archer2/gprMax_${1}d_${SLURM_CPUS_PER_TASK}t_$(date +%F_%H-%M)" --mpi=slurm --mpiargs="--hint=nomultithread --distribution=block:block" --profile python -m gprMax --log-level 25 src/benchmark_model_$1.in
|
||||
|
||||
sacct --format=JobID,State,Submit,Start,End,Elapsed,NodeList --units=M -j $SLURM_JOBID
|
||||
sacct --format=JobID,State,Submit,Start,End,Elapsed,NodeList --units=M -j $SLURM_JOBID
|
||||
|
@@ -14,4 +14,4 @@ source ../.venv/bin/activate
|
||||
|
||||
reframe -C configuration/archer2_settings.py -c . -r --performance-report
|
||||
|
||||
sacct --format=JobID,State,Submit,Start,End,Elapsed,NodeList --units=M -j $SLURM_JOBID
|
||||
sacct --format=JobID,State,Submit,Start,End,Elapsed,NodeList --units=M -j $SLURM_JOBID
|
||||
|
@@ -50,4 +50,4 @@ def calculate_diffs(test_data, ref_data):
|
||||
# Replace any NaNs or Infs from zero division
|
||||
diffs[:, i][np.invert(np.isfinite(diffs[:, i]))] = 0
|
||||
|
||||
return diffs
|
||||
return diffs
|
||||
|
@@ -1,5 +1,5 @@
|
||||
from matplotlib import pyplot as plt
|
||||
import numpy as np
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
|
||||
def _plot_data(subplots, time, data, label=None, colour="r", line_style="-"):
|
||||
@@ -46,8 +46,8 @@ def plot_diffs(time, diffs, plot_min=-160):
|
||||
"""Plots ...
|
||||
|
||||
Args:
|
||||
time:
|
||||
diffs:
|
||||
time:
|
||||
diffs:
|
||||
plot_min: minimum value of difference to plot (dB). Default: -160
|
||||
|
||||
Returns:
|
||||
@@ -82,4 +82,4 @@ def plot_diffs(time, diffs, plot_min=-160):
|
||||
ax.set_ylim(plot_min, y_max)
|
||||
ax.grid()
|
||||
|
||||
return fig
|
||||
return fig
|
||||
|
@@ -71,7 +71,7 @@ def get_output_data(filename, rxnumber, rxcomponent):
|
||||
return outputdata, dt
|
||||
|
||||
|
||||
def merge_files(outputfiles, merged_outputfile=None, removefiles=False):
|
||||
def merge_files(outputfiles, merged_outputfile=None, removefiles=False):
|
||||
"""Merges traces (A-scans) from multiple output files into one new file,
|
||||
then optionally removes the series of output files.
|
||||
|
||||
@@ -138,7 +138,9 @@ if __name__ == "__main__":
|
||||
usage="cd gprMax; python -m tools.outputfiles_merge basefilename",
|
||||
)
|
||||
parser.add_argument("basefilename", help="base name of output file series including path")
|
||||
parser.add_argument("-o", "--output-file", default=None, type=str, required=False, help="location to save merged file")
|
||||
parser.add_argument(
|
||||
"-o", "--output-file", default=None, type=str, required=False, help="location to save merged file"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--remove-files", action="store_true", default=False, help="flag to remove individual output files after merge"
|
||||
)
|
||||
|
在新工单中引用
屏蔽一个用户