Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b45ed4b
)
Padder : fix RmaxRmin's variable name and update default values for NbIter and RmaxRmin
author
uhz
<ulysse.humbert-gonzalez@opencascade.com>
Fri, 7 Apr 2017 15:09:46 +0000
(17:09 +0200)
committer
rnv
<rnv@opencascade.com>
Fri, 7 Apr 2017 15:18:12 +0000
(18:18 +0300)
src/Tools/padder/spadderpy/gui/inputdialog.py
patch
|
blob
|
history
src/Tools/padder/spadderpy/gui/inputframe.ui
patch
|
blob
|
history
src/Tools/padder/spadderpy/gui/plugindialog.py
patch
|
blob
|
history
src/Tools/padder/unittests/usecase_meshJobManager.py
patch
|
blob
|
history
diff --git
a/src/Tools/padder/spadderpy/gui/inputdialog.py
b/src/Tools/padder/spadderpy/gui/inputdialog.py
index 3fd0c7fa6e553ccc98ca96fda041543fad39e8bf..a050077922fbd93f567a0bfb5521a33645db71c0 100644
(file)
--- a/
src/Tools/padder/spadderpy/gui/inputdialog.py
+++ b/
src/Tools/padder/spadderpy/gui/inputdialog.py
@@
-42,9
+42,9
@@
INPUTDATA_KEY_FILES="meshfiles"
INPUTDATA_KEY_PARAM="parameters"
PARAM_KEY_NBITER = "NbIteration"
INPUTDATA_KEY_PARAM="parameters"
PARAM_KEY_NBITER = "NbIteration"
-PARAM_KEY_RM
INRMAX = "RminRmax
"
-PARAM_NBITER_DEFAULT_VALUE =
3
-PARAM_RM
INRMAX_DEFAULT_VALUE = 1.5
+PARAM_KEY_RM
AXRMIN = "RmaxRmin
"
+PARAM_NBITER_DEFAULT_VALUE =
10
+PARAM_RM
AXRMIN_DEFAULT_VALUE = 3
class InputDialog(GenericDialog):
class InputDialog(GenericDialog):
@@
-125,7
+125,7
@@
class InputDialog(GenericDialog):
# Setup default values for numerical parameters
self.__ui.txtParamNbIter.setValue(PARAM_NBITER_DEFAULT_VALUE)
# Setup default values for numerical parameters
self.__ui.txtParamNbIter.setValue(PARAM_NBITER_DEFAULT_VALUE)
- self.__ui.txtParamRm
inRmax.setValue(PARAM_RMINRMAX
_DEFAULT_VALUE)
+ self.__ui.txtParamRm
axRmin.setValue(PARAM_RMAXRMIN
_DEFAULT_VALUE)
# Note that PADDER does not support group name longer than 8
# characters. We apply then this limit in the gui field.
# Note that PADDER does not support group name longer than 8
# characters. We apply then this limit in the gui field.
@@
-317,8
+317,8
@@
class InputDialog(GenericDialog):
dictInputParameters = dictInputData[INPUTDATA_KEY_PARAM]
if dictInputParameters.has_key(PARAM_KEY_NBITER):
self.__ui.txtParamNbIter.setValue(dictInputParameters[PARAM_KEY_NBITER])
dictInputParameters = dictInputData[INPUTDATA_KEY_PARAM]
if dictInputParameters.has_key(PARAM_KEY_NBITER):
self.__ui.txtParamNbIter.setValue(dictInputParameters[PARAM_KEY_NBITER])
- if dictInputParameters.has_key(PARAM_KEY_RM
INRMAX
):
- self.__ui.txtParamRminRmax.setValue(dictInputParameters[PARAM_KEY_RM
INRMAX
])
+ if dictInputParameters.has_key(PARAM_KEY_RM
AXRMIN
):
+ self.__ui.txtParamRminRmax.setValue(dictInputParameters[PARAM_KEY_RM
AXRMIN
])
def getData(self):
"""
def getData(self):
"""
@@
-334,7
+334,7
@@
class InputDialog(GenericDialog):
# Get the list of additionnal parameters
dictInputParameters = {}
dictInputParameters[PARAM_KEY_NBITER] = self.__ui.txtParamNbIter.value()
# Get the list of additionnal parameters
dictInputParameters = {}
dictInputParameters[PARAM_KEY_NBITER] = self.__ui.txtParamNbIter.value()
- dictInputParameters[PARAM_KEY_RM
INRMAX] = self.__ui.txtParamRminRmax
.value()
+ dictInputParameters[PARAM_KEY_RM
AXRMIN] = self.__ui.txtParamRmaxRmin
.value()
dictInputData[INPUTDATA_KEY_PARAM] = dictInputParameters
return dictInputData
dictInputData[INPUTDATA_KEY_PARAM] = dictInputParameters
return dictInputData
diff --git
a/src/Tools/padder/spadderpy/gui/inputframe.ui
b/src/Tools/padder/spadderpy/gui/inputframe.ui
index b1ba72d96d2ee81e8765f3a53ca2d71123466eb4..a8882f44cb67dd24170e0a88003e1faf02ef9f10 100644
(file)
--- a/
src/Tools/padder/spadderpy/gui/inputframe.ui
+++ b/
src/Tools/padder/spadderpy/gui/inputframe.ui
@@
-111,7
+111,7
@@
</property>
<item>
<property name="text">
</property>
<item>
<property name="text">
- <string>B
é
ton</string>
+ <string>B
e
ton</string>
</property>
<property name="icon">
<iconset>
</property>
<property name="icon">
<iconset>
@@
-213,9
+213,9
@@
</widget>
</item>
<item>
</widget>
</item>
<item>
- <widget class="QLabel" name="lblParamRm
inRmax
">
+ <widget class="QLabel" name="lblParamRm
axRmin
">
<property name="text">
<property name="text">
- <string>Rm
in / Rmax
</string>
+ <string>Rm
ax / Rmin
</string>
</property>
</widget>
</item>
</property>
</widget>
</item>
@@
-227,7
+227,7
@@
<widget class="QSpinBox" name="txtParamNbIter"/>
</item>
<item>
<widget class="QSpinBox" name="txtParamNbIter"/>
</item>
<item>
- <widget class="QDoubleSpinBox" name="txtParamRm
inRmax
"/>
+ <widget class="QDoubleSpinBox" name="txtParamRm
axRmin
"/>
</item>
</layout>
</item>
</item>
</layout>
</item>
diff --git
a/src/Tools/padder/spadderpy/gui/plugindialog.py
b/src/Tools/padder/spadderpy/gui/plugindialog.py
index 7d010ceb7b905673d2716ad0e90ad3eead3f6caf..4fec4e8d375a091325aa6d7f703ee01b3c5216b8 100644
(file)
--- a/
src/Tools/padder/spadderpy/gui/plugindialog.py
+++ b/
src/Tools/padder/spadderpy/gui/plugindialog.py
@@
-24,7
+24,7
@@
from qtsalome import QDialog, QIcon, Qt
from plugindialog_ui import Ui_PluginDialog
from inputdialog import InputDialog, INPUTDATA_KEY_FILES, INPUTDATA_KEY_PARAM
from plugindialog_ui import Ui_PluginDialog
from inputdialog import InputDialog, INPUTDATA_KEY_FILES, INPUTDATA_KEY_PARAM
-from inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RM
INRMAX
+from inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RM
AXRMIN
from inputdata import InputData
# __GBO__: uncomment this line and comment the previous one to use the
# demo input dialog instead of the real one.
from inputdata import InputData
# __GBO__: uncomment this line and comment the previous one to use the
# demo input dialog instead of the real one.
diff --git
a/src/Tools/padder/unittests/usecase_meshJobManager.py
b/src/Tools/padder/unittests/usecase_meshJobManager.py
index 131e7c3157aad3adadf26228826a6f0f60a594a9..3f705458f0dd146fa52c530edd53da1250a1ed96 100644
(file)
--- a/
src/Tools/padder/unittests/usecase_meshJobManager.py
+++ b/
src/Tools/padder/unittests/usecase_meshJobManager.py
@@
-83,7
+83,7
@@
PADDERTESTDIR = getPadderTestDir(defaultConfig)
# padder.cfg).
#
def test00_parameters():
# padder.cfg).
#
def test00_parameters():
- """Test using a concrete mesh and a single steelbar mesh"""
+ """Test using a concrete mesh and a single steelbar mesh"""
file_concrete=os.path.join(spadder.getTestDataDir(),"concrete.med")
file_steelbar=os.path.join(spadder.getTestDataDir(),"ferraill.med")
file_concrete=os.path.join(spadder.getTestDataDir(),"concrete.med")
file_steelbar=os.path.join(spadder.getTestDataDir(),"ferraill.med")
@@
-109,7
+109,7
@@
def test01_parameters():
file_type=MESHJOB.MED_CONCRETE,
group_name="concrete")
meshJobFileList.append(param)
file_type=MESHJOB.MED_CONCRETE,
group_name="concrete")
meshJobFileList.append(param)
-
+
medfile = os.path.join(datadir,"ferraill.med")
param = MESHJOB.MeshJobFile(file_name=medfile,
file_type=MESHJOB.MED_STEELBAR,
medfile = os.path.join(datadir,"ferraill.med")
param = MESHJOB.MeshJobFile(file_name=medfile,
file_type=MESHJOB.MED_STEELBAR,
@@
-121,7
+121,7
@@
def test01_parameters():
file_type=MESHJOB.MED_STEELBAR,
group_name="ferrtran")
meshJobFileList.append(param)
file_type=MESHJOB.MED_STEELBAR,
group_name="ferrtran")
meshJobFileList.append(param)
-
+
return meshJobFileList
def test02_parameters():
return meshJobFileList
def test02_parameters():
@@
-161,7
+161,7
@@
def test03_parameters():
meshJobFileList = test03_parameters()
meshJobParameterList = []
meshJobFileList = test03_parameters()
meshJobParameterList = []
-param = MESHJOB.MeshJobParameter(name="Rm
inRmax
",value="1.5")
+param = MESHJOB.MeshJobParameter(name="Rm
axRmin
",value="1.5")
meshJobParameterList.append(param)
param = MESHJOB.MeshJobParameter(name="NbIteration",value="3")
meshJobParameterList.append(param)
meshJobParameterList.append(param)
param = MESHJOB.MeshJobParameter(name="NbIteration",value="3")
meshJobParameterList.append(param)
@@
-174,7
+174,7
@@
if jobid<0:
msg = component.getLastErrorMessage()
print "ERR: %s"%msg
sys.exit(1)
msg = component.getLastErrorMessage()
print "ERR: %s"%msg
sys.exit(1)
-
+
created = False
nbiter = 0
while not created:
created = False
nbiter = 0
while not created:
@@
-217,11
+217,11
@@
while not ended:
ended=True
time.sleep(0.5)
nbiter+=1
ended=True
time.sleep(0.5)
nbiter+=1
-
+
if state not in end_states:
print "ERR: jobid = "+str(jobid)+" ended abnormally with state="+str(state)
msg = component.getLastErrorMessage()
if state not in end_states:
print "ERR: jobid = "+str(jobid)+" ended abnormally with state="+str(state)
msg = component.getLastErrorMessage()
- print "ERR: %s"%msg
+ print "ERR: %s"%msg
else:
print "OK: jobid = "+str(jobid)+" ended with state="+str(state)
meshJobResults = component.finalize(jobid)
else:
print "OK: jobid = "+str(jobid)+" ended with state="+str(state)
meshJobResults = component.finalize(jobid)