From: Eric F Date: Fri, 20 Nov 2020 15:23:02 +0000 (+0100) Subject: Correction GNUMakefile et Mise en correspondance des versions des tests avec les... X-Git-Tag: V210224_osthus~95 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b9f72371cecee634ba0b3cdfce345cef73f300f9;p=tools%2Feficas.git Correction GNUMakefile et Mise en correspondance des versions des tests avec les versions des catalogues --- diff --git a/Vimmp/GNUmakefile b/Vimmp/GNUmakefile index 15686c72..10448251 100644 --- a/Vimmp/GNUmakefile +++ b/Vimmp/GNUmakefile @@ -43,7 +43,11 @@ cata_files= \ cata_cps.py \ cata_CSAndCPS.py \ cata_Vimmp.py \ -cata_gromacs.py +cata_gromacs.py \ +cata_CSAndCPS_v1.py \ +cata_CSAndCPS_v2.py \ +cata_CSAndCPS_v3.py \ +cata_CSAndCPS_v4.py xsd_files = $(cata_files:%.py=%.xsd) driver_files= $(cata_files:%.py=%_driver.py) @@ -64,37 +68,22 @@ driverAll: exec.sh environ.sh qtEficas.sh $(driver_files) xmllint --path $(confdir) --schema XMLSchema11_local.xsd --noout $^ #Les Tools eficas ont besoins d'un chemin absolu -# old -#.comm.xml: -# $(tooldir)/generateXML.py -c $(realpath $(<:%.comm=%.py)) $< -# new -#_test_driver_0.comm_test_driver_0.xml: -# $(tooldir)/generateXML.py -c $(realpath $(*).py) $< -#ok: -#define test_driver_rule = -#_test_driver_$1.comm_test_driver_$1.xml: -# $(tooldir)/generateXML.py -c $$(realpath $$(*).py) $$< -#endef -#ok mais a séparer en deux règles : -#define test_driver_rule = -#_test_driver_$1.comm_test_driver_$1.xml: $$(confdir)/test_driver_subst.py -# @echo -e "\n\n------ Generate xml test file $$(@) ------\n" -# $(tooldir)/generateXML.py -c $$(realpath $$(*).py) $$< -# @echo -e "\n\n------ Generate xml test driver $$(@:%.xml=%.py) ------\n" -# sed -e "s,@module@,$$(*)_driver,g" -e "s,@file@,$$(@),g" $$(confdir)/test_driver_subst.py > $$(<:%.comm=%.py) && \ -# chmod +x $$(<:%.comm=%.py); -#endef - +#ATTENTION : La .sufix rule n'autorise pas les dépendances après le : (sinon la ligne entière est un nom de fichier bizzare) +#_test_driver_$1.comm_test_driver_$1.xml: +# il faut les définir à part define test_xml_rule = -_test_driver_$1.comm_test_driver_$1.xml: +%_test_driver_$1.xml : %_test_driver_$1.comm $$(realpath $$(*).py) @echo -e "\n\n------ Generate xml test file $$(@) ------\n" + @[[ -f $$(*).py ]] || (echo "Le fichier catalogue $$(*).py est introuvable" && false) $(tooldir)/generateXML.py -c $$(realpath $$(*).py) $$< endef -#ATTENTION : De mémoire la .sufix rule n'utilise pas les dépendances après le : -# il faut les définir à part + +#ATTENTION : La .sufix rule n'autorise pas les dépendances après le : (sinon la ligne entière est un nom de fichier bizzare) +#_test_driver_$1.comm_test_driver_$1.py: +# il faut les définir à part define test_driver_rule = -_test_driver_$1.comm_test_driver_$1.py: $$(confdir)/test_driver_subst.py +%_test_driver_$1.py : %_test_driver_$1.comm @echo -e "\n\n------ Generate xml test driver $$(@) ------\n" sed -e "s,@module@,$$(*)_driver,g" -e "s,@file@,$$(<:%.comm=%.xml),g" $$(confdir)/test_driver_subst.py > $$(@) && \ chmod +x $$(<:%.comm=%.py); @@ -117,38 +106,15 @@ check test: testAll ################# REGLES DE TESTS ######################## -#OLD, UNUSED : -#Génération d'un .py de test par .xml de référence -#TODO : Améliorer la génération pour ne pas regénérer inutilement les drivers, utiliser plus les règles Makefiles... -#TODO : Gestion ds un build séparé du srcdir -testGen: $(confdir)/test_driver_subst.py - for i in `ls *_test_driver_?.comm`; \ - do \ - echo -e "\n\n------ Generate test $${i/comm/py} ------\n" \ - $(tooldir)/generateXML.py -c $$PWD/$${i/_test_driver_?.comm/.py} $${i} && \ - sed -e "s,@module@,$${i/_test_driver_?.comm/}_driver,g" -e "s,@file@,$${i/.comm/.xml},g" $(confdir)/test_driver_subst.py > $${i/comm/py} && \ - chmod +x $${i/comm/py};\ - done - -#Lancement de chaque test ds l'environement minimal -#testAll: testGen exec.sh driverAll -# for i in `ls *_test_driver*.py` ; do echo -e "\n\n------ Launching $$i ------" && ./exec.sh python $$i || break ; done -# -testAll: exec.sh driverAll $(test_driver_xml) $(test_driver_py) +testAll: exec.sh driverAll $(test_driver_py) $(test_driver_xml) echo $(test_driver_xml) echo $(test_driver_py) for i in `ls *_test_driver*.py` ; do echo -e "\n\n------ Launching $$i ------" && ./exec.sh python $$i ; done # for i in `ls *_test_driver*.py` ; do echo -e "\n\n------ Launching $$i ------" && ./exec.sh python $$i || break ; done -#multiple target avec règle non possible. -#Ecrire une génération avec un define -# $(wildcard *_test_driver_?.xml) : test_driver.py -# do sed -e "s,@module@,${@:%_test_driver=%_driver},g" -e 's,@file@,$@,g' test_driver.py > ${@:%.xml=%.py}; done - ################# REGLES DE NETTOYAGE ######################## clean: rm -f *.pyc *~ qtEficasSlm.sh exec.sh environ.sh rm -rf raw binding.py __pycache__ rm -f $(xsd_files) $(driver_files) *test_driver_?.py *test_driver_?.xml - diff --git a/Vimmp/cata_CSAndCPS_V2_test_driver_1.comm b/Vimmp/cata_CSAndCPS_V2_test_driver_1.comm deleted file mode 100644 index 2946f69c..00000000 --- a/Vimmp/cata_CSAndCPS_V2_test_driver_1.comm +++ /dev/null @@ -1,71 +0,0 @@ -P1=userDiscrete() -CS_num_FV=modeleNumDuCompo() -CS_num_CFD_Discrete_Particles=modeleNumDuCompo() -half_pipe=meshIdentifier() -inlet=meshGroup() -outlet=meshGroup() -wall=meshGroup() -symetry=meshGroup() -SD_11=meshGroup() -inlet1=meshGroup() -half_pipe2=meshIdentifier() - -Spatial_Aspects(Spatial_Discretization=(_F(Mesh_Name=half_pipe, - FileFormat='med', - FileName='/home/eric/VIMMP/vimmptraining/app/fluide+particule/datafiles/half_pipe.med', - GroupIdentifier=(inlet,outlet,wall,symetry,SD_11,),), - _F(Mesh_Name=half_pipe2, - FileFormat='med', - FileName='/home/eric/VIMMP/vimmptraining/app/fluide+particule/datafiles/half_pipe.med', - GroupIdentifier=(inlet1,),),),); - -FluidComponent=Component(SystemType='Continuum system', - PhysicalDescription=_F(FluidComplexe=False, - FlowNature='Turbulent', - TurbulenceForFlowDynamics=_F(TurbulenceModellingType='One-point moment', - RANSModel='Turbulent-Viscosity Model(TVM)', - TVMChoice='k-epsilon',), - Thermal=_F(ThermalEffects='Non thermal', - DensityEquationOfState='Constant density',),), - NumericalModel=_F(Identifier=CS_num_FV, - ModelType='Fields', - Mesh_Identifiers=None, - NumericalMethod='FV', - Solver='Code_Saturne',),); - -PartComponent=Component(SystemType='Classical particle system', - PhysicalDescription=_F(Particle=_F(ParticleNature='Discrete Particle', - DiscreteParticleName=P1, - TypeOfDiscreteParticle='Solid', - TypeOfSolid='Primary Particle', - Properties=_F(Geometry='Sphere', - ParticleRadius=99.0, - Weight=_F(Mass=99.0, - Density=99.0,), - Mechanical='Rigid',), - List_Of_Interactions=_F(Bonded_Interactions=_F( - Type_Of_Bonded_Interaction='No',), - Unbonded_Interactions=_F( - Type_Of_Unbonded_Interaction='No',), - External_Field_Interaction=_F( - Type_Of_Interaction_With_An_External_Field='No',),),),), - NumericalModel=_F(Identifier=CS_num_CFD_Discrete_Particles, - ModelType='Particles', - NumericalMethod='CFD_Discrete_Particles', - Solver='Code_Saturne',),); - -Interactions(InteractionComposant=_F(origine=CS_num_FV, - destination=CS_num_CFD_Discrete_Particles, - termeLE='Fluid_Velocity_Field',),); - -sansnom=Component(SystemType='Continuum system', - PhysicalDescription=_F(FluidComplexe=False, - FlowNature=None, - Thermal=_F(ThermalEffects='Non thermal', - DensityEquationOfState='Constant density',),), - NumericalModel=_F(Identifier=None, - ModelType='Fields', - Mesh_Identifiers=(half_pipe,), - NumericalMethod='FV', - Solver=None,),); -#CHECKSUM:cfeb01a69d022d11f6ec99fd0baf183e -:FIN CHECKSUM \ No newline at end of file diff --git a/Vimmp/cata_CSAndCPS_v2.py b/Vimmp/cata_CSAndCPS_v2.py index 7e7b170a..ab993ec5 100644 --- a/Vimmp/cata_CSAndCPS_v2.py +++ b/Vimmp/cata_CSAndCPS_v2.py @@ -501,7 +501,7 @@ Species = PROC(nom='Species', def monBlocInteractionTypeChamp (): return BLOC (condition = '1 == 1' , # a distinguer selon les cas fieldNameInOrigine = SIMP(typ='TXM', statut='o'), - fieldNameInDetgination = SIMP(typ='TXM', statut='o'), + fieldNameInDestination = SIMP(typ='TXM', statut='o'), ) Interactions = PROC(nom='Interactions', diff --git a/Vimmp/cata_CSAndCPS_v2_test_driver_1.comm b/Vimmp/cata_CSAndCPS_v2_test_driver_1.comm new file mode 100644 index 00000000..2946f69c --- /dev/null +++ b/Vimmp/cata_CSAndCPS_v2_test_driver_1.comm @@ -0,0 +1,71 @@ +P1=userDiscrete() +CS_num_FV=modeleNumDuCompo() +CS_num_CFD_Discrete_Particles=modeleNumDuCompo() +half_pipe=meshIdentifier() +inlet=meshGroup() +outlet=meshGroup() +wall=meshGroup() +symetry=meshGroup() +SD_11=meshGroup() +inlet1=meshGroup() +half_pipe2=meshIdentifier() + +Spatial_Aspects(Spatial_Discretization=(_F(Mesh_Name=half_pipe, + FileFormat='med', + FileName='/home/eric/VIMMP/vimmptraining/app/fluide+particule/datafiles/half_pipe.med', + GroupIdentifier=(inlet,outlet,wall,symetry,SD_11,),), + _F(Mesh_Name=half_pipe2, + FileFormat='med', + FileName='/home/eric/VIMMP/vimmptraining/app/fluide+particule/datafiles/half_pipe.med', + GroupIdentifier=(inlet1,),),),); + +FluidComponent=Component(SystemType='Continuum system', + PhysicalDescription=_F(FluidComplexe=False, + FlowNature='Turbulent', + TurbulenceForFlowDynamics=_F(TurbulenceModellingType='One-point moment', + RANSModel='Turbulent-Viscosity Model(TVM)', + TVMChoice='k-epsilon',), + Thermal=_F(ThermalEffects='Non thermal', + DensityEquationOfState='Constant density',),), + NumericalModel=_F(Identifier=CS_num_FV, + ModelType='Fields', + Mesh_Identifiers=None, + NumericalMethod='FV', + Solver='Code_Saturne',),); + +PartComponent=Component(SystemType='Classical particle system', + PhysicalDescription=_F(Particle=_F(ParticleNature='Discrete Particle', + DiscreteParticleName=P1, + TypeOfDiscreteParticle='Solid', + TypeOfSolid='Primary Particle', + Properties=_F(Geometry='Sphere', + ParticleRadius=99.0, + Weight=_F(Mass=99.0, + Density=99.0,), + Mechanical='Rigid',), + List_Of_Interactions=_F(Bonded_Interactions=_F( + Type_Of_Bonded_Interaction='No',), + Unbonded_Interactions=_F( + Type_Of_Unbonded_Interaction='No',), + External_Field_Interaction=_F( + Type_Of_Interaction_With_An_External_Field='No',),),),), + NumericalModel=_F(Identifier=CS_num_CFD_Discrete_Particles, + ModelType='Particles', + NumericalMethod='CFD_Discrete_Particles', + Solver='Code_Saturne',),); + +Interactions(InteractionComposant=_F(origine=CS_num_FV, + destination=CS_num_CFD_Discrete_Particles, + termeLE='Fluid_Velocity_Field',),); + +sansnom=Component(SystemType='Continuum system', + PhysicalDescription=_F(FluidComplexe=False, + FlowNature=None, + Thermal=_F(ThermalEffects='Non thermal', + DensityEquationOfState='Constant density',),), + NumericalModel=_F(Identifier=None, + ModelType='Fields', + Mesh_Identifiers=(half_pipe,), + NumericalMethod='FV', + Solver=None,),); +#CHECKSUM:cfeb01a69d022d11f6ec99fd0baf183e -:FIN CHECKSUM \ No newline at end of file