你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Merge pull request #387 from Sai-Suraj-27/update_pre-commit-hooks
Added a new check that verifies `.toml` files in the repo, and updated `black` version.
这个提交包含在:
@@ -7,8 +7,9 @@ repos:
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 23.7.0
|
||||
- id: check-toml
|
||||
- repo: https://github.com/psf/black-pre-commit-mirror
|
||||
rev: 23.9.1
|
||||
hooks:
|
||||
- id: black
|
||||
args: ["--line-length", "120"] # Adjust the max line length value as needed.
|
||||
|
@@ -171,8 +171,8 @@ class ExcitationFile(UserObjectMulti):
|
||||
# Interpolate waveform values
|
||||
w.userfunc = interpolate.interp1d(waveformtime, singlewaveformvalues, **kwargs)
|
||||
|
||||
logger.info(self.grid_name(grid) +
|
||||
f"User waveform {w.ID} created using {timestr} and, if "
|
||||
logger.info(
|
||||
self.grid_name(grid) + f"User waveform {w.ID} created using {timestr} and, if "
|
||||
f"required, interpolation parameters (kind: {kwargs['kind']}, "
|
||||
f"fill value: {kwargs['fill_value']})."
|
||||
)
|
||||
@@ -837,9 +837,7 @@ class Rx(UserObjectMulti):
|
||||
|
||||
def _do_rotate(self, grid):
|
||||
"""Performs rotation."""
|
||||
new_pt = (self.kwargs["p1"][0] + grid.dx,
|
||||
self.kwargs["p1"][1] + grid.dy,
|
||||
self.kwargs["p1"][2] + grid.dz)
|
||||
new_pt = (self.kwargs["p1"][0] + grid.dx, self.kwargs["p1"][1] + grid.dy, self.kwargs["p1"][2] + grid.dz)
|
||||
pts = np.array([self.kwargs["p1"], new_pt])
|
||||
rot_pts = rotate_2point_object(pts, self.axis, self.angle, self.origin)
|
||||
self.kwargs["p1"] = tuple(rot_pts[0, :])
|
||||
|
@@ -232,13 +232,12 @@ class PML:
|
||||
|
||||
def check_kappamin(self):
|
||||
"""Checks that the sum of all kappamin values, i.e. when a multi-pole
|
||||
PML is used, is not less than one.
|
||||
PML is used, is not less than one.
|
||||
"""
|
||||
|
||||
kappamin = sum(cfs.kappa.min for cfs in self.CFS)
|
||||
if kappamin < 1:
|
||||
logger.exception(f"Sum of kappamin value(s) for PML is {kappamin} "
|
||||
"and must be greater than one.")
|
||||
logger.exception(f"Sum of kappamin value(s) for PML is {kappamin} " "and must be greater than one.")
|
||||
raise ValueError
|
||||
|
||||
def initialise_field_arrays(self):
|
||||
|
在新工单中引用
屏蔽一个用户