From 5ba7997f9e902db704fcdc60fa9809e7e1fc6c16 Mon Sep 17 00:00:00 2001 From: GERALD NICOLAS Date: Tue, 16 Feb 2021 09:01:50 +0100 Subject: [PATCH] =?utf8?q?coh=C3=A9rence=20des=20tests=20sur=20MG=5FAdapt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ...sts.py => MGAdaptTests_without_session.py} | 0 doc/salome/examples/adaptation_ex01.py | 68 ------------------- doc/salome/examples/tests.set | 2 +- 3 files changed, 1 insertion(+), 69 deletions(-) rename doc/salome/examples/{MGAdaptTests.py => MGAdaptTests_without_session.py} (100%) delete mode 100644 doc/salome/examples/adaptation_ex01.py diff --git a/doc/salome/examples/MGAdaptTests.py b/doc/salome/examples/MGAdaptTests_without_session.py similarity index 100% rename from doc/salome/examples/MGAdaptTests.py rename to doc/salome/examples/MGAdaptTests_without_session.py diff --git a/doc/salome/examples/adaptation_ex01.py b/doc/salome/examples/adaptation_ex01.py deleted file mode 100644 index 7956f9560..000000000 --- a/doc/salome/examples/adaptation_ex01.py +++ /dev/null @@ -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 - diff --git a/doc/salome/examples/tests.set b/doc/salome/examples/tests.set index 5a9894f00..5b7fb54df 100644 --- a/doc/salome/examples/tests.set +++ b/doc/salome/examples/tests.set @@ -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) -- 2.39.2