From 3f7e0318aa7a2da4f98da13122e63b7bba4f6972 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Thu, 14 Jan 2016 18:08:15 +0000 Subject: [PATCH] Changed roundvalue function to round_value. --- gprMax/snapshots.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gprMax/snapshots.py b/gprMax/snapshots.py index f0ddcc21..7a6cf2d5 100644 --- a/gprMax/snapshots.py +++ b/gprMax/snapshots.py @@ -21,7 +21,7 @@ import numpy as np from struct import pack from gprMax.constants import floattype -from gprMax.utilities import roundvalue +from gprMax.utilities import round_value class Snapshot: @@ -83,12 +83,12 @@ class Snapshot: self.filename = G.inputdirectory + self.filename + '_' + str(modelrun) + '.vti' # Calculate number of cells according to requested sampling - self.vtk_xscells = roundvalue(self.xs / self.dx) - self.vtk_xfcells = roundvalue(self.xf / self.dx) - self.vtk_yscells = roundvalue(self.ys / self.dy) - self.vtk_yfcells = roundvalue(self.yf / self.dz) - self.vtk_zscells = roundvalue(self.zs / self.dz) - self.vtk_zfcells = roundvalue(self.zf / self.dz) + self.vtk_xscells = round_value(self.xs / self.dx) + self.vtk_xfcells = round_value(self.xf / self.dx) + self.vtk_yscells = round_value(self.ys / self.dy) + self.vtk_yfcells = round_value(self.yf / self.dz) + self.vtk_zscells = round_value(self.zs / self.dz) + self.vtk_zfcells = round_value(self.zf / self.dz) vtk_hfield_offset = 3 * np.dtype(floattype).itemsize * (self.vtk_xfcells - self.vtk_xscells) * (self.vtk_yfcells - self.vtk_yscells) * (self.vtk_zfcells - self.vtk_zscells) + np.dtype(np.uint32).itemsize # vtk_current_offset = 2 * vtk_hfield_offset