X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHexoticPlugin%2FHexoticPLUGINBuilder.py;h=f9e748361cb1086622dea9224cf789d8869bb9e9;hb=fb04f19c9266c385301fd6658b44e58e8502db51;hp=7fd42cead0a8bb5f027e9851159de80cd5c30a1a;hpb=3959acd05d03c60606fd720d6007831206f8a346;p=plugins%2Fhexoticplugin.git diff --git a/src/HexoticPlugin/HexoticPLUGINBuilder.py b/src/HexoticPlugin/HexoticPLUGINBuilder.py index 7fd42ce..f9e7483 100644 --- a/src/HexoticPlugin/HexoticPLUGINBuilder.py +++ b/src/HexoticPlugin/HexoticPLUGINBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2016 CEA/DEN, EDF R&D +# Copyright (C) 2007-2020 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -70,7 +70,7 @@ class Hexotic_Algorithm(Mesh_Algorithm): # if it is @c 0 (default), the algorithm is assigned to the main shape def __init__(self, mesh, geom=0): Mesh_Algorithm.__init__(self) - if noHexoticPlugin: print "Warning: HexoticPlugin module unavailable" + if noHexoticPlugin: print("Warning: HexoticPlugin module unavailable") self.Create(mesh, geom, MG_Hexa, "libHexoticEngine.so") self.params = None pass @@ -100,7 +100,7 @@ class Hexotic_Algorithm(Mesh_Algorithm): def SetSizeMap(self, theObject, theSize): AssureGeomPublished( self.mesh, theObject ) if theSize <= 0: - raise ValueError, "The size must be > 0" + raise ValueError("The size must be > 0") self.Parameters().SetSizeMap(theObject, theSize) return self.Parameters() @@ -125,9 +125,16 @@ class Hexotic_Algorithm(Mesh_Algorithm): # @param quad not documented # @return hypothesis object def MinMaxQuad(self, min=3, max=8, quad=True): - print "WARNING: Function MinMaxQuad is deprecated, use SetMinMaxHexes instead" + print("WARNING: Function MinMaxQuad is deprecated, use SetMinMaxHexes instead") return self.SetMinMaxHexes(min, max) + ## Set advanced option value + # @param optionName option name + # @param optionValue option value + def SetOptionValue(self, optionName, optionValue): + self.Parameters().SetOptionValue( optionName, optionValue ) + pass + ## Defines "ViscousLayers" hypothesis to give MG-Hexa parameters # @param numberOfLayers number of boundary layers # @param firstLayerSize height of the first layer @@ -171,6 +178,28 @@ class Hexotic_Algorithm(Mesh_Algorithm): return self.Parameters() + ## To keep working files or remove them. + # @param toKeep "keep working files" flag value + def SetKeepFiles(self, toKeep): + self.Parameters().SetKeepFiles(toKeep) + pass + + ## Remove or not the log file (if any) in case of successful computation. + # The log file remains in case of errors anyway. If + # the "keep working files" flag is set to true, this option + # has no effect. + # @param toRemove "remove log on success" flag value + def SetRemoveLogOnSuccess(self, toRemove): + self.Parameters().SetRemoveLogOnSuccess(toRemove) + pass + + ## Print the the log in a file. If set to false, the + # log is printed on the standard output + # @param toPrintLogInFile "print log in a file" flag value + def SetPrintLogInFile(self, toPrintLogInFile): + self.Parameters().SetStandardOutputLog(not toPrintLogInFile) + pass + ## Defines hypothesis having several parameters # @return hypothesis object def Parameters(self):