Salome HOME
Modif cata JP
authorEric Fayolle <eric.fayolle@edf.fr>
Tue, 19 Mar 2019 17:39:32 +0000 (18:39 +0100)
committerEric Fayolle <eric.fayolle@edf.fr>
Tue, 19 Mar 2019 17:39:32 +0000 (18:39 +0100)
JP/cata_Vimmp.py

index 36a8b8b651e4ca9142ead2b20a6c89f4b234814e..6aea04032fba2f5844b12f80ca5c820d4c594d64 100755 (executable)
@@ -74,60 +74,36 @@ def bloc_description_particule_fichier ():
 def champ (nomDelaContante, labels ,nbReels ) :
 # ajouter les extensions pour le fichier et les blocs associes
 # certains champs ne seront jamais uniformes
+#PNPN : Passer le nom du champ pour le label du vecteur
     dicoBloc = {}
     dicoBloc[nomDelaContante] = SIMP (statut='o', typ = 'R')
     return FACT(statut ='o',
-       Exogene   = SIMP(statut = 'o', typ = bool),
-    )
-       #b_exogene = BLOC (condition = "Exogene == True,
-       #  type_de_champ_exogene = SIMP ( statut='o', typ = 'TXM', into = ('format', 'interface')),
-       #  b_type_de_champ_exogene_format = BLOC( condition = ' type_de_champ_exogene == "format" ',
-       #    Format = SIMP (statut='o', typ = 'TXM', into = ['txt','Med','manuel',] ),
-       #    td_manuel = BLOC ( condition = 'Format == "manuel"',
-             #Vecteur = SIMP( fenetreIhm='Tableau', homo = labels,
-             #                   statut='o', min=2, max='**',
-             #                   typ = Tuple(nbReels),
-             #                   validators=VerifTypeTuple(("'R',"*nbReels),),) # end Particule
-       #      Vecteur= SIMP( typ ='R', statut ='o', max ='**'),
-       #     ),
-       #     td_txt = BLOC ( condition = 'Format == "txt"',
-       #       Fichier        = SIMP(statut='o', typ = ('Fichier','Text Files(*.txt);All Files (*)'),),
-       #     ),
-       #     td_med = BLOC ( condition = 'Format == "txt"',
-       #       Fichier        = SIMP(statut='o', typ = ('Fichier','Med Files(*.med);All Files (*)'),),
-       #     ),
-       #  ), # b_type_de_champ_exogene_format
-       #  b_type_de_champ_exogene_interface = BLOC( condition = ' type_de_champ_exogene == "interface" ',
-       #    Interface =  SIMP ( statut='o', typ = 'TXM')
-       #  ), # b_type_de_champ_exogene_interface
-     # ),
-     # b_endogene = BLOC (condition = "Exogene == False,
-     #  Uniforme  = SIMP(statut = 'o', typ = bool),
-     #  b_uniforme = BLOC (condition = "Uniforme == True", **dicoBloc),
-     #  b_non_uniforme = BLOC (condition = "Uniforme == False", 
-     #    Categorie = SIMP(statut = 'o', typ = 'TXM', into = ['Valeurs Directes Manuelles', 'Fonction Standard', 'Fichier']),
-         
-     #    t_calcul =  BLOC ( condition = 'Categorie == "Connue"',
-     #      type_description = SIMP ( statut='o', typ = 'TXM', into = ['manuel', 'fichier']),
-     #      td_fichier = BLOC ( condition = 'type_description == "fichier"',
-     #         Format_Fichier = SIMP (statut='o', typ = 'TXM', into = ['txt','Autre',] ),
-     #         Fichier        = SIMP(statut='o', typ = ('Fichier','Med Files(*.med);All Files (*)'),),
-     #       ),
-# PNPN faire le bloc selon la longueur
-     #      td_manuel = BLOC ( condition = 'type_description == "manuel"',
+     Mode_saisie  = SIMP(statut = 'o', typ = 'TXM', into=('valeur uniforme','valeurs saisies','valeurs ds fichier','fonction analytique', 'appel de service')),
+     b_uniforme = BLOC (condition = "Mode_saisie == 'valeur uniforme'", **dicoBloc),
+     b_vsaisies = BLOC (condition = "Mode_saisie == 'valeurs saisies'", 
+        Champ = SIMP( typ ='R', statut ='o', max ='**'),
              #Vecteur = SIMP( fenetreIhm='Tableau', homo = labels,
              #                   statut='o', min=2, max='**',
              #                   typ = Tuple(nbReels),
              #                   validators=VerifTypeTuple(("'R',"*nbReels),),) # end Particule
-     #        Vecteur= SIMP( typ ='R', statut ='o', max ='**'),
-     #       ),
-     #    ),
-     #    t_externe =  BLOC ( condition = 'Categorie == "Externe"',
-     #       Code = SIMP(statut = 'o', typ = 'TXM'),
-     #  ),
-     # ),
-  #)
-
+     ), #b_vsaisie
+     b_vdsfich = BLOC (condition = "Mode_saisie == 'valeurs ds fichier'", 
+        Format = SIMP (statut='o', typ = 'TXM', into = ['txt','Med',] ),
+        td_txt = BLOC (condition = 'Format == "txt"',
+          Fichier  = SIMP(statut='o', typ = ('Fichier','Text Files(*.txt);All Files (*)'),),
+        ),
+        td_med = BLOC ( condition = 'Format == "Med"',
+          Fichier  = SIMP (statut='o', typ = ('Fichier','Med Files(*.med);All Files (*)'),),
+          NomChamp = SIMP (statut='o', typ = 'TXM', ),
+        ),
+     ),
+     b_vfct = BLOC (condition = "Mode_saisie == 'fonction analytique'", 
+        Fonction = SIMP (statut='o', typ = 'TXM', ),
+     ),
+     b_vserc = BLOC (condition = "Mode_saisie == 'appel de service'", 
+        Service = SIMP (statut='o', typ = 'TXM', ),
+     ),
+    )
  
        
    
@@ -250,19 +226,25 @@ Etude = PROC (nom = 'Etude',
              ), # fin b_champ_moyen
              b_champ_moyen_dynamique   = BLOC( condition = 'Categorie_Interaction == "champ moyen dynamique"',
                 Interaction = FACT( statut='o', max = 2, #   max = cardinalite du into 
-                   Type_Interaction = SIMP( statut='o', typ ='TXM', into = ['champ gravite','champ electrostatique']),
-                   Liste_D_Espece = SIMP ( statut ='o', typ = 'TXM', max= '**'), # faire un typ = "espece"
-                   ), #  fin Interaction
+                   Type_Interaction = SIMP( statut='o', typ ='TXM', into = ['champ electrostatique'], defaut='champ electrostatique'),
+                   Couple_D_especes = FACT (statut ='o', min=1, max = '**', # min=n, max=n(n+1)/2
+                       Nom_Des_Especes = SIMP ( statut ='o', typ = 'TXM', min=2, max=2),
+                   ),
+                   Champ_moyen_calcule=FACT( statut='o',
+                     Nom_du_champ=SIMP( statut='o', typ='TXM',),
+                     Liste_D_Espece = SIMP ( statut ='o', typ = 'TXM', max= '**'), # faire un typ = "espece"
+                   ), #  fin Champ moyen calculé
+               ), #  fin Interaction
              ), # fin b_champ_moyen_dynamique
 
 
           ), # fin definition_Physique 
 
-          Physique_Statistique   =  SIMP( statut='o', typ='TXM', defaut='Non_Equilibre', into = ['Equilibre', 'Non_Equilibre']),
+          Physique_Statistique   =  SIMP( statut='o', typ='TXM', into = ['Equilibre', 'Non_Equilibre']),
           #Physique_Statistique =SIMP( statut='o', typ='TXM', defaut='Non_Equilibre', into = ['Equilibre', 'Non_Equilibre'], position ='global'),
           #PN pourquoi global ??
           b_Physique_Statistique_Equilibre =  BLOC( condition = "Physique_Statistique == 'Equilibre'",
-             Distribution = SIMP(statut='o', typ='TXM', defaut='nvt', into=['nvt','nve']),
+             Distribution = SIMP(statut='o', typ='TXM', into=['nvt','nve']),
              b_Nvt = BLOC ( condition = "Distribution == 'nvt'",
                 Target_Temperature = SIMP( statut='o', typ='R')
              ), # fin b_nvt
@@ -275,11 +257,12 @@ Etude = PROC (nom = 'Etude',
           ), # b_Physique_statstique_equilibre                                      
          ), # fin b_Mesoscopique_Particule
 
-         Type_De_Description = FACT( min=1, max =2, statut='o', 
+         Type_De_Description = FACT( min=1, max =2, statut='o',
+             #EFEFEF : La description choisie donne la liste des modèles numériques disponibles pour cette description
              Type_Description = SIMP( statut ='o', typ = 'TXM',into = ['Description_par_Particule', 'Description_par_Champ'], ),
+             Type_D_Entite = SIMP(statut='o', typ = 'TXM', into =['Electron', 'Atome', 'Grain', 'CVE']),
              b_Particule = BLOC( condition = 'Type_Description == "Description_par_Particule"',
                 Modele_De_Particule = FACT ( statut='o', max ='**',
-                   Type_D_Entite = SIMP(statut='o', typ = 'TXM',into =['Coarse', 'Atom','CVE'], defaut='Coarse'),
                    Type_D_Approche = SIMP(statut='o', typ = 'TXM',into =['Cinetique', 'Cinetique_Etendue', 'Position']),
                 ), # Modele_De_Particule
                 Modele_Numerique = FACT ( statut='o', 
@@ -287,6 +270,7 @@ Etude = PROC (nom = 'Etude',
                    b_DPD = BLOC(condition = 'Modele_Numerique == "DPD"' ,
                       Structure_Loi_evolution = SIMP (statut = 'o', typ = 'TXM', into = ['Equations de Langevin']),
               # a faire en fonction et projection des types fonctions en XSD a reflechir
+
                       Species_Pair_Parameters = FACT(statut='o', max="**",
                       #Consigne = SIMP(statut ="o", homo="information", typ="TXM", defaut = "renvoie a InterActions_interparticulaires "),
                          Pair_Interaction = SIMP(statut ='o', max=2, typ = 'TXM'),