@@ -457,7 +457,7 @@ def nDoF(self):
457457 """Number of degrees of freedom for one variable"""
458458 return np .prod (self .gridSizes )
459459
460- def toVTR (self , baseName , varNames , suffix = "{:06d}_t={:1.2f}s " ):
460+ def toVTR (self , baseName , varNames , idxFormat = "{:06d}" ):
461461 """
462462 Convert all 3D fields stored in binary format (FieldsIO) into a list
463463 of VTR files, that can be read later with Paraview or equivalent to
@@ -469,10 +469,9 @@ def toVTR(self, baseName, varNames, suffix="{:06d}_t={:1.2f}s"):
469469 Base name of the VTR file.
470470 varNames : list[str]
471471 Variable names of the fields.
472- suffix : str, optional
473- Formating string for the suffix of the VTR file, containing the
474- index in first position, and the time in second position.
475- The default is "{:06d}_t={:1.2f}s".
472+ idxFormat : str, optional
473+ Formatting string for the index of the VTR file.
474+ The default is "{:06d}".
476475
477476 Example
478477 -------
@@ -486,10 +485,10 @@ def toVTR(self, baseName, varNames, suffix="{:06d}_t={:1.2f}s"):
486485 assert self .dim == 3 , "can only be used with 3D fields"
487486 from pySDC .helpers .vtkIO import writeToVTR
488487
489- template = f"{ baseName } _{ suffix } "
488+ template = f"{ baseName } _{ idxFormat } "
490489 for i in range (self .nFields ):
491- t , u = self .readField (i )
492- writeToVTR (template .format (i , t ), u , self .header ["coords" ], varNames )
490+ _ , u = self .readField (i )
491+ writeToVTR (template .format (i ), u , self .header ["coords" ], varNames )
493492
494493 # -------------------------------------------------------------------------
495494 # MPI-parallel implementation
0 commit comments