From 0914f81af07eadb180f45dca77027f1b34dad465 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 24 Feb 2021 09:44:39 +0100 Subject: [PATCH] echange eric --- Vimmp/cata_CSAndCPS_v15.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Vimmp/cata_CSAndCPS_v15.py b/Vimmp/cata_CSAndCPS_v15.py index 09578ca9..a97dc0b0 100644 --- a/Vimmp/cata_CSAndCPS_v15.py +++ b/Vimmp/cata_CSAndCPS_v15.py @@ -891,17 +891,14 @@ def prepareBlocOrigine(condition): ), ), ) -# __________________________________________________________________ -def prepareBlocInitialisation(condition,ajoutPossible=None,particle=False): -# __________________________________________________________________ +# ___________________________________________________________________________ +def prepareBlocInitialisation( condition, ajoutPossible=None, particle=False): +# ___________________________________________________________________________ monIntoType = ['ByValue', 'ByFile', 'ByInteraction'] - dicoParticle = {} - if particle : dicoParticle['ParticleIdentifier']=SIMP(statut='o', typ = userParticle) if ajoutPossible != None : monIntoType.append(ajoutPossible) return BLOC(condition = condition, Initialisation = FACT(statut ='o', - **dicoParticle, InitialisationType = SIMP(statut='o', into = monIntoType, typ ='TXM', defaut='ByValue'), blocByFile = creeBlocPourLesFichiers('InitialisationType == "ByFile"', '', ListeFormats = listeFormatGenerique, FieldName='FieldName'), blocByInteraction = BLOC(condition = 'InitialisationType == "ByInteraction"', @@ -918,11 +915,6 @@ def prepareBlocInitialisation(condition,ajoutPossible=None,particle=False): def prepareBlocInitialisationParticle(condition, termeSource=True): monIntoType = ['ByValue', 'ByFile', 'ByInteraction','Not needed' ] - dicoTermeSource = {} - if termeSource : - dicoTermeSource['SourceTerm'] = SIMP(typ=bool, statut='o', defaut=False), - dicoTermeSource['blocSourceTerm'] = prepareTermeSourceDynVar('SourceTerm==True') - if termeSource : return BLOC(condition = condition, Initialisation = FACT(statut ='o', @@ -946,7 +938,7 @@ def prepareBlocInitialisationParticle(condition, termeSource=True): return BLOC(condition = condition, Initialisation = FACT(statut ='o', InitialisationType = SIMP(statut='o', into =monIntoType, typ ='TXM', defaut='ByValue'), - blocNotNeeded = BLOC(condition = 'InitialisationType == "Not needed"', + blocNotNeeded = BLOC(condition = 'InitialisationType != "Not needed"', ParticleIdentifier=SIMP(statut='o', typ = userParticle), ), blocByFile = creeBlocPourLesFichiers('InitialisationType == "ByFile"', '', ListeFormats = listeFormatGenerique, FieldName='FieldName'), -- 2.39.2