def getxz(self): model_path = PATH.OUTPUT + '/' + 'model_init' try: m = solver.load(model_path) x = m['x'][0] z = m['z'][0] except: from seisflows.seistools.io import loadbin x = loadbin(model_path, 0, 'x') z = loadbin(model_path, 0, 'z') return x, z
def getxz(self): model_path = PATH.OUTPUT +'/'+ 'model_init' try: m = solver.load(model_path) x = m['x'][0] z = m['z'][0] except: from seisflows.seistools.io import loadbin x = loadbin(model_path, 0, 'x') z = loadbin(model_path, 0, 'z') return x,z
def check_mesh_properties(self, path=None, parameters=None): if not hasattr(self, '_mesh_properties'): if not path: path = PATH.MODEL_INIT if not parameters: parameters = self.parameters nproc = 0 ngll = [] while True: dummy = loadbin(path, nproc, parameters[0]) ngll += [len(dummy)] nproc += 1 if not exists('%s/proc%06d_%s.bin' % (path, nproc, parameters[0])): break self._mesh_properties = Struct([['nproc', nproc], ['ngll', ngll]]) return self._mesh_properties
def check_mesh_properties(self, path=None, parameters=None): if not hasattr(self, '_mesh_properties'): if not path: path = PATH.MODEL_INIT if not parameters: parameters = self.parameters nproc = 0 ngll = [] while True: dummy = loadbin(path, nproc, 'reg1_'+parameters[0]) ngll += [len(dummy)] nproc += 1 if not exists('%s/proc%06d_reg1_%s.bin' % (path, nproc, parameters[0])): break self._mesh_properties = Struct([ ['nproc', nproc], ['ngll', ngll]]) return self._mesh_properties