Skip to content

Commit

Permalink
Merge pull request #89 from ArnauMiro/88-fix-h5io-for-clipped-meshes-…
Browse files Browse the repository at this point in the history
…from-pyqvarsi

Fix save meshes nopartition
  • Loading branch information
bef-18 authored Jan 20, 2025
2 parents cff0a6a + 9497d34 commit 15d414b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyLOM/inp_out/io_h5.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def h5_save_meshes_nopartition(file,mtype,xyz,conec,eltype,cellO,pointO,ptable):
# Assume we might be dealing with a parallel mesh
ndim = xyz.shape[1]
nnodcell = conec.shape[1]
npointG = mpi_reduce(pointO.max(),op='max',all=True) + 1
ncellG = mpi_reduce(cellO.max(),op='max',all=True) + 1
npointG = mpi_reduce(pointO.max() if pointO.shape[0] > 0 else 0,op='max',all=True) + 1
ncellG = mpi_reduce(cellO.max() if cellO.shape[0] > 0 else 0,op='max',all=True) + 1
file.create_dataset('npoints',(1,),dtype='i4',data=npointG)
file.create_dataset('ncells' ,(1,),dtype='i4',data=ncellG)
# Create the rest of the datasets for parallel storage
Expand Down

0 comments on commit 15d414b

Please sign in to comment.