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