From: pascale.noyret Date: Wed, 24 Feb 2021 08:04:57 +0000 (+0100) Subject: echange eric X-Git-Tag: V210224_osthus~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e9098d1a60c005f58850423461fa958cd4f89eea;p=tools%2Feficas.git echange eric --- diff --git a/Efi2Xsd/AccasXsd.py b/Efi2Xsd/AccasXsd.py index ce1837e1..8ac2b937 100755 --- a/Efi2Xsd/AccasXsd.py +++ b/Efi2Xsd/AccasXsd.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- # cette version ne fonctionne pas bien + import sys,os import types import Accas diff --git a/Vimmp/cata_CSAndCPS_v15.py b/Vimmp/cata_CSAndCPS_v15.py index e135eb25..2e786d47 100644 --- a/Vimmp/cata_CSAndCPS_v15.py +++ b/Vimmp/cata_CSAndCPS_v15.py @@ -538,27 +538,27 @@ def prepareBlocCPS(): ParticleMass = FACT(statut ='o', Mass = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Mass', homo='constant'), ToSimulate = SIMP(typ=bool, statut ='o', defaut = True,), - blocSimulatedMass = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible ='Not needed'), + blocSimulatedMass = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible ='Not needed',particle=True), #blocNoSimulatedMass = prepareBlocOrigine(condition = 'ToSimulate == False'), ), ParticlePosition = FACT(statut ='o', Position = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Position', homo='constant'), ToSimulate = SIMP(typ=bool, statut ='o', defaut = True,), - blocSimulatedPosition = prepareBlocInitialisationSansTermeSource(condition = 'ToSimulate == True', ajoutPossible='Not needed'), + blocSimulatedPosition = prepareBlocInitialisationSansTermeSource(condition = 'ToSimulate == True', ajoutPossible='Not needed', particle=True), blocNoSimulatedPosition = prepareBlocOrigine(condition = 'ToSimulate == False'), ), blocNoBrownianDynamics = BLOC(condition = '(TypeOfConstraint != None) and not("Brownian dynamics" in TypeOfConstraint)', ParticleVelocity = FACT(statut ='o', Velocity = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='Velocity', homo='constant'), ToSimulate = SIMP(typ=bool, statut ='o', defaut = True,), - blocSimulatedVelocity = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible='Not needed'), + blocSimulatedVelocity = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible='Not needed',particle=True), blocNotSimulatedVelocity = prepareBlocOrigine(condition = 'ToSimulate == False',), ), #fin VelocityDefinition blocHydrodynamic = BLOC(condition = '"Hydrodynamic" in MomentumFieldType', FluidVelocitySeenByParticles = FACT(statut ='o', FluidSeenVelocity = SIMP(typ=(dynamicVariable,'createObject'), statut='o', defaut ='FluidSeenVelocity', homo='constant'), ToSimulate = SIMP(typ=bool, statut ='o', defaut = True,), - blocHydrodynamicVelocity = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible='Not needed'), + blocHydrodynamicVelocity = prepareBlocInitialisation(condition = 'ToSimulate == True', ajoutPossible='Not needed',particle=True), blocNotHydrodynamicVelocity = prepareBlocOrigine(condition = 'ToSimulate == False',), ) , ) , @@ -891,14 +891,17 @@ def prepareBlocOrigine(condition): ), ), ) -# _______________________________________ -def prepareBlocInitialisation(condition,ajoutPossible=None): -# _______________________________________ +# __________________________________________________________________ +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"', @@ -913,12 +916,13 @@ def prepareBlocInitialisation(condition,ajoutPossible=None): blocSourceTerm = prepareTermeSourceDynVar('SourceTerm==True'), ) #blocSimulatedPressure -def prepareBlocInitialisationSansTermeSource(condition,ajoutPossible=None): +def prepareBlocInitialisationSansTermeSource(condition,ajoutPossible=None, particle=True): monIntoType = ['ByValue', 'ByFile', 'ByInteraction'] if ajoutPossible != None : monIntoType.append(ajoutPossible) return BLOC(condition = condition, Initialisation = FACT(statut ='o', + ParticleIdentifier=SIMP(statut='o', typ = userParticle), InitialisationType = SIMP(statut='o', into =monIntoType, typ ='TXM', defaut='ByValue'), blocByFile = creeBlocPourLesFichiers('InitialisationType == "ByFile"', '', ListeFormats = listeFormatGenerique, FieldName='FieldName'), blocByInteraction = BLOC(condition = 'InitialisationType == "ByInteraction"',