diff --git a/blast/interfaces/blSolversInterface.py b/blast/interfaces/blSolversInterface.py index 66f32389dc15749f38a3b9d08e0a1920436c8c8e..360e44a5e1bcff3c19729846465bc6d0c63f7ccb 100644 --- a/blast/interfaces/blSolversInterface.py +++ b/blast/interfaces/blSolversInterface.py @@ -798,7 +798,7 @@ class SolversInterface: else: raise RuntimeError('Expected "sections" in cfg') if len(cfg['sections']) != self.getnBodies(): - raise RuntimeError(f'Expected the length of "sections" to be {self.getnBodies()}, got {len(self.cfg["sections"])}') + raise RuntimeError(f'Expected the length of "sections" to be {self.getnBodies()}, got {len(cfg["sections"])}') return cfg def _initDataStructures(self)->tuple[list, list]: @@ -907,6 +907,7 @@ class SolversInterface: allregs.append(vreg.type) # Compute average and max AR of viscous cells avgAR = 0 + nNodes = 0 if self.getnDim() == 3: point_cpt = 0 for isec in range(1,len(self.vBnd[ibody])): @@ -920,8 +921,13 @@ class SolversInterface: # AR = b^2 / S avgAR += dy**2 / (dx * dy) point_cpt += 1 + nNodes += 1 avgAR /= point_cpt - print(f' -{ibody}: {bodyName}, {len(self.vBnd[ibody])} section(s) with sides {allregs}, avg AR {avgAR:.2f}') + elif self.getnDim() == 2: + for isec in range(len(self.vBnd[ibody])): + for ipoint in range(1,self.vBnd[ibody][isec][0].nodesCoord.shape[0]): + nNodes += 1 + print(f' - {bodyName}: {len(self.vBnd[ibody])} section(s) with sides {allregs},\n\t{nNodes} surface nodes, avg AR {avgAR:.2f}') print('') # Abstract methods for the interface