你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
comments
这个提交包含在:
@@ -197,13 +197,12 @@ class GeometryView:
|
|||||||
def evtk_voxels(self):
|
def evtk_voxels(self):
|
||||||
G = self.G
|
G = self.G
|
||||||
|
|
||||||
|
# sample the solid array
|
||||||
solid = np.copy(G.solid[self.xs:self.xf:self.dx,
|
solid = np.copy(G.solid[self.xs:self.xf:self.dx,
|
||||||
self.ys:self.yf:self.dx, self.zs:self.zf:self.dx])
|
self.ys:self.yf:self.dx, self.zs:self.zf:self.dx])
|
||||||
|
|
||||||
# length is number of vertices in each direction * size of each block + starting offset
|
# coordinates of vertices (rectilinear)
|
||||||
# vertices are number of cell + 1
|
# (length is number of vertices in each direction) * (size of each block [m]) + (starting offset)
|
||||||
|
|
||||||
# origin
|
|
||||||
x = np.arange(
|
x = np.arange(
|
||||||
0, solid.shape[0] + 1) * (G.dx * self.dx) + (self.xs * G.dx)
|
0, solid.shape[0] + 1) * (G.dx * self.dx) + (self.xs * G.dx)
|
||||||
y = np.arange(
|
y = np.arange(
|
||||||
@@ -211,10 +210,11 @@ class GeometryView:
|
|||||||
z = np.arange(
|
z = np.arange(
|
||||||
0, solid.shape[2] + 1) * (G.dz * self.dz) + (self.zs * G.dz)
|
0, solid.shape[2] + 1) * (G.dz * self.dz) + (self.zs * G.dz)
|
||||||
|
|
||||||
# get information about pml, sources, receivers
|
# Get information about pml, sources, receivers
|
||||||
info = self.get_gprmax_info(G, materialsonly=False)
|
info = self.get_gprmax_info(G, materialsonly=False)
|
||||||
comments = json.dumps(info)
|
comments = json.dumps(info)
|
||||||
|
|
||||||
|
# Write the VTK file .vtr
|
||||||
rectilinearToVTK(self.format_filename_evtk(self.filename), x, y, z, cellData={
|
rectilinearToVTK(self.format_filename_evtk(self.filename), x, y, z, cellData={
|
||||||
"Material": solid}, comments=[comments])
|
"Material": solid}, comments=[comments])
|
||||||
|
|
||||||
|
在新工单中引用
屏蔽一个用户