Padder : fix RmaxRmin's variable name and update default values for NbIter and RmaxRmin

This commit is contained in:
uhz 2017-04-07 17:09:46 +02:00 committed by rnv
parent b45ed4bcaf
commit a162ca7efe
4 changed files with 19 additions and 19 deletions

View File

@ -42,9 +42,9 @@ INPUTDATA_KEY_FILES="meshfiles"
INPUTDATA_KEY_PARAM="parameters"
PARAM_KEY_NBITER = "NbIteration"
PARAM_KEY_RMINRMAX = "RminRmax"
PARAM_NBITER_DEFAULT_VALUE = 3
PARAM_RMINRMAX_DEFAULT_VALUE = 1.5
PARAM_KEY_RMAXRMIN = "RmaxRmin"
PARAM_NBITER_DEFAULT_VALUE = 10
PARAM_RMAXRMIN_DEFAULT_VALUE = 3
class InputDialog(GenericDialog):
@ -125,7 +125,7 @@ class InputDialog(GenericDialog):
# Setup default values for numerical parameters
self.__ui.txtParamNbIter.setValue(PARAM_NBITER_DEFAULT_VALUE)
self.__ui.txtParamRminRmax.setValue(PARAM_RMINRMAX_DEFAULT_VALUE)
self.__ui.txtParamRmaxRmin.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.
@ -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])
if dictInputParameters.has_key(PARAM_KEY_RMINRMAX):
self.__ui.txtParamRminRmax.setValue(dictInputParameters[PARAM_KEY_RMINRMAX])
if dictInputParameters.has_key(PARAM_KEY_RMAXRMIN):
self.__ui.txtParamRminRmax.setValue(dictInputParameters[PARAM_KEY_RMAXRMIN])
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()
dictInputParameters[PARAM_KEY_RMINRMAX] = self.__ui.txtParamRminRmax.value()
dictInputParameters[PARAM_KEY_RMAXRMIN] = self.__ui.txtParamRmaxRmin.value()
dictInputData[INPUTDATA_KEY_PARAM] = dictInputParameters
return dictInputData

View File

@ -111,7 +111,7 @@
</property>
<item>
<property name="text">
<string>Béton</string>
<string>Beton</string>
</property>
<property name="icon">
<iconset>
@ -213,9 +213,9 @@
</widget>
</item>
<item>
<widget class="QLabel" name="lblParamRminRmax">
<widget class="QLabel" name="lblParamRmaxRmin">
<property name="text">
<string>Rmin / Rmax</string>
<string>Rmax / Rmin</string>
</property>
</widget>
</item>
@ -227,7 +227,7 @@
<widget class="QSpinBox" name="txtParamNbIter"/>
</item>
<item>
<widget class="QDoubleSpinBox" name="txtParamRminRmax"/>
<widget class="QDoubleSpinBox" name="txtParamRmaxRmin"/>
</item>
</layout>
</item>

View File

@ -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 inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RMINRMAX
from inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RMAXRMIN
from inputdata import InputData
# __GBO__: uncomment this line and comment the previous one to use the
# demo input dialog instead of the real one.

View File

@ -161,7 +161,7 @@ def test03_parameters():
meshJobFileList = test03_parameters()
meshJobParameterList = []
param = MESHJOB.MeshJobParameter(name="RminRmax",value="1.5")
param = MESHJOB.MeshJobParameter(name="RmaxRmin",value="1.5")
meshJobParameterList.append(param)
param = MESHJOB.MeshJobParameter(name="NbIteration",value="3")
meshJobParameterList.append(param)