你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Changed method of appending model number to geometry and output files when running more than a single model.
这个提交包含在:
@@ -82,29 +82,23 @@ class GeometryView(object):
|
|||||||
self.vtk_materials_offset = round_value(self.vtk_offsets_offset + (self.vtk_numlines * np.dtype(np.uint32).itemsize) + np.dtype(np.uint32).itemsize)
|
self.vtk_materials_offset = round_value(self.vtk_offsets_offset + (self.vtk_numlines * np.dtype(np.uint32).itemsize) + np.dtype(np.uint32).itemsize)
|
||||||
self.datawritesize = np.dtype(np.float32).itemsize * self.vtk_numpoints * self.vtk_numpoint_components + np.dtype(np.uint32).itemsize * self.vtk_numlines * self.vtk_numline_components + np.dtype(np.uint32).itemsize * self.vtk_numlines + np.dtype(np.uint32).itemsize * self.vtk_numlines
|
self.datawritesize = np.dtype(np.float32).itemsize * self.vtk_numpoints * self.vtk_numpoint_components + np.dtype(np.uint32).itemsize * self.vtk_numlines * self.vtk_numline_components + np.dtype(np.uint32).itemsize * self.vtk_numlines + np.dtype(np.uint32).itemsize * self.vtk_numlines
|
||||||
|
|
||||||
def set_filename(self, currentmodelrun, numbermodelruns, G):
|
def set_filename(self, appendmodelnumber, G):
|
||||||
"""Construct filename from user-supplied name and model run number.
|
"""Construct filename from user-supplied name and model run number.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
currentmodelrun (int): Current model run number.
|
appendmodelnumber (str): Text to append to filename.
|
||||||
numbermodelruns (int): Total number of model runs.
|
|
||||||
G (class): Grid class instance - holds essential parameters describing the model.
|
G (class): Grid class instance - holds essential parameters describing the model.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if numbermodelruns == 1:
|
self.filename = os.path.abspath(os.path.join(G.inputdirectory, self.basefilename + appendmodelnumber))
|
||||||
self.filename = os.path.abspath(os.path.join(G.inputdirectory, self.basefilename))
|
|
||||||
else:
|
|
||||||
self.filename = os.path.abspath(os.path.join(G.inputdirectory, self.basefilename + str(currentmodelrun)))
|
|
||||||
self.filename += self.fileext
|
self.filename += self.fileext
|
||||||
|
|
||||||
def write_vtk(self, currentmodelrun, numbermodelruns, G, pbar):
|
def write_vtk(self, G, pbar):
|
||||||
"""Writes the geometry information to a VTK file. Either ImageData (.vti) for a per-cell geometry view, or PolygonalData (.vtp) for a per-cell-edge geometry view.
|
"""Writes the geometry information to a VTK file. Either ImageData (.vti) for a per-cell geometry view, or PolygonalData (.vtp) for a per-cell-edge geometry view.
|
||||||
|
|
||||||
N.B. No Python 3 support for VTK at time of writing (03/2015)
|
N.B. No Python 3 support for VTK at time of writing (03/2015)
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
currentmodelrun (int): Current model run number.
|
|
||||||
numbermodelruns (int): Total number of model runs.
|
|
||||||
G (class): Grid class instance - holds essential parameters describing the model.
|
G (class): Grid class instance - holds essential parameters describing the model.
|
||||||
pbar (class): Progress bar class instance.
|
pbar (class): Progress bar class instance.
|
||||||
"""
|
"""
|
||||||
|
在新工单中引用
屏蔽一个用户