]> SALOME platform Git repositories - tools/eficas.git/blobdiff - generator/OpenturnsBase.py
Salome HOME
onItem=Deplie
[tools/eficas.git] / generator / OpenturnsBase.py
index 2b9d900c69e112a004dedb1cdce7b84ef7ffb46a..465c6f8dcfdfee07ec9c4da54bc69376b53889a9 100644 (file)
@@ -1,6 +1,22 @@
-#@ AJOUT OpenturnsSolver Macro
 # -*- coding: iso-8859-1 -*-
-# RESPONSABLE
+# Copyright (C) 2007-2013   EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 """
 Ce module contient la partie commune 
@@ -34,11 +50,13 @@ class Generateur :
   #---------------------------------------------------------#
     self.ListeVariables = ListeVariables
     self.ListeVariablesIn = []
+    self.ListeVariablesOut = []
     self.DictLois = DictLois
     self.DictVariables = DictVariables
     self.DictMCVal = DictMCVal
     self.DictTypeVar = {}
     self.nbVarIn = 0
+    self.nbVarOut = 0
     self.creeInfoVar()
     self.appli = appli
     #
@@ -60,10 +78,10 @@ class Generateur :
   #--------------------------#
     try :
        gener = self.module.__dict__["MonSTDGenerateur"]
-       monSTDGenerateur=gener( self.DictMCVal, self.ListeVariablesIn, self.DictLois )
+       monSTDGenerateur=gener( self.DictMCVal, self.ListeVariablesIn, self.ListeVariablesOut, self.DictLois )
     except :
         from OpenturnsSTD import STDGenerateur
-        monSTDGenerateur = STDGenerateur( self.appli, self.DictMCVal, self.ListeVariablesIn, self.DictLois )
+        monSTDGenerateur = STDGenerateur( self.appli, self.DictMCVal, self.ListeVariablesIn, self.ListeVariablesOut, self.DictLois )
     return monSTDGenerateur
       
   def getXMLGenerateur(self) :
@@ -89,6 +107,11 @@ class Generateur :
       if DictVariable["Type"] == "in" : 
          self.nbVarIn = self.nbVarIn + 1
          self.ListeVariablesIn.append( DictVariable )
+         print "OpenturnsBase.py: new input variable = ", DictVariable
+      else:
+         self.nbVarOut = self.nbVarOut + 1
+         self.ListeVariablesOut.append( DictVariable )
+         print "OpenturnsBase.py: new output variable = ", DictVariable
       liste.append( DictVariable )
       num = num + 1
     self.ListeVariables = liste