for val in dico[clef] : monSet.add(val)
return monSet
-def creeBlocPourLesFichiers (laCondition, NomDuFichier, ListeFormats):
+def creeBlocPourLesFichiers (laCondition, NomDuFichier, ListeFormats, FieldName=False):
SIMPFormatFichier = SIMP(statut='o', typ = 'TXM', into = tuple(ListeFormats) + ('others',), )
dicoDesBlocs = {}
for formatFich in ListeFormats :
blocCondition ="FileFormat == '" + formatFich + "'"
dicoDesBlocs[nomBloc] = BLOC( condition = blocCondition, FileName = SIMP(statut='o', typ = typeDesFichiers ),)
dicoDesBlocs['b_format_fichier_others'] = BLOC(condition="FileFormat == 'others'", FileName = SIMP(statut='o', typ = ('Fichier','All Files (*)'),),)
- return BLOC(condition=laCondition, FileFormat = SIMPFormatFichier, **dicoDesBlocs)
+ if FieldName:
+ SIMPFieldName = SIMP(statut='o', typ = 'TXM',)
+ return BLOC(condition=laCondition, FileFormat = SIMPFormatFichier, **dicoDesBlocs, FieldName=SIMPFieldName)
+ else :
+ return BLOC(condition=laCondition, FileFormat = SIMPFormatFichier, **dicoDesBlocs)
def champ(nomDelaContante, labels ,nbReels ) :
# ajouter les extensions pour le fichier et les blocs associes
), # fin bloc_NonThermal
bloc_ThermalEffects_Passive = BLOC(condition =' ThermalEffects == "Passive on flow dynamics"',
- ThermalFluxModel = FACT('o',
+ ThermalFluxModel = FACT(statut = 'o',
NatureOfThermalFluxModel = SIMP( statut='o', into =['Given', 'Simulated'], typ ='TXM'),
- BlocGiven =creeBlocPourLesFichiers (' NatureOfThermalFluxModel == "Given"', None, ('Med', 'cgns' ),
- ),
+ BlocGiven =creeBlocPourLesFichiers (' NatureOfThermalFluxModel == "Given"', None, ('Med', 'cgns' ), FieldName=1),
),
), # fin bloc_ThermalEffects_Passive
), # fin bloc_NonThermalEffectsAndNoEffect
- bloc_ThermalEffects = BLOC(condition = ' ThermalEffects == "Active on flow dynamics" or ThermalEffects == "Passive on flow dynamics"',
- bloc_scalar_thermal_flux = BLOC (condition = "FlowNature == 'Turbulent'",
- ThermalFluxModel = FactTurbulence('f'),
- ),# fin bloc_scalar_thermal_flux
- WithChemicalReactions = SIMP(typ=bool, statut ='o', defaut = False),
- ), # fin bloc_ThermalEffects
),# fin Fact Thermal
# ---------------------- Effets thermiques