你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-04 11:36:52 +08:00
Merge branch 'devel' into mpi
这个提交包含在:
@@ -9,11 +9,13 @@ build:
|
|||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
apt_packages:
|
apt_packages:
|
||||||
- mpich
|
- mpich
|
||||||
|
- libfftw3-dev
|
||||||
tools:
|
tools:
|
||||||
python: "mambaforge-22.9"
|
python: "mambaforge-22.9"
|
||||||
jobs:
|
jobs:
|
||||||
post_create_environment:
|
post_create_environment:
|
||||||
- python -m pip install sphinx_rtd_theme
|
- python -m pip install sphinx_rtd_theme
|
||||||
|
- python -m pip install reframe-hpc
|
||||||
|
|
||||||
conda:
|
conda:
|
||||||
environment: conda_env.yml
|
environment: conda_env.yml
|
||||||
|
@@ -89,7 +89,7 @@ The following steps provide guidance on how to install gprMax:
|
|||||||
5. [Optional] Build h5py against Parallel HDF5
|
5. [Optional] Build h5py against Parallel HDF5
|
||||||
6. Build and install gprMax
|
6. Build and install gprMax
|
||||||
|
|
||||||
7. Install a C compiler which supports OpenMP
|
1. Install a C compiler which supports OpenMP
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
|
@@ -433,19 +433,19 @@ def process_multicmds(multicmds):
|
|||||||
for cmdinstance in multicmds[cmdname]:
|
for cmdinstance in multicmds[cmdname]:
|
||||||
tmp = cmdinstance.split()
|
tmp = cmdinstance.split()
|
||||||
|
|
||||||
if len(tmp) < 5:
|
if len(tmp) < 4:
|
||||||
logger.exception(
|
logger.exception(
|
||||||
"'"
|
"'"
|
||||||
+ cmdname
|
+ cmdname
|
||||||
+ ": "
|
+ ": "
|
||||||
+ " ".join(tmp)
|
+ " ".join(tmp)
|
||||||
+ "'"
|
+ "'"
|
||||||
+ " requires at least five parameters"
|
+ " requires at least four parameters"
|
||||||
)
|
)
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
poles = int(tmp[0])
|
poles = int(tmp[0])
|
||||||
material_ids = tmp[(3 * poles) + 1 : len(tmp)]
|
material_ids = tmp[(2 * poles) + 1 : len(tmp)]
|
||||||
omega = []
|
omega = []
|
||||||
gamma = []
|
gamma = []
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ if epsr:
|
|||||||
mr = 1
|
mr = 1
|
||||||
z1 = np.sqrt(mr / epsr) * z0
|
z1 = np.sqrt(mr / epsr) * z0
|
||||||
v1 = c / np.sqrt(epsr)
|
v1 = c / np.sqrt(epsr)
|
||||||
thetac = np.round(np.arcsin(v1 / c * (180 / np.pi))
|
thetac = np.round(np.arcsin(v1 / c * (180 / np.pi)))
|
||||||
wavelength = v1 / f
|
wavelength = v1 / f
|
||||||
|
|
||||||
# Print some useful information
|
# Print some useful information
|
||||||
|
@@ -14,7 +14,7 @@ Manufacturer/Model Dimensions Resolution(s) Author/Contact
|
|||||||
======================== ============= ============= ========================================================================================================================================================================================================================= ================
|
======================== ============= ============= ========================================================================================================================================================================================================================= ================
|
||||||
GSSI 1.5GHz (Model 5100) 170x108x45mm 1, 2mm Craig Warren (craig.warren@northumbria.ac.uk), Northumbria University, UK 1,2
|
GSSI 1.5GHz (Model 5100) 170x108x45mm 1, 2mm Craig Warren (craig.warren@northumbria.ac.uk), Northumbria University, UK 1,2
|
||||||
MALA 1.2GHz 184x109x46mm 1, 2mm Craig Warren (craig.warren@northumbria.ac.uk), Northumbria University, UK 1
|
MALA 1.2GHz 184x109x46mm 1, 2mm Craig Warren (craig.warren@northumbria.ac.uk), Northumbria University, UK 1
|
||||||
GSSI 400MHz 300x300x170mm 2mm Sam Stadler (sam.stadler@leibniz-liag.de), `Leibniz Institute for Applied Geophysics <https://www.leibniz-liag.de/en/research/methods/electromagnetic-methods/ground-penetrating-radar.html>`_, Germany 3
|
GSSI 400MHz 300x300x170mm 2mm Sam Stadler (sam.stadler@leibniz-liag.de), `Leibniz Institute for Applied Geophysics <https://www.leibniz-liag.de/en/research/methods/electromagnetic-methods/ground-penetrating-radar.html>`_, Germany 3
|
||||||
======================== ============= ============= ========================================================================================================================================================================================================================= ================
|
======================== ============= ============= ========================================================================================================================================================================================================================= ================
|
||||||
|
|
||||||
**License**: `Creative Commons Attribution-ShareAlike 4.0 International License <http://creativecommons.org/licenses/by-sa/4.0/>`_
|
**License**: `Creative Commons Attribution-ShareAlike 4.0 International License <http://creativecommons.org/licenses/by-sa/4.0/>`_
|
||||||
|
@@ -197,22 +197,22 @@ def mpl_plot(filename, outputs=Rx.defaultoutputs, fft=False, save=False):
|
|||||||
# If multiple outputs required, create all nine subplots and
|
# If multiple outputs required, create all nine subplots and
|
||||||
# populate only the specified ones
|
# populate only the specified ones
|
||||||
else:
|
else:
|
||||||
fig, ax = plt.subplots(
|
plt_cols = 3 if len(outputs) == 9 else 2
|
||||||
|
|
||||||
|
fig, axs = plt.subplots(
|
||||||
subplot_kw=dict(xlabel="Time [s]"),
|
subplot_kw=dict(xlabel="Time [s]"),
|
||||||
num=rxpath + " - " + f[rxpath].attrs["Name"],
|
num=rxpath + " - " + f[rxpath].attrs["Name"],
|
||||||
figsize=(20, 10),
|
figsize=(20, 10),
|
||||||
|
nrows = 3,
|
||||||
|
ncols = plt_cols,
|
||||||
facecolor="w",
|
facecolor="w",
|
||||||
edgecolor="w",
|
edgecolor="w",
|
||||||
)
|
)
|
||||||
if len(outputs) == 9:
|
|
||||||
gs = gridspec.GridSpec(3, 3, hspace=0.3, wspace=0.3)
|
|
||||||
else:
|
|
||||||
gs = gridspec.GridSpec(3, 2, hspace=0.3, wspace=0.3)
|
|
||||||
|
|
||||||
for output in outputs:
|
for output in outputs:
|
||||||
# Check for polarity of output and if requested output
|
# Check for polarity of output and if requested output
|
||||||
# is in file
|
# is in file
|
||||||
if output[-1] == "m":
|
if output[-1] == "-":
|
||||||
polarity = -1
|
polarity = -1
|
||||||
outputtext = "-" + output[0:-1]
|
outputtext = "-" + output[0:-1]
|
||||||
output = output[0:-1]
|
output = output[0:-1]
|
||||||
@@ -233,47 +233,32 @@ def mpl_plot(filename, outputs=Rx.defaultoutputs, fft=False, save=False):
|
|||||||
outputdata = f[rxpath + output][:] * polarity
|
outputdata = f[rxpath + output][:] * polarity
|
||||||
|
|
||||||
if output == "Ex":
|
if output == "Ex":
|
||||||
ax = plt.subplot(gs[0, 0])
|
axs[0, 0].plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "r", lw=2, label=outputtext)
|
axs[0, 0].set_ylabel(outputtext + ", field strength [V/m]")
|
||||||
ax.set_ylabel(outputtext + ", field strength [V/m]")
|
|
||||||
# ax.set_ylim([-15, 20])
|
|
||||||
elif output == "Ey":
|
elif output == "Ey":
|
||||||
ax = plt.subplot(gs[1, 0])
|
axs[1, 0].plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "r", lw=2, label=outputtext)
|
axs[1, 0].set_ylabel(outputtext + ", field strength [V/m]")
|
||||||
ax.set_ylabel(outputtext + ", field strength [V/m]")
|
|
||||||
# ax.set_ylim([-15, 20])
|
|
||||||
elif output == "Ez":
|
elif output == "Ez":
|
||||||
ax = plt.subplot(gs[2, 0])
|
axs[2, 0].plot(time, outputdata, "r", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "r", lw=2, label=outputtext)
|
axs[2, 0].set_ylabel(outputtext + ", field strength [V/m]")
|
||||||
ax.set_ylabel(outputtext + ", field strength [V/m]")
|
|
||||||
# ax.set_ylim([-15, 20])
|
|
||||||
elif output == "Hx":
|
elif output == "Hx":
|
||||||
ax = plt.subplot(gs[0, 1])
|
axs[0, 1].plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "g", lw=2, label=outputtext)
|
axs[0, 1].set_ylabel(outputtext + ", field strength [A/m]")
|
||||||
ax.set_ylabel(outputtext + ", field strength [A/m]")
|
|
||||||
# ax.set_ylim([-0.03, 0.03])
|
|
||||||
elif output == "Hy":
|
elif output == "Hy":
|
||||||
ax = plt.subplot(gs[1, 1])
|
axs[1, 1].plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "g", lw=2, label=outputtext)
|
axs[1, 1].set_ylabel(outputtext + ", field strength [A/m]")
|
||||||
ax.set_ylabel(outputtext + ", field strength [A/m]")
|
|
||||||
# ax.set_ylim([-0.03, 0.03])
|
|
||||||
elif output == "Hz":
|
elif output == "Hz":
|
||||||
ax = plt.subplot(gs[2, 1])
|
axs[2, 1].plot(time, outputdata, "g", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "g", lw=2, label=outputtext)
|
axs[2, 1].set_ylabel(outputtext + ", field strength [A/m]")
|
||||||
ax.set_ylabel(outputtext + ", field strength [A/m]")
|
|
||||||
# ax.set_ylim([-0.03, 0.03])
|
|
||||||
elif output == "Ix":
|
elif output == "Ix":
|
||||||
ax = plt.subplot(gs[0, 2])
|
axs[0, 2].plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "b", lw=2, label=outputtext)
|
axs[0, 2].set_ylabel(outputtext + ", current [A]")
|
||||||
ax.set_ylabel(outputtext + ", current [A]")
|
|
||||||
elif output == "Iy":
|
elif output == "Iy":
|
||||||
ax = plt.subplot(gs[1, 2])
|
axs[1, 2].plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "b", lw=2, label=outputtext)
|
axs[1, 2].set_ylabel(outputtext + ", current [A]")
|
||||||
ax.set_ylabel(outputtext + ", current [A]")
|
|
||||||
elif output == "Iz":
|
elif output == "Iz":
|
||||||
ax = plt.subplot(gs[2, 2])
|
axs[2, 2].plot(time, outputdata, "b", lw=2, label=outputtext)
|
||||||
ax.plot(time, outputdata, "b", lw=2, label=outputtext)
|
axs[2, 2].set_ylabel(outputtext + ", current [A]")
|
||||||
ax.set_ylabel(outputtext + ", current [A]")
|
|
||||||
for ax in fig.axes:
|
for ax in fig.axes:
|
||||||
ax.set_xlim([0, np.amax(time)])
|
ax.set_xlim([0, np.amax(time)])
|
||||||
ax.grid(which="both", axis="both", linestyle="-.")
|
ax.grid(which="both", axis="both", linestyle="-.")
|
||||||
|
@@ -159,13 +159,13 @@ def mpl_plot(w, timewindow, dt, iterations, fft=False, save=False):
|
|||||||
pad_inches=0.1,
|
pad_inches=0.1,
|
||||||
)
|
)
|
||||||
# Save a PNG of the figure
|
# Save a PNG of the figure
|
||||||
fig.savefig(
|
# fig.savefig(
|
||||||
savefile.with_suffix(".png"),
|
# savefile.with_suffix(".png"),
|
||||||
dpi=150,
|
# dpi=150,
|
||||||
format="png",
|
# format="png",
|
||||||
bbox_inches="tight",
|
# bbox_inches="tight",
|
||||||
pad_inches=0.1,
|
# pad_inches=0.1,
|
||||||
)
|
# )
|
||||||
|
|
||||||
return plt
|
return plt
|
||||||
|
|
||||||
|
在新工单中引用
屏蔽一个用户