@@ -333,7 +333,7 @@ def setHeader(self, nVar):
333333 self .nItems = self .nVar
334334
335335 @property
336- def hinfos (self ):
336+ def hInfos (self ):
337337 """Array representing the grid structure to be written in the binary file."""
338338 return [np .array ([self .nVar ], dtype = np .int64 )]
339339
@@ -380,8 +380,8 @@ def setHeader(self, nVar, coordX):
380380 ----
381381 When used in MPI decomposition mode, `coordX` **must** be the global grid.
382382 """
383- grids = self .setupCoords (coordX = coordX )
384- self .header = {"nVar" : int (nVar ), ** grids }
383+ coords = self .setupCoords (coordX = coordX )
384+ self .header = {"nVar" : int (nVar ), ** coords }
385385 self .nItems = nVar * self .nX
386386
387387 @property
@@ -414,12 +414,12 @@ def nX(self):
414414 return self .header ["coordX" ].size
415415
416416 @staticmethod
417- def setupCoords (** grids ):
417+ def setupCoords (** coords ):
418418 """Utility function to setup grids in multuple dimensions, given the keyword arguments"""
419- grids = {name : np .asarray (grid , dtype = np .float64 ) for name , grid in grids .items () if name . startswith ( "grid" )}
420- for name , grid in grids .items ():
421- assert grid .ndim == 1 , f"{ name } must be one dimensional"
422- return grids
419+ coords = {name : np .asarray (coord , dtype = np .float64 ) for name , coord in coords .items ()}
420+ for name , coord in coords .items ():
421+ assert coord .ndim == 1 , f"{ name } must be one dimensional"
422+ return coords
423423
424424 # -------------------------------------------------------------------------
425425 # MPI-parallel implementation
@@ -511,8 +511,11 @@ def initialize(self):
511511 try :
512512 super ().initialize ()
513513 except AssertionError as e :
514- print (f"{ type (e ): {e }} " )
515- self .comm .Abort ()
514+ if self .MPI_ON :
515+ print (f"{ type (e )} : { e } " )
516+ self .comm .Abort ()
517+ else :
518+ raise e
516519
517520 if self .MPI_ON :
518521 self .comm .Barrier () # Important, should not be removed !
0 commit comments