你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 23:14:03 +08:00
interpolation over rectilinear grid. Faster.
这个提交包含在:
@@ -636,14 +636,9 @@ class PrecursorNodes(PrecusorNodes2dBase):
|
||||
|
||||
def interpolate_to_sub_grid(self, field, coords):
|
||||
x, z, x_sg, z_sg = coords
|
||||
ex_t = np.transpose(field)
|
||||
f = interpolate.interp2d(x, z, ex_t, kind=self.interpolation)
|
||||
#f = interpolate.RectBivariateSpline(x, z, field)
|
||||
ex_inter_t = f(x_sg, z_sg)
|
||||
ex_inter = np.transpose(ex_inter_t)
|
||||
#ex_inter = ex_inter_t
|
||||
|
||||
return ex_inter
|
||||
interp_f = interpolate.RectBivariateSpline(x, z, field, kx=self.interpolation, ky=self.interpolation)
|
||||
f_i = interp_f(x_sg, z_sg)
|
||||
return f_i
|
||||
|
||||
|
||||
class PlaneError(Exception):
|
||||
|
@@ -741,14 +741,9 @@ class PrecursorNodes(PrecusorNodes2dBase):
|
||||
|
||||
def interpolate_to_sub_grid(self, field, coords):
|
||||
x, z, x_sg, z_sg = coords
|
||||
ex_t = np.transpose(field)
|
||||
f = interpolate.interp2d(x, z, ex_t, kind=self.interpolation)
|
||||
#f = interpolate.RectBivariateSpline(x, z, field)
|
||||
ex_inter_t = f(x_sg, z_sg)
|
||||
ex_inter = np.transpose(ex_inter_t)
|
||||
#ex_inter = ex_inter_t
|
||||
|
||||
return ex_inter
|
||||
interp_f = interpolate.RectBivariateSpline(x, z, field, kx=self.interpolation, ky=self.interpolation)
|
||||
f_i = interp_f(x_sg, z_sg)
|
||||
return f_i
|
||||
|
||||
|
||||
class PlaneError(Exception):
|
||||
|
@@ -177,7 +177,7 @@ class SubGridHSG(SubGridBase):
|
||||
is_os_sep=3,
|
||||
pml_separation=4,
|
||||
subgrid_pml_thickness=6,
|
||||
interpolation='linear',
|
||||
interpolation=1,
|
||||
filter=True,
|
||||
**kwargs):
|
||||
"""Constructor."""
|
||||
|
在新工单中引用
屏蔽一个用户