mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-12 12:07:28 +05:00
Padder : fix RmaxRmin's variable name and update default values for NbIter and RmaxRmin
This commit is contained in:
parent
b45ed4bcaf
commit
a162ca7efe
@ -42,9 +42,9 @@ INPUTDATA_KEY_FILES="meshfiles"
|
|||||||
INPUTDATA_KEY_PARAM="parameters"
|
INPUTDATA_KEY_PARAM="parameters"
|
||||||
|
|
||||||
PARAM_KEY_NBITER = "NbIteration"
|
PARAM_KEY_NBITER = "NbIteration"
|
||||||
PARAM_KEY_RMINRMAX = "RminRmax"
|
PARAM_KEY_RMAXRMIN = "RmaxRmin"
|
||||||
PARAM_NBITER_DEFAULT_VALUE = 3
|
PARAM_NBITER_DEFAULT_VALUE = 10
|
||||||
PARAM_RMINRMAX_DEFAULT_VALUE = 1.5
|
PARAM_RMAXRMIN_DEFAULT_VALUE = 3
|
||||||
|
|
||||||
class InputDialog(GenericDialog):
|
class InputDialog(GenericDialog):
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ class InputDialog(GenericDialog):
|
|||||||
|
|
||||||
# Setup default values for numerical parameters
|
# Setup default values for numerical parameters
|
||||||
self.__ui.txtParamNbIter.setValue(PARAM_NBITER_DEFAULT_VALUE)
|
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
|
# Note that PADDER does not support group name longer than 8
|
||||||
# characters. We apply then this limit in the gui field.
|
# characters. We apply then this limit in the gui field.
|
||||||
@ -317,8 +317,8 @@ class InputDialog(GenericDialog):
|
|||||||
dictInputParameters = dictInputData[INPUTDATA_KEY_PARAM]
|
dictInputParameters = dictInputData[INPUTDATA_KEY_PARAM]
|
||||||
if dictInputParameters.has_key(PARAM_KEY_NBITER):
|
if dictInputParameters.has_key(PARAM_KEY_NBITER):
|
||||||
self.__ui.txtParamNbIter.setValue(dictInputParameters[PARAM_KEY_NBITER])
|
self.__ui.txtParamNbIter.setValue(dictInputParameters[PARAM_KEY_NBITER])
|
||||||
if dictInputParameters.has_key(PARAM_KEY_RMINRMAX):
|
if dictInputParameters.has_key(PARAM_KEY_RMAXRMIN):
|
||||||
self.__ui.txtParamRminRmax.setValue(dictInputParameters[PARAM_KEY_RMINRMAX])
|
self.__ui.txtParamRminRmax.setValue(dictInputParameters[PARAM_KEY_RMAXRMIN])
|
||||||
|
|
||||||
def getData(self):
|
def getData(self):
|
||||||
"""
|
"""
|
||||||
@ -334,7 +334,7 @@ class InputDialog(GenericDialog):
|
|||||||
# Get the list of additionnal parameters
|
# Get the list of additionnal parameters
|
||||||
dictInputParameters = {}
|
dictInputParameters = {}
|
||||||
dictInputParameters[PARAM_KEY_NBITER] = self.__ui.txtParamNbIter.value()
|
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
|
dictInputData[INPUTDATA_KEY_PARAM] = dictInputParameters
|
||||||
return dictInputData
|
return dictInputData
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Béton</string>
|
<string>Beton</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
@ -213,9 +213,9 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lblParamRminRmax">
|
<widget class="QLabel" name="lblParamRmaxRmin">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rmin / Rmax</string>
|
<string>Rmax / Rmin</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -227,7 +227,7 @@
|
|||||||
<widget class="QSpinBox" name="txtParamNbIter"/>
|
<widget class="QSpinBox" name="txtParamNbIter"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="txtParamRminRmax"/>
|
<widget class="QDoubleSpinBox" name="txtParamRmaxRmin"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -24,7 +24,7 @@ from qtsalome import QDialog, QIcon, Qt
|
|||||||
|
|
||||||
from plugindialog_ui import Ui_PluginDialog
|
from plugindialog_ui import Ui_PluginDialog
|
||||||
from inputdialog import InputDialog, INPUTDATA_KEY_FILES, INPUTDATA_KEY_PARAM
|
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
|
from inputdata import InputData
|
||||||
# __GBO__: uncomment this line and comment the previous one to use the
|
# __GBO__: uncomment this line and comment the previous one to use the
|
||||||
# demo input dialog instead of the real one.
|
# demo input dialog instead of the real one.
|
||||||
|
@ -83,7 +83,7 @@ PADDERTESTDIR = getPadderTestDir(defaultConfig)
|
|||||||
# padder.cfg).
|
# padder.cfg).
|
||||||
#
|
#
|
||||||
def test00_parameters():
|
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_concrete=os.path.join(spadder.getTestDataDir(),"concrete.med")
|
||||||
file_steelbar=os.path.join(spadder.getTestDataDir(),"ferraill.med")
|
file_steelbar=os.path.join(spadder.getTestDataDir(),"ferraill.med")
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ def test01_parameters():
|
|||||||
file_type=MESHJOB.MED_CONCRETE,
|
file_type=MESHJOB.MED_CONCRETE,
|
||||||
group_name="concrete")
|
group_name="concrete")
|
||||||
meshJobFileList.append(param)
|
meshJobFileList.append(param)
|
||||||
|
|
||||||
medfile = os.path.join(datadir,"ferraill.med")
|
medfile = os.path.join(datadir,"ferraill.med")
|
||||||
param = MESHJOB.MeshJobFile(file_name=medfile,
|
param = MESHJOB.MeshJobFile(file_name=medfile,
|
||||||
file_type=MESHJOB.MED_STEELBAR,
|
file_type=MESHJOB.MED_STEELBAR,
|
||||||
@ -121,7 +121,7 @@ def test01_parameters():
|
|||||||
file_type=MESHJOB.MED_STEELBAR,
|
file_type=MESHJOB.MED_STEELBAR,
|
||||||
group_name="ferrtran")
|
group_name="ferrtran")
|
||||||
meshJobFileList.append(param)
|
meshJobFileList.append(param)
|
||||||
|
|
||||||
return meshJobFileList
|
return meshJobFileList
|
||||||
|
|
||||||
def test02_parameters():
|
def test02_parameters():
|
||||||
@ -161,7 +161,7 @@ def test03_parameters():
|
|||||||
meshJobFileList = test03_parameters()
|
meshJobFileList = test03_parameters()
|
||||||
|
|
||||||
meshJobParameterList = []
|
meshJobParameterList = []
|
||||||
param = MESHJOB.MeshJobParameter(name="RminRmax",value="1.5")
|
param = MESHJOB.MeshJobParameter(name="RmaxRmin",value="1.5")
|
||||||
meshJobParameterList.append(param)
|
meshJobParameterList.append(param)
|
||||||
param = MESHJOB.MeshJobParameter(name="NbIteration",value="3")
|
param = MESHJOB.MeshJobParameter(name="NbIteration",value="3")
|
||||||
meshJobParameterList.append(param)
|
meshJobParameterList.append(param)
|
||||||
@ -174,7 +174,7 @@ if jobid<0:
|
|||||||
msg = component.getLastErrorMessage()
|
msg = component.getLastErrorMessage()
|
||||||
print "ERR: %s"%msg
|
print "ERR: %s"%msg
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
created = False
|
created = False
|
||||||
nbiter = 0
|
nbiter = 0
|
||||||
while not created:
|
while not created:
|
||||||
@ -217,11 +217,11 @@ while not ended:
|
|||||||
ended=True
|
ended=True
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
nbiter+=1
|
nbiter+=1
|
||||||
|
|
||||||
if state not in end_states:
|
if state not in end_states:
|
||||||
print "ERR: jobid = "+str(jobid)+" ended abnormally with state="+str(state)
|
print "ERR: jobid = "+str(jobid)+" ended abnormally with state="+str(state)
|
||||||
msg = component.getLastErrorMessage()
|
msg = component.getLastErrorMessage()
|
||||||
print "ERR: %s"%msg
|
print "ERR: %s"%msg
|
||||||
else:
|
else:
|
||||||
print "OK: jobid = "+str(jobid)+" ended with state="+str(state)
|
print "OK: jobid = "+str(jobid)+" ended with state="+str(state)
|
||||||
meshJobResults = component.finalize(jobid)
|
meshJobResults = component.finalize(jobid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user