你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 23:14:03 +08:00
Changed to new-style classes.
Changed to storing base filename.
这个提交包含在:
@@ -25,7 +25,7 @@ from gprMax.grid import Ix, Iy, Iz
|
|||||||
from gprMax.utilities import round_value
|
from gprMax.utilities import round_value
|
||||||
|
|
||||||
|
|
||||||
class Snapshot:
|
class Snapshot(object):
|
||||||
"""Snapshots of the electric and magnetic field values."""
|
"""Snapshots of the electric and magnetic field values."""
|
||||||
|
|
||||||
# Set string for byte order
|
# Set string for byte order
|
||||||
@@ -61,7 +61,7 @@ class Snapshot:
|
|||||||
self.dy = dy
|
self.dy = dy
|
||||||
self.dz = dz
|
self.dz = dz
|
||||||
self.time = time
|
self.time = time
|
||||||
self.filename = filename
|
self.basefilename = filename
|
||||||
|
|
||||||
def prepare_vtk_imagedata(self, modelrun, numbermodelruns, G):
|
def prepare_vtk_imagedata(self, modelrun, numbermodelruns, G):
|
||||||
"""Prepares a VTK ImageData (.vti) file for a snapshot.
|
"""Prepares a VTK ImageData (.vti) file for a snapshot.
|
||||||
@@ -85,7 +85,7 @@ class Snapshot:
|
|||||||
|
|
||||||
if not os.path.exists(snapshotdir):
|
if not os.path.exists(snapshotdir):
|
||||||
os.mkdir(snapshotdir)
|
os.mkdir(snapshotdir)
|
||||||
self.filename = os.path.abspath(os.path.join(snapshotdir, self.filename + '.vti'))
|
self.filename = os.path.abspath(os.path.join(snapshotdir, self.basefilename + '.vti'))
|
||||||
|
|
||||||
# Calculate number of cells according to requested sampling
|
# Calculate number of cells according to requested sampling
|
||||||
self.vtk_xscells = round_value(self.xs / self.dx)
|
self.vtk_xscells = round_value(self.xs / self.dx)
|
||||||
|
在新工单中引用
屏蔽一个用户