]> SALOME platform Git repositories - modules/filter.git/commitdiff
Salome HOME
add comment on test VENDOR
authorsecher <secher>
Wed, 23 Jan 2008 08:51:18 +0000 (08:51 +0000)
committersecher <secher>
Wed, 23 Jan 2008 08:51:18 +0000 (08:51 +0000)
src/FILTER/test_filter.py

index ad06ffe5a3229ebc76a3e3a6ed7c424c408dc997..73577abe79e7f0a01673642b568ac79e6e4c2613 100644 (file)
@@ -23,22 +23,23 @@ import salome
 import SALOME_FILTER
 import libSALOME_LifeCycleCORBA
 lcc=libSALOME_LifeCycleCORBA.SALOME_LifeCycleCORBA()
-filter=lcc.FindOrLoad_Component("FactoryServer","FILTER")
+# load FILTER module
+filter=lcc.FindOrLoad_Component("","FILTER")
 inputFile=os.getenv("FILTER_ROOT_DIR")+"/share/salome/resources/filter/xx.aa.med"
-inputMesh="MeshFromEnsight"
-inputField="FieldFromEnsight"
-inputTS=0
-nbth=1
-fth=2.2
-sth=0.0
-flag=True
-rf=SALOME_FILTER.F_FIELD
 outputFile="filtered.med"
+# load input MED file
 filter.loadMED(inputFile)
-filter.readReferenceField(inputMesh,inputField,inputTS)
-filter.generateCriteria(nbth,fth,sth,flag,rf)
+# read reference field for filtering
+filter.readReferenceField("MeshFromEnsight","FieldFromEnsight",0)
+# generate filtering criteria from thersholds on reference filed
+filter.generateCriteria(1,2.2,0.,True,SALOME_FILTER.F_FIELD)
+# create ensight input files for DISTENE filtoo tool
 filter.createEnsightInputFiles()
+# call DISTENNE filtoo tool
 filter.filtering()
+# project input fileds on new mesh
 filter.projectFieldsOnDecimateMesh()
+# create output MED file
 filter.createMedOutputFile(outputFile)
+# unload MED object
 filter.unloadMED()