diff --git a/proteus/FemTools.py b/proteus/FemTools.py index db8ea265df..75876a7f82 100644 --- a/proteus/FemTools.py +++ b/proteus/FemTools.py @@ -3623,7 +3623,16 @@ def readFunctionXdmf(self,ar,u,tCount=0): del array else: if ar.has_h5py: - u.dof[:]=ar.hdfFile["/"+u.name+"_p"+`ar.comm.rank()`+"_t"+str(tCount)] + if ar.global_sync: + #this is known to be slow but it scales with + #respect to memory (as opposed to the faster + #approach of pulling in the entire array) + permute = np.argsort(self.mesh.globalMesh.nodeNumbering_subdomain2global) + u.dof[permute] = ar.hdfFile["/"+u.name+"_t"+str(tCount)][self.mesh.globalMesh.nodeNumbering_subdomain2global[permute].tolist()] + #faster way + #u.dof[:] = ar.hdfFile["/"+u.name+"_t"+str(tCount)].value[self.mesh.globalMesh.nodeNumbering_subdomain2global] + else: + u.dof[:]=ar.hdfFile["/"+u.name+"_p"+`ar.comm.rank()`+"_t"+str(tCount)] else: u.dof[:]=ar.hdfFile.getNode("/",u.name+str(tCount)) else: diff --git a/proteus/NumericalSolution.py b/proteus/NumericalSolution.py index 24a1da6f7e..3f317ae16a 100644 --- a/proteus/NumericalSolution.py +++ b/proteus/NumericalSolution.py @@ -273,12 +273,9 @@ def __init__(self,so,pList,nList,sList,opts,simFlagsList=None): if comm.isMaster() and p.genMesh: tmesh.readFromPolyFile(p.domain.polyfile) tmesh.writeToFile(p.domain.polyfile) - logEvent("Converting to Proteus Mesh") - mesh=tmesh.convertToProteusMesh(verbose=1) comm.barrier() - if p.genMesh: - mesh = MeshTools.TriangularMesh() - mesh.generateFromTriangleFiles(filebase=p.domain.polyfile,base=1) + mesh = MeshTools.TriangularMesh() + mesh.generateFromTriangleFiles(filebase=p.domain.polyfile,base=1) mlMesh = MeshTools.MultilevelTriangularMesh(0,0,0,skipInit=True, nLayersOfOverlap=n.nLayersOfOverlapForParallel, parallelPartitioningType=n.parallelPartitioningType) @@ -1147,7 +1144,7 @@ def calculateSolution(self,runName): if self.opts.hotStart: logEvent("Setting initial conditions from hot start file for "+p.name) tCount = int(self.ar[index].tree.getroot()[-1][-1][-1][0].attrib['Name']) - self.ar[index].n_datasets = tCount+1 + self.ar[index].n_datasets = tCount + 1 time = float(self.ar[index].tree.getroot()[-1][-1][-1][0].attrib['Value']) if len(self.ar[index].tree.getroot()[-1][-1]) > 1: dt = time - float(self.ar[index].tree.getroot()[-1][-1][-2][0].attrib['Value']) @@ -1162,7 +1159,7 @@ def calculateSolution(self,runName): lm.timeIntegration.tLast = time lm.timeIntegration.t = time lm.timeIntegration.dt = dt - self.tCount = tCount+1 + self.tCount = tCount elif p.initialConditions is not None: logEvent("Setting initial conditions for "+p.name) m.setInitialConditions(p.initialConditions,self.tnList[0])