-# 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
# 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
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()
# @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
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):