mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
cohérence des tests sur MG_Adapt
This commit is contained in:
parent
ec94d246d7
commit
5ba7997f9e
@ -1,68 +0,0 @@
|
||||
# Remeshing with MG-Adapt
|
||||
import os
|
||||
import salome
|
||||
salome.salome_init()
|
||||
|
||||
import SMESH
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New()
|
||||
|
||||
# directory
|
||||
rootdir = ...
|
||||
|
||||
# Test 1 : remeshing with a local size, surface
|
||||
#--- Creation of the object for the adaptation ---
|
||||
objet_adapt = smesh.Adaptation('MG_Adapt')
|
||||
|
||||
#--- Initial mesh ---
|
||||
objet_adapt.setMEDFileIn(os.path.join(rootdir, "maill.01.med"))
|
||||
#--- Final mesh ---
|
||||
objet_adapt.setMEDFileOut(os.path.join(rootdir, "maill.01.adapt.med"))
|
||||
|
||||
#--- Creation of the hypothesis ---
|
||||
hypo = smesh.CreateAdaptationHypothesis()
|
||||
# Options
|
||||
hypo.setSizeMapType('Local')
|
||||
hypo.setSizeMapFieldName('TAILLE')
|
||||
hypo.setTimeStepRankLast()
|
||||
hypo.setOptionValue("adaptation", "surface")
|
||||
|
||||
#--- Link between hypothesis and object ---
|
||||
objet_adapt.AddHypothesis(hypo)
|
||||
|
||||
#--- Compute without publication
|
||||
err = objet_adapt.Compute(False)
|
||||
|
||||
#--- Clean
|
||||
del objet_adapt
|
||||
|
||||
|
||||
|
||||
# Test 2 : remeshing with a background size, volume
|
||||
#--- Creation of the object for the adaptation ---
|
||||
objet_adapt = smesh.Adaptation('MG_Adapt')
|
||||
|
||||
#--- Initial mesh ---
|
||||
objet_adapt.setMEDFileIn(os.path.join(rootdir, "maill.02.med"))
|
||||
#--- Background mesh ---
|
||||
objet_adapt.setMEDFileBackground(rootdir, "maill.size.02.med"))
|
||||
#--- Final mesh ---
|
||||
objet_adapt.setMEDFileOut(os.path.join(rootdir, "maill.02.adapt.med"))
|
||||
|
||||
#--- Creation of the hypothesis ---
|
||||
hypo = smesh.CreateAdaptationHypothesis()
|
||||
# Options
|
||||
hypo.setSizeMapType('Background')
|
||||
hypo.setSizeMapFieldName('TAILLE')
|
||||
hypo.setTimeStepRank(1,1)
|
||||
hypo.setOptionValue("adaptation", "both")
|
||||
|
||||
#--- Link between hypothesis and object ---
|
||||
objet_adapt.AddHypothesis(hypo)
|
||||
|
||||
#--- Compute without publication
|
||||
err = objet_adapt.Compute(False)
|
||||
|
||||
#--- Clean
|
||||
del objet_adapt
|
||||
|
@ -45,6 +45,7 @@ SET(BAD_TESTS
|
||||
radial_prism_3d_algo.py
|
||||
test_smeshplugin_mg_tetra_parallele.py
|
||||
test_smeshplugins.py
|
||||
MGAdaptTests_without_session.py
|
||||
)
|
||||
|
||||
SET(GOOD_TESTS
|
||||
@ -188,7 +189,6 @@ SET(GOOD_TESTS
|
||||
set(SESSION_FREE_TESTS
|
||||
basic_geom_smesh_without_session.py
|
||||
basic_shaper_smesh_without_session.py
|
||||
MGAdaptTests.py
|
||||
)
|
||||
|
||||
SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} ${SESSION_FREE_TESTS} testme.py)
|
||||
|
Loading…
Reference in New Issue
Block a user