From: pascale.noyret Date: Tue, 14 Sep 2021 14:44:28 +0000 (+0200) Subject: fin report des modifs de la master X-Git-Tag: livraison11Oct21~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=263558619d22e78eabe07b7e337a0f985cbeae31;p=tools%2Feficas.git fin report des modifs de la master --- diff --git a/Adao/ADAO_Cata_V0_V7_7_0.py b/Adao/ADAO_Cata_V0_V7_7_0.py deleted file mode 100755 index b9e8c02b..00000000 --- a/Adao/ADAO_Cata_V0_V7_7_0.py +++ /dev/null @@ -1,1261 +0,0 @@ -#-*-coding:iso-8859-1-*- -# -# Copyright (C) 2008-2015 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -# -------------------------------------------------------- -# Generated by AdaoCatalogGenerator on 2015-10-08 07:57:55 -# -------------------------------------------------------- - -import os, re -import Accas -from Accas import * - -JdC = JDC_CATA ( - code = 'ADAO', - execmodul = None, - regles = ( AU_MOINS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY'), AU_PLUS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY')), - ) -VERSION_CATALOGUE='V7_7_0' - -def NoCheckInNS(filename): - return 1 -NoCheckInNS.info = "" -def DirectOperatorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^def[\s]*DirectOperator[\s]*\(") - for ln in fc: - if cr.match(ln): return 1 - cr = re.compile("^DirectOperator[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -DirectOperatorInNS.info = u"The Python file has to contain explicitly a \"DirectOperator\" function definition with only one vector as argument." -def TangentOperatorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^def[\s]*TangentOperator[\s]*\(") - for ln in fc: - if cr.match(ln): return 1 - cr = re.compile("^TangentOperator[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -TangentOperatorInNS.info = u"The Python file has to contain explicitly a \"TangentOperator\" function definition with only one pair of vectors as argument." -def AdjointOperatorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^def[\s]*AdjointOperator[\s]*\(") - for ln in fc: - if cr.match(ln): return 1 - cr = re.compile("^AdjointOperator[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -AdjointOperatorInNS.info = u"The Python file has to contain explicitly an \"AdjointOperator\" function definition with only one pair of vectors as argument." - -def F_VectorSerie(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si ariable interne de meme nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Function(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("ScriptWithOneFunction", "ScriptWithFunctions", "ScriptWithSwitch", "FunctionDict", ), defaut="ScriptWithOneFunction"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Matrix(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_DiagonalSparseMatrix(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Vector(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Dict(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_ScalarSparseMatrix(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", defaut="1.", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def ObservationErrorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^ObservationError[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -ObservationErrorInNS.info = u"The Python file has to contain explicitly a \"ObservationError\" variable." -def F_ObservationError(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o", fv), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o", fv), - ), - ) - -def ObservationInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^Observation[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -ObservationInNS.info = u"The Python file has to contain explicitly a \"Observation\" variable." -def F_Observation(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o", fv), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o", fv), - ), - ) - -def BackgroundErrorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^BackgroundError[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -BackgroundErrorInNS.info = u"The Python file has to contain explicitly a \"BackgroundError\" variable." -def F_BackgroundError(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o", fv), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o", fv), - ), - ) - -def ObservationOperatorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^ObservationOperator[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -ObservationOperatorInNS.info = u"The Python file has to contain explicitly a \"ObservationOperator\" variable." -def F_ObservationOperator(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", - data = F_Function("o", fv), - ), - ) - -def CheckingPointInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^CheckingPoint[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -CheckingPointInNS.info = u"The Python file has to contain explicitly a \"CheckingPoint\" variable." -def F_CheckingPoint(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o", fv), - ), - ) - -def ControlInputInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^ControlInput[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -ControlInputInNS.info = u"The Python file has to contain explicitly a \"ControlInput\" variable." -def F_ControlInput(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o", fv), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o", fv), - ), - ) - -def BackgroundInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^Background[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -BackgroundInNS.info = u"The Python file has to contain explicitly a \"Background\" variable." -def F_Background(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o", fv), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o", fv), - ), - ) - -def AlgorithmParametersInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^AlgorithmParameters[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -AlgorithmParametersInNS.info = u"The Python file has to contain explicitly a \"AlgorithmParameters\" variable." -def F_AlgorithmParameters(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), - Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", - data = F_Dict("o", fv), - ), - ) - -def EvolutionErrorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^EvolutionError[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -EvolutionErrorInNS.info = u"The Python file has to contain explicitly a \"EvolutionError\" variable." -def F_EvolutionError(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o", fv), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o", fv), - ), - ) - -def UserDataInitInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^UserDataInit[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -UserDataInitInNS.info = u"The Python file has to contain explicitly a \"UserDataInit\" variable." -def F_UserDataInit(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), - Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", - data = F_Dict("o", fv), - ), - ) - -def EvolutionModelInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^EvolutionModel[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -EvolutionModelInNS.info = u"The Python file has to contain explicitly a \"EvolutionModel\" variable." -def F_EvolutionModel(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", - data = F_Function("o", fv), - ), - ) - -def F_UserPostAnalysis(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", "Template", ), defaut="Template"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_InitChoice() : return ("Background", - "BackgroundError", - "Observation", - "ObservationError", - "ObservationOperator", - "EvolutionModel", - "EvolutionError", - "AlgorithmParameters", - "UserPostAnalysis", - ) - -def F_Init(statut) : return FACT(statut = statut, - INIT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]), - TARGET_LIST = SIMP(statut = "o", typ = "TXM", min=1, max="**", into=F_InitChoice(), validators=(VerifExiste(2))), - ) - -def F_ObserverTemplate() : return BLOC(condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter", "ValuePrinterAndGnuPlotter", "ValueSeriePrinterAndGnuPlotter", "ValuePrinterSaverAndGnuPlotter", "ValueSeriePrinterSaverAndGnuPlotter", "ValueMean", "ValueStandardError", "ValueVariance", "ValueL2Norm", "ValueRMS")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[-1]", fr="Imprime sur la sortie standard la valeur courante de la variable", ang="Print on standard output the current value of the variable" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[:]", fr="Imprime sur la sortie standard la série des valeurs de la variable", ang="Print on standard output the value serie of the variable" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)", fr="Enregistre la valeur courante de la variable dans un fichier du répertoire '/tmp' nommé 'value...txt' selon le nom de la variable et l'étape d'enregistrement", ang="Save the current value of the variable in a file of the '/tmp' directory named 'value...txt' from the variable name and the saving step" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)", fr="Enregistre la série des valeurs de la variable dans un fichier du répertoire '/tmp' nommé 'value...txt' selon le nom de la variable et l'étape", ang="Save the value serie of the variable in a file of the '/tmp' directory named 'value...txt' from the variable name and the saving step" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier la valeur courante de la variable", ang="Print on standard output and, in the same time, save in a file the current value of the variable" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[:], ndmin=1)\nprint info,v\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier la série des valeurs de la variable", ang="Print on standard output and, in the same time, save in a file the value serie of the variable" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Affiche graphiquement avec Gnuplot la valeur courante de la variable", ang="Graphically plot with Gnuplot the current value of the variable" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Affiche graphiquement avec Gnuplot la série des valeurs de la variable", ang="Graphically plot with Gnuplot the value serie of the variable" ), - ), - ValuePrinterAndGnuPlotter = BLOC (condition = " Template == 'ValuePrinterAndGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[-1]\nimport numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la valeur courante de la variable", ang="Print on standard output and, in the same time, graphically plot with Gnuplot the current value of the variable" ), - ), - ValueSeriePrinterAndGnuPlotter = BLOC (condition = " Template == 'ValueSeriePrinterAndGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[:] \nimport numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la série des valeurs de la variable", ang="Print on standard output and, in the same time, graphically plot with Gnuplot the value serie of the variable" ), - ), - ValuePrinterSaverAndGnuPlotter = BLOC (condition = " Template == 'ValuePrinterSaverAndGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[-1]\nimport numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier et affiche graphiquement la valeur courante de la variable ", ang="Print on standard output and, in the same, time save in a file and graphically plot the current value of the variable" ), - ), - ValueSeriePrinterSaverAndGnuPlotter = BLOC (condition = " Template == 'ValueSeriePrinterSaverAndGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print info, var[:] \nimport numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint 'Value saved in \"%s\"'%f\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier et affiche graphiquement la série des valeurs de la variable", ang="Print on standard output and, in the same, time save in a file and graphically plot the value serie of the variable" ), - ), - ValueMean = BLOC (condition = " Template == 'ValueMean' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint info, numpy.nanmean(var[-1])", fr="Imprime sur la sortie standard la moyenne de la valeur courante de la variable", ang="Print on standard output the mean of the current value of the variable" ), - ), - ValueStandardError = BLOC (condition = " Template == 'ValueStandardError' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint info, numpy.nanstd(var[-1])", fr="Imprime sur la sortie standard l'écart-type de la valeur courante de la variable", ang="Print on standard output the standard error of the current value of the variable" ), - ), - ValueVariance = BLOC (condition = " Template == 'ValueVariance' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint info, numpy.nanvar(var[-1])", fr="Imprime sur la sortie standard la variance de la valeur courante de la variable", ang="Print on standard output the variance of the current value of the variable" ), - ), - ValueL2Norm = BLOC (condition = " Template == 'ValueL2Norm' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nv = numpy.matrix( numpy.ravel( var[-1] ) )\nprint info, float( numpy.linalg.norm(v) )", fr="Imprime sur la sortie standard la norme L2 de la valeur courante de la variable", ang="Print on standard output the L2 norm of the current value of the variable" ), - ), - ValueRMS = BLOC (condition = " Template == 'ValueRMS' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nv = numpy.matrix( numpy.ravel( var[-1] ) )\nprint info, float( numpy.sqrt((1./v.size)*(v*v.T)) )", fr="Imprime sur la sortie standard la racine de la moyenne des carrés (RMS), ou moyenne quadratique, de la valeur courante de la variable", ang="Print on standard output the root mean square (RMS), or quadratic mean, of the current value of the variable" ), - ), - ) - -def F_Observers(statut) : return FACT( - statut=statut, - SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", validators=NoRepeat(), into=(['Analysis', 'Innovation', 'InnovationAtCurrentState', 'CurrentState', 'CurrentOptimum', 'IndexOfOptimum', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulatedObservationAtCurrentOptimum', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'GradientOfCostFunctionJ', 'GradientOfCostFunctionJb', 'GradientOfCostFunctionJo', 'SigmaObs2', 'SigmaBck2', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'Residu'])), - Analysis = BLOC (condition=" 'Analysis' in set(SELECTION) ", - Analysis_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Analysis"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - Innovation = BLOC (condition=" 'Innovation' in set(SELECTION) ", - Innovation_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Innovation"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - InnovationAtCurrentState = BLOC (condition=" 'InnovationAtCurrentState' in set(SELECTION) ", - InnovationAtCurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "InnovationAtCurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CurrentState = BLOC (condition=" 'CurrentState' in set(SELECTION) ", - CurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CurrentOptimum = BLOC (condition=" 'CurrentOptimum' in set(SELECTION) ", - CurrentOptimum_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentOptimum"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - IndexOfOptimum = BLOC (condition=" 'IndexOfOptimum' in set(SELECTION) ", - IndexOfOptimum_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "IndexOfOptimum"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtBackground = BLOC (condition=" 'SimulatedObservationAtBackground' in set(SELECTION) ", - SimulatedObservationAtBackground_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtBackground"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtCurrentState = BLOC (condition=" 'SimulatedObservationAtCurrentState' in set(SELECTION) ", - SimulatedObservationAtCurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtOptimum = BLOC (condition=" 'SimulatedObservationAtOptimum' in set(SELECTION) ", - SimulatedObservationAtOptimum_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtOptimum"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtCurrentOptimum = BLOC (condition=" 'SimulatedObservationAtCurrentOptimum' in set(SELECTION) ", - SimulatedObservationAtCurrentOptimum_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentOptimum"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - BMA = BLOC (condition=" 'BMA' in set(SELECTION) ", - BMA_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "BMA"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - OMA = BLOC (condition=" 'OMA' in set(SELECTION) ", - OMA_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "OMA"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - OMB = BLOC (condition=" 'OMB' in set(SELECTION) ", - OMB_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "OMB"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJ = BLOC (condition=" 'CostFunctionJ' in set(SELECTION) ", - CostFunctionJ_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJ"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJb = BLOC (condition=" 'CostFunctionJb' in set(SELECTION) ", - CostFunctionJb_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJb"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJo = BLOC (condition=" 'CostFunctionJo' in set(SELECTION) ", - CostFunctionJo_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJo"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJ = BLOC (condition=" 'GradientOfCostFunctionJ' in set(SELECTION) ", - GradientOfCostFunctionJ_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJ"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJb = BLOC (condition=" 'GradientOfCostFunctionJb' in set(SELECTION) ", - GradientOfCostFunctionJb_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJb"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJo = BLOC (condition=" 'GradientOfCostFunctionJo' in set(SELECTION) ", - GradientOfCostFunctionJo_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJo"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SigmaObs2 = BLOC (condition=" 'SigmaObs2' in set(SELECTION) ", - SigmaObs2_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaObs2"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SigmaBck2 = BLOC (condition=" 'SigmaBck2' in set(SELECTION) ", - SigmaBck2_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaBck2"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriCorrelations = BLOC (condition=" 'APosterioriCorrelations' in set(SELECTION) ", - APosterioriCorrelations_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCorrelations"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriCovariance = BLOC (condition=" 'APosterioriCovariance' in set(SELECTION) ", - APosterioriCovariance_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCovariance"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriStandardDeviations = BLOC (condition=" 'APosterioriStandardDeviations' in set(SELECTION) ", - APosterioriStandardDeviations_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriStandardDeviations"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriVariances = BLOC (condition=" 'APosterioriVariances' in set(SELECTION) ", - APosterioriVariances_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriVariances"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - Residu = BLOC (condition=" 'Residu' in set(SELECTION) ", - Residu_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Residu"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - ) - -def AlgorithmParametersInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^AlgorithmParameters[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -AlgorithmParametersInNS.info = u"The Python file has to contain explicitly an \"AlgorithmParameters\" variable." -def F_AlgorithmParameters(statut, algos_names, fv=NoCheckInNS) : return FACT( - statut = statut, - Algorithm = SIMP(statut="o", typ = "TXM", into = algos_names ), - Parameters = SIMP(statut="f", typ = "TXM", into=("Defaults", "Dict") ), - Dict = BLOC ( condition = " Parameters == 'Dict' ", - statut="f", - data = F_Dict("o", fv), - ), - Parameters3DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '3DVAR') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'CurrentState', 'CurrentOptimum', 'IndexOfOptimum', 'Innovation', 'InnovationAtCurrentState', 'CostFunctionJAtCurrentOptimum', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulatedObservationAtCurrentOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - Parameters4DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '4DVAR') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), - ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'CurrentState', 'CostFunctionJ', 'IndexOfOptimum', 'CurrentOptimum', 'CostFunctionJAtCurrentOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'Blue') ", - statut="f", - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SigmaBck2', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersDerivativeFreeOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'DerivativeFreeOptimization') ", - statut="f", - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - MaximumNumberOfFunctionEvaluations = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de d'évaluations de la function"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="POWELL", into=['POWELL', 'SIMPLEX'], fr="Minimiseur utilisé"), - QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'DA', 'WeightedLeastSquares', 'WLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), - StateVariationTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=0.0001, fr="Variation relative maximale de l'état lors de l'arrêt"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'CostFunctionJ', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersEnsembleBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'EnsembleBlue') ", - statut="f", - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersExtendedBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedBlue') ", - statut="f", - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SigmaBck2', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersExtendedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedKalmanFilter') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'KalmanFilter') ", - statut="f", - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearLeastSquares') ", - statut="f", - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['OMA', 'CurrentState', 'CostFunctionJ', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersNonLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'NonLinearLeastSquares') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS', 'LM'], fr="Minimiseur utilisé"), - ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersParticleSwarmOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ParticleSwarmOptimization') ", - statut="f", - BoxBounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes d'incréments de paramètres"), - GroupRecallRate = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Taux de rappel au meilleur insecte du groupe (entre 0 et 1)"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=50, fr="Nombre maximal de pas d'optimisation"), - NumberOfInsects = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=100, fr="Nombre d'insectes dans l'essaim"), - QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - SwarmVelocity = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1.0, fr="Vitesse de groupe imposée par l'essaim"), - ), - ParametersQuantileRegression = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'QuantileRegression') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-06, fr="Maximum de variation de la fonction d'estimation lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="MMQR", into=['MMQR'], fr="Minimiseur utilisé"), - Quantile = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Quantile pour la regression de quantile"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersUnscentedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'UnscentedKalmanFilter') ", - statut="f", - Alpha = SIMP(statut="f", typ="R", val_min=0.0001, val_max=1.0, min=1, max=1, defaut=1.0, fr=""), - Beta = SIMP(statut="f", typ="R", min=1, max=1, defaut=2.0, fr=""), - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - Kappa = SIMP(statut="f", typ="I", val_max=2, min=1, max=1, defaut=0, fr=""), - Reconditioner = SIMP(statut="f", typ="R", val_min=0.001, val_max=10.0, min=1, max=1, defaut=1.0, fr=""), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersAdjointTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'AdjointTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="ScalarProduct", into=['ScalarProduct'], fr="Formule de résidu utilisée"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersFunctionTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'FunctionTest') ", - statut="f", - NumberOfPrintedDigits = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=5, fr="Nombre de chiffres affichés pour les impressions de réels"), - NumberOfRepetition = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=1, fr="Nombre de fois où l'exécution de la fonction est répétée"), - SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersGradientTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'GradientTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Norm', 'TaylorOnNorm', 'Taylor'], fr="Formule de résidu utilisée"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersLinearityTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearityTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="CenteredDL", into=['CenteredDL', 'Taylor', 'NominalTaylor', 'NominalTaylorRMS'], fr="Formule de résidu utilisée"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersSamplingTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'SamplingTest') ", - statut="f", - QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), - SampleAsExplicitHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable comme une liste"), - SampleAsIndependantRandomVariables = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont les points sur chaque axe proviennent de l'échantillonage indépendant de la variable selon la spécification ['distribution',[parametres],nombre]"), - SampleAsMinMaxStepHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable par un triplet [min,max,step]"), - SampleAsnUplet = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par une liste de n-uplet"), - SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CostFunctionJ', 'CurrentState', 'InnovationAtCurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersTangentTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'TangentTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Taylor'], fr="Formule de résidu utilisée"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ) - -def F_variables(statut) : return FACT( - statut=statut, - regles = ( MEME_NOMBRE ('NAMES', 'SIZES')), - NAMES = SIMP(statut="o", typ="TXM", max="**", validators=NoRepeat()), - SIZES = SIMP(statut="o", typ="I", val_min=1, max="**") - ) -def ChDir(dirname): - os.chdir(os.path.abspath(dirname)) - return 1 -ChDir.info = u"This has to be a regular directory path." - -ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", - op=None, - repetable = "n", - StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Calculation Case"), - StudyRepertory = SIMP(statut="f", typ = "Repertoire", validators=FunctionVal(ChDir), min=1, max=1), - Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), - AlgorithmParameters = F_AlgorithmParameters("o",("3DVAR", "4DVAR", "Blue", "DerivativeFreeOptimization", "EnsembleBlue", "ExtendedBlue", "ExtendedKalmanFilter", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", "UnscentedKalmanFilter", ), AlgorithmParametersInNS), - Background = F_Background("o", BackgroundInNS), - BackgroundError = F_BackgroundError("o", BackgroundErrorInNS), - Observation = F_Observation("o", ObservationInNS), - ObservationError = F_ObservationError("o", ObservationErrorInNS), - ObservationOperator = F_ObservationOperator("o"), - EvolutionModel = F_EvolutionModel("f"), - EvolutionError = F_EvolutionError("f", EvolutionErrorInNS), - ControlInput = F_ControlInput("f"), - UserDataInit = F_Init("f"), - UserPostAnalysis = F_UserPostAnalysis("o"), - InputVariables = F_variables("f"), - OutputVariables = F_variables("f"), - Observers = F_Observers("f") - ) - -CHECKING_STUDY = PROC(nom="CHECKING_STUDY", - op=None, - repetable = "n", - StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Checking Case"), - StudyRepertory = SIMP(statut="f", typ = "Repertoire", validators=FunctionVal(ChDir), min=1, max=1), - Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), - AlgorithmParameters = F_AlgorithmParameters("o", ("AdjointTest", "FunctionTest", "GradientTest", "LinearityTest", "ObserverTest", "SamplingTest", "TangentTest", ), AlgorithmParametersInNS), - CheckingPoint = F_CheckingPoint("o", CheckingPointInNS), - BackgroundError = F_BackgroundError("f", BackgroundErrorInNS), - Observation = F_Observation("f", ObservationInNS), - ObservationError = F_ObservationError("f", ObservationErrorInNS), - ObservationOperator = F_ObservationOperator("o"), - UserDataInit = F_Init("f"), - Observers = F_Observers("f") - ) diff --git a/Adao/ADAO_Cata_V0_V8_3_0_DEV.py b/Adao/ADAO_Cata_V0_V8_3_0_DEV.py deleted file mode 100755 index 78beda68..00000000 --- a/Adao/ADAO_Cata_V0_V8_3_0_DEV.py +++ /dev/null @@ -1,1270 +0,0 @@ -#-*-coding:iso-8859-1-*- -# -# Copyright (C) 2008-2017 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# -# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D - -# -------------------------------------------------------- -# Generated by AdaoCatalogGenerator on 2017-03-06 09:14:06 -# -------------------------------------------------------- - -import os, re -import Accas -from Accas import * - -JdC = JDC_CATA ( - code = 'ADAO', - execmodul = None, - regles = ( AU_MOINS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY'), AU_PLUS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY')), - ) -VERSION_CATALOGUE='V8_3_0' - -def NoCheckInNS(filename): - return 1 -NoCheckInNS.info = "" -def DirectOperatorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^def[\s]*DirectOperator[\s]*\(") - for ln in fc: - if cr.match(ln): return 1 - cr = re.compile("^DirectOperator[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -DirectOperatorInNS.info = u"The Python file has to contain explicitly a \"DirectOperator\" function definition with only one vector as argument." -def TangentOperatorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^def[\s]*TangentOperator[\s]*\(") - for ln in fc: - if cr.match(ln): return 1 - cr = re.compile("^TangentOperator[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -TangentOperatorInNS.info = u"The Python file has to contain explicitly a \"TangentOperator\" function definition with only one pair of vectors as argument." -def AdjointOperatorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^def[\s]*AdjointOperator[\s]*\(") - for ln in fc: - if cr.match(ln): return 1 - cr = re.compile("^AdjointOperator[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -AdjointOperatorInNS.info = u"The Python file has to contain explicitly an \"AdjointOperator\" function definition with only one pair of vectors as argument." - -def F_VectorSerie(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Function(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("ScriptWithOneFunction", "ScriptWithFunctions", "ScriptWithSwitch", "FunctionDict", ), defaut="ScriptWithOneFunction"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Matrix(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_DiagonalSparseMatrix(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Vector(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_Dict(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_ScalarSparseMatrix(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", defaut="1.", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def ObservationErrorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^ObservationError[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -ObservationErrorInNS.info = u"The Python file has to contain explicitly a \"ObservationError\" variable." -def F_ObservationError(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o", fv), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o", fv), - ), - ) - -def ObservationInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^Observation[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -ObservationInNS.info = u"The Python file has to contain explicitly a \"Observation\" variable." -def F_Observation(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o", fv), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o", fv), - ), - ) - -def BackgroundErrorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^BackgroundError[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -BackgroundErrorInNS.info = u"The Python file has to contain explicitly a \"BackgroundError\" variable." -def F_BackgroundError(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o", fv), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o", fv), - ), - ) - -def ObservationOperatorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^ObservationOperator[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -ObservationOperatorInNS.info = u"The Python file has to contain explicitly a \"ObservationOperator\" variable." -def F_ObservationOperator(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", - data = F_Function("o", fv), - ), - ) - -def CheckingPointInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^CheckingPoint[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -CheckingPointInNS.info = u"The Python file has to contain explicitly a \"CheckingPoint\" variable." -def F_CheckingPoint(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o", fv), - ), - ) - -def ControlInputInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^ControlInput[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -ControlInputInNS.info = u"The Python file has to contain explicitly a \"ControlInput\" variable." -def F_ControlInput(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o", fv), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o", fv), - ), - ) - -def BackgroundInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^Background[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -BackgroundInNS.info = u"The Python file has to contain explicitly a \"Background\" variable." -def F_Background(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), - Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", - data = F_Vector("o", fv), - ), - VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", - data = F_VectorSerie("o", fv), - ), - ) - -def AlgorithmParametersInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^AlgorithmParameters[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -AlgorithmParametersInNS.info = u"The Python file has to contain explicitly a \"AlgorithmParameters\" variable." -def F_AlgorithmParameters(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), - Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", - data = F_Dict("o", fv), - ), - ) - -def EvolutionErrorInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^EvolutionError[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -EvolutionErrorInNS.info = u"The Python file has to contain explicitly a \"EvolutionError\" variable." -def F_EvolutionError(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", - data = F_ScalarSparseMatrix("o", fv), - ), - DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", - data = F_DiagonalSparseMatrix("o", fv), - ), - ) - -def UserDataInitInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^UserDataInit[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -UserDataInitInNS.info = u"The Python file has to contain explicitly a \"UserDataInit\" variable." -def F_UserDataInit(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), - Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", - data = F_Dict("o", fv), - ), - ) - -def EvolutionModelInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^EvolutionModel[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -EvolutionModelInNS.info = u"The Python file has to contain explicitly a \"EvolutionModel\" variable." -def F_EvolutionModel(statut, fv=NoCheckInNS) : return FACT( - statut=statut, - Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), - Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", - data = F_Matrix("o", fv), - ), - Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", - data = F_Function("o", fv), - ), - ) - -def F_UserPostAnalysis(statut, fv=NoCheckInNS) : return FACT( - statut = statut, - FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", "Template", ), defaut="Template"), - SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", - SCRIPT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), - ), - STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", - STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", - SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), - ), - SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", - SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), - DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), - CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), - EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), - NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), - ), - SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", - SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), - ), - TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), - AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa" ), - ), - AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint 'Analysis saved in \"%s\"'%f\nnumpy.savetxt(f,xa)" ), - ), - ), - ) - -def F_InitChoice() : return ("Background", - "BackgroundError", - "Observation", - "ObservationError", - "ObservationOperator", - "EvolutionModel", - "EvolutionError", - "AlgorithmParameters", - "UserPostAnalysis", - ) - -def F_Init(statut) : return FACT(statut = statut, - INIT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]), - TARGET_LIST = SIMP(statut = "o", typ = "TXM", min=1, max="**", into=F_InitChoice(), validators=(VerifExiste(2))), - ) - -def F_ObserverTemplate() : return BLOC(condition = " NodeType == 'Template' ", - Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueAndIndexPrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueIndexPrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter", "ValuePrinterAndGnuPlotter", "ValueSeriePrinterAndGnuPlotter", "ValuePrinterSaverAndGnuPlotter", "ValueSeriePrinterSaverAndGnuPlotter", "ValueMean", "ValueStandardError", "ValueVariance", "ValueL2Norm", "ValueRMS")), - ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[-1]))", fr="Imprime sur la sortie standard la valeur courante de la variable", ang="Print on standard output the current value of the variable" ), - ), - ValueAndIndexPrinter = BLOC (condition = " Template == 'ValueAndIndexPrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+(\" index %i:\"%(len(var)-1))+\" \"+str(var[-1]))", fr="Imprime sur la sortie standard la valeur courante de la variable, en ajoutant son index", ang="Print on standard output the current value of the variable, adding its index" ), - ), - ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[:]))", fr="Imprime sur la sortie standard la série des valeurs de la variable", ang="Print on standard output the value series of the variable" ), - ), - ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Enregistre la valeur courante de la variable dans un fichier du répertoire '/tmp' nommé 'value...txt' selon le nom de la variable et l'étape d'enregistrement", ang="Save the current value of the variable in a file of the '/tmp' directory named 'value...txt' from the variable name and the saving step" ), - ), - ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Enregistre la série des valeurs de la variable dans un fichier du répertoire '/tmp' nommé 'value...txt' selon le nom de la variable et l'étape", ang="Save the value series of the variable in a file of the '/tmp' directory named 'value...txt' from the variable name and the saving step" ), - ), - ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nprint(str(info)+\" \"+str(v))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps enregistre dans un fichier, la valeur courante de la variable", ang="Print on standard output and, in the same time save in a file, the current value of the variable" ), - ), - ValueIndexPrinterAndSaver = BLOC (condition = " Template == 'ValueIndexPrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nprint(str(info)+(\" index %i:\"%(len(var)-1))+\" \"+str(v))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps enregistre dans un fichier, la valeur courante de la variable, en ajoutant son index", ang="Print on standard output and, in the same time save in a file, the current value of the variable, adding its index" ), - ), - ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[:], ndmin=1)\nprint(str(info)+\" \"+str(v))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier la série des valeurs de la variable", ang="Print on standard output and, in the same time, save in a file the value series of the variable" ), - ), - ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Affiche graphiquement avec Gnuplot la valeur courante de la variable", ang="Graphically plot with Gnuplot the current value of the variable" ), - ), - ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Affiche graphiquement avec Gnuplot la série des valeurs de la variable", ang="Graphically plot with Gnuplot the value series of the variable" ), - ), - ValuePrinterAndGnuPlotter = BLOC (condition = " Template == 'ValuePrinterAndGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[-1]))\nimport numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la valeur courante de la variable", ang="Print on standard output and, in the same time, graphically plot with Gnuplot the current value of the variable" ), - ), - ValueSeriePrinterAndGnuPlotter = BLOC (condition = " Template == 'ValueSeriePrinterAndGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[:]))\nimport numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la série des valeurs de la variable", ang="Print on standard output and, in the same time, graphically plot with Gnuplot the value series of the variable" ), - ), - ValuePrinterSaverAndGnuPlotter = BLOC (condition = " Template == 'ValuePrinterSaverAndGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[-1]))\nimport numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier et affiche graphiquement la valeur courante de la variable ", ang="Print on standard output and, in the same, time save in a file and graphically plot the current value of the variable" ), - ), - ValueSeriePrinterSaverAndGnuPlotter = BLOC (condition = " Template == 'ValueSeriePrinterSaverAndGnuPlotter' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[:]))\nimport numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier et affiche graphiquement la série des valeurs de la variable", ang="Print on standard output and, in the same, time save in a file and graphically plot the value series of the variable" ), - ), - ValueMean = BLOC (condition = " Template == 'ValueMean' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint(str(info)+\" \"+str(numpy.nanmean(var[-1])))", fr="Imprime sur la sortie standard la moyenne de la valeur courante de la variable", ang="Print on standard output the mean of the current value of the variable" ), - ), - ValueStandardError = BLOC (condition = " Template == 'ValueStandardError' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint(str(info)+\" \"+str(numpy.nanstd(var[-1])))", fr="Imprime sur la sortie standard l'écart-type de la valeur courante de la variable", ang="Print on standard output the standard error of the current value of the variable" ), - ), - ValueVariance = BLOC (condition = " Template == 'ValueVariance' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint(str(info)+\" \"+str(numpy.nanvar(var[-1])))", fr="Imprime sur la sortie standard la variance de la valeur courante de la variable", ang="Print on standard output the variance of the current value of the variable" ), - ), - ValueL2Norm = BLOC (condition = " Template == 'ValueL2Norm' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nv = numpy.matrix( numpy.ravel( var[-1] ) )\nprint(str(info)+\" \"+str(float( numpy.linalg.norm(v) )))", fr="Imprime sur la sortie standard la norme L2 de la valeur courante de la variable", ang="Print on standard output the L2 norm of the current value of the variable" ), - ), - ValueRMS = BLOC (condition = " Template == 'ValueRMS' ", - ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nv = numpy.matrix( numpy.ravel( var[-1] ) )\nprint(str(info)+\" \"+str(float( numpy.sqrt((1./v.size)*(v*v.T)) )))", fr="Imprime sur la sortie standard la racine de la moyenne des carrés (RMS), ou moyenne quadratique, de la valeur courante de la variable", ang="Print on standard output the root mean square (RMS), or quadratic mean, of the current value of the variable" ), - ), - ) - -def F_Observers(statut) : return FACT( - statut=statut, - SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**",homo="SansOrdreNiDoublon", validators=NoRepeat(), into=(['Analysis', 'Innovation', 'InnovationAtCurrentState', 'CurrentState', 'CurrentOptimum', 'IndexOfOptimum', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulatedObservationAtCurrentOptimum', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'GradientOfCostFunctionJ', 'GradientOfCostFunctionJb', 'GradientOfCostFunctionJo', 'SigmaObs2', 'SigmaBck2', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'Residu'])), - #SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", validators=NoRepeat(), into=(['Analysis', 'Innovation', 'InnovationAtCurrentState', 'CurrentState', 'CurrentOptimum', 'IndexOfOptimum', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulatedObservationAtCurrentOptimum', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'GradientOfCostFunctionJ', 'GradientOfCostFunctionJb', 'GradientOfCostFunctionJo', 'SigmaObs2', 'SigmaBck2', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'Residu'])), - Analysis = BLOC (condition=" 'Analysis' in set(SELECTION) ", - Analysis_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Analysis"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - Innovation = BLOC (condition=" 'Innovation' in set(SELECTION) ", - Innovation_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Innovation"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - InnovationAtCurrentState = BLOC (condition=" 'InnovationAtCurrentState' in set(SELECTION) ", - InnovationAtCurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "InnovationAtCurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CurrentState = BLOC (condition=" 'CurrentState' in set(SELECTION) ", - CurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CurrentOptimum = BLOC (condition=" 'CurrentOptimum' in set(SELECTION) ", - CurrentOptimum_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentOptimum"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - IndexOfOptimum = BLOC (condition=" 'IndexOfOptimum' in set(SELECTION) ", - IndexOfOptimum_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "IndexOfOptimum"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtBackground = BLOC (condition=" 'SimulatedObservationAtBackground' in set(SELECTION) ", - SimulatedObservationAtBackground_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtBackground"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtCurrentState = BLOC (condition=" 'SimulatedObservationAtCurrentState' in set(SELECTION) ", - SimulatedObservationAtCurrentState_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentState"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtOptimum = BLOC (condition=" 'SimulatedObservationAtOptimum' in set(SELECTION) ", - SimulatedObservationAtOptimum_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtOptimum"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SimulatedObservationAtCurrentOptimum = BLOC (condition=" 'SimulatedObservationAtCurrentOptimum' in set(SELECTION) ", - SimulatedObservationAtCurrentOptimum_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentOptimum"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - BMA = BLOC (condition=" 'BMA' in set(SELECTION) ", - BMA_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "BMA"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - OMA = BLOC (condition=" 'OMA' in set(SELECTION) ", - OMA_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "OMA"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - OMB = BLOC (condition=" 'OMB' in set(SELECTION) ", - OMB_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "OMB"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJ = BLOC (condition=" 'CostFunctionJ' in set(SELECTION) ", - CostFunctionJ_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJ"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJb = BLOC (condition=" 'CostFunctionJb' in set(SELECTION) ", - CostFunctionJb_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJb"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - CostFunctionJo = BLOC (condition=" 'CostFunctionJo' in set(SELECTION) ", - CostFunctionJo_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJo"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJ = BLOC (condition=" 'GradientOfCostFunctionJ' in set(SELECTION) ", - GradientOfCostFunctionJ_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJ"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJb = BLOC (condition=" 'GradientOfCostFunctionJb' in set(SELECTION) ", - GradientOfCostFunctionJb_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJb"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - GradientOfCostFunctionJo = BLOC (condition=" 'GradientOfCostFunctionJo' in set(SELECTION) ", - GradientOfCostFunctionJo_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJo"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SigmaObs2 = BLOC (condition=" 'SigmaObs2' in set(SELECTION) ", - SigmaObs2_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaObs2"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - SigmaBck2 = BLOC (condition=" 'SigmaBck2' in set(SELECTION) ", - SigmaBck2_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaBck2"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriCorrelations = BLOC (condition=" 'APosterioriCorrelations' in set(SELECTION) ", - APosterioriCorrelations_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCorrelations"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriCovariance = BLOC (condition=" 'APosterioriCovariance' in set(SELECTION) ", - APosterioriCovariance_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCovariance"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriStandardDeviations = BLOC (condition=" 'APosterioriStandardDeviations' in set(SELECTION) ", - APosterioriStandardDeviations_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriStandardDeviations"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - APosterioriVariances = BLOC (condition=" 'APosterioriVariances' in set(SELECTION) ", - APosterioriVariances_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriVariances"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - Residu = BLOC (condition=" 'Residu' in set(SELECTION) ", - Residu_data = FACT(statut = "o", - Scheduler = SIMP(statut = "f", typ = "TXM"), - Info = SIMP(statut = "o", typ = "TXM", defaut = "Residu"), - NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), - PythonScript = BLOC (condition = " NodeType == 'String' ", - Value = SIMP(statut = "o", typ = "TXM") - ), - UserFile = BLOC (condition = " NodeType == 'Script' ", - Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) - ), - ObserverTemplate = F_ObserverTemplate(), - ), - ), - ) - -def AlgorithmParametersInNS(filename): - if os.path.exists(filename): - fc = open(filename, 'r').readlines() - cr = re.compile("^AlgorithmParameters[\s]*=") - for ln in fc: - if cr.match(ln): return 1 - return 0 -AlgorithmParametersInNS.info = u"The Python file has to contain explicitly an \"AlgorithmParameters\" variable." -def F_AlgorithmParameters(statut, algos_names, fv=NoCheckInNS) : return FACT( - statut = statut, - Algorithm = SIMP(statut="o", typ = "TXM", into = algos_names ), - Parameters = SIMP(statut="f", typ = "TXM", into=("Defaults", "Dict") ), - Dict = BLOC ( condition = " Parameters == 'Dict' ", - statut="f", - data = F_Dict("o", fv), - ), - Parameters3DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '3DVAR') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'CurrentState', 'CurrentOptimum', 'IndexOfOptimum', 'Innovation', 'InnovationAtCurrentState', 'CostFunctionJAtCurrentOptimum', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulatedObservationAtCurrentOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - Parameters4DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '4DVAR') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), - ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'IndexOfOptimum', 'CurrentOptimum', 'CostFunctionJAtCurrentOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'Blue') ", - statut="f", - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation', 'SigmaBck2', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersDerivativeFreeOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'DerivativeFreeOptimization') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - MaximumNumberOfFunctionEvaluations = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal d'évaluations de la fonction"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="BOBYQA", into=['BOBYQA', 'COBYLA', 'NEWUOA', 'POWELL', 'SIMPLEX', 'SUBPLEX'], fr="Minimiseur utilisé"), - QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'DA', 'WeightedLeastSquares', 'WLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), - StateVariationTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=0.0001, fr="Variation relative maximale de l'état lors de l'arrêt"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'CostFunctionJAtCurrentOptimum', 'CurrentOptimum', 'IndexOfOptimum', 'InnovationAtCurrentState', 'BMA', 'OMA', 'OMB', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersEnsembleBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'EnsembleBlue') ", - statut="f", - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersExtendedBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedBlue') ", - statut="f", - NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), - Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation', 'SigmaBck2', 'SigmaObs2', 'MahalanobisConsistency', 'SimulationQuantiles', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersExtendedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedKalmanFilter') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'KalmanFilter') ", - statut="f", - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearLeastSquares') ", - statut="f", - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['OMA', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersNonLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'NonLinearLeastSquares') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), - GradientNormTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS', 'LM'], fr="Minimiseur utilisé"), - ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersParticleSwarmOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ParticleSwarmOptimization') ", - statut="f", - BoxBounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes d'incréments de paramètres"), - GroupRecallRate = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Taux de rappel au meilleur insecte du groupe (entre 0 et 1)"), - MaximumNumberOfFunctionEvaluations = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal d'évaluations de la fonction"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=50, fr="Nombre maximal de pas d'optimisation"), - NumberOfInsects = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=100, fr="Nombre d'insectes dans l'essaim"), - QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - SwarmVelocity = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1.0, fr="Vitesse de groupe imposée par l'essaim"), - ), - ParametersQuantileRegression = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'QuantileRegression') ", - statut="f", - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-06, fr="Maximum de variation de la fonction d'estimation lors de l'arrêt"), - MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), - Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="MMQR", into=['MMQR'], fr="Minimiseur utilisé"), - Quantile = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Quantile pour la regression de quantile"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['BMA', 'OMA', 'OMB', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersUnscentedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'UnscentedKalmanFilter') ", - statut="f", - Alpha = SIMP(statut="f", typ="R", val_min=0.0001, val_max=1.0, min=1, max=1, defaut=1.0, fr=""), - Beta = SIMP(statut="f", typ="R", min=1, max=1, defaut=2.0, fr=""), - Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), - ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), - EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), - Kappa = SIMP(statut="f", typ="I", val_max=2, min=1, max=1, defaut=0, fr=""), - Reconditioner = SIMP(statut="f", typ="R", val_min=0.001, val_max=10.0, min=1, max=1, defaut=1.0, fr=""), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersAdjointTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'AdjointTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="ScalarProduct", into=['ScalarProduct'], fr="Formule de résidu utilisée"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersFunctionTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'FunctionTest') ", - statut="f", - NumberOfPrintedDigits = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=5, fr="Nombre de chiffres affichés pour les impressions de réels"), - NumberOfRepetition = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=1, fr="Nombre de fois où l'exécution de la fonction est répétée"), - SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersGradientTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'GradientTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Norm', 'TaylorOnNorm', 'Taylor'], fr="Formule de résidu utilisée"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersLinearityTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearityTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="CenteredDL", into=['CenteredDL', 'Taylor', 'NominalTaylor', 'NominalTaylorRMS'], fr="Formule de résidu utilisée"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersSamplingTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'SamplingTest') ", - statut="f", - QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), - SampleAsExplicitHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable comme une liste"), - SampleAsIndependantRandomVariables = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont les points sur chaque axe proviennent de l'échantillonage indépendant de la variable selon la spécification ['distribution',[parametres],nombre]"), - SampleAsMinMaxStepHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable par un triplet [min,max,step]"), - SampleAsnUplet = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par une liste de n-uplet"), - SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'CurrentState', 'InnovationAtCurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ParametersTangentTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'TangentTest') ", - statut="f", - AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), - AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), - EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), - InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), - ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Taylor'], fr="Formule de résidu utilisée"), - SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), - StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), - ), - ) - -def F_variables(statut) : return FACT( - statut=statut, - regles = ( MEME_NOMBRE ('NAMES', 'SIZES')), - NAMES = SIMP(statut="o", typ="TXM", max="**", validators=NoRepeat()), - SIZES = SIMP(statut="o", typ="I", val_min=1, max="**") - ) -def ChDir(dirname): - os.chdir(os.path.abspath(dirname)) - return 1 -ChDir.info = u"This has to be a regular directory path." - -ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", - op=None, - repetable = "n", - StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Calculation Case"), - StudyRepertory = SIMP(statut="f", typ = "Repertoire", validators=FunctionVal(ChDir), min=1, max=1), - Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), - AlgorithmParameters = F_AlgorithmParameters("o",("3DVAR", "4DVAR", "Blue", "DerivativeFreeOptimization", "EnsembleBlue", "ExtendedBlue", "ExtendedKalmanFilter", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", "UnscentedKalmanFilter", ), AlgorithmParametersInNS), - Background = F_Background("o", BackgroundInNS), - BackgroundError = F_BackgroundError("o", BackgroundErrorInNS), - Observation = F_Observation("o", ObservationInNS), - ObservationError = F_ObservationError("o", ObservationErrorInNS), - ObservationOperator = F_ObservationOperator("o"), - EvolutionModel = F_EvolutionModel("f"), - EvolutionError = F_EvolutionError("f", EvolutionErrorInNS), - ControlInput = F_ControlInput("f"), - UserDataInit = F_Init("f"), - UserPostAnalysis = F_UserPostAnalysis("o"), - InputVariables = F_variables("f"), - OutputVariables = F_variables("f"), - Observers = F_Observers("f") - ) - -CHECKING_STUDY = PROC(nom="CHECKING_STUDY", - op=None, - repetable = "n", - StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Checking Case"), - StudyRepertory = SIMP(statut="f", typ = "Repertoire", validators=FunctionVal(ChDir), min=1, max=1), - Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), - AlgorithmParameters = F_AlgorithmParameters("o", ("AdjointTest", "FunctionTest", "GradientTest", "LinearityTest", "ObserverTest", "SamplingTest", "TangentTest", ), AlgorithmParametersInNS), - CheckingPoint = F_CheckingPoint("o", CheckingPointInNS), - BackgroundError = F_BackgroundError("f", BackgroundErrorInNS), - Observation = F_Observation("f", ObservationInNS), - ObservationError = F_ObservationError("f", ObservationErrorInNS), - ObservationOperator = F_ObservationOperator("o"), - UserDataInit = F_Init("f"), - Observers = F_Observers("f") - ) diff --git a/Adao/ADAO_Cata_V0_pour_V9_5_0.py b/Adao/ADAO_Cata_V0_pour_V9_5_0.py new file mode 100644 index 00000000..d60b7c32 --- /dev/null +++ b/Adao/ADAO_Cata_V0_pour_V9_5_0.py @@ -0,0 +1,1361 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2020 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +# -------------------------------------------------------- +# Generated by AdaoCatalogGenerator on 2020-03-23 18:51:58 +# -------------------------------------------------------- + +import os, re +import Accas +from Accas import * + +JdC = JDC_CATA ( + code = 'ADAO', + execmodul = None, + regles = ( AU_MOINS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY'), AU_PLUS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY')), + ) +VERSION_CATALOGUE='V9_5_0' + +def NoCheckInNS(filename): + return 1 +NoCheckInNS.info = u"" +def DirectOperatorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^def[\s]*DirectOperator[\s]*\(") + for ln in fc: + if cr.match(ln): return 1 + cr = re.compile("^DirectOperator[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +DirectOperatorInNS.info = u"The Python file has to contain explicitly a \"DirectOperator\" function definition with only one vector as argument." +def TangentOperatorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^def[\s]*TangentOperator[\s]*\(") + for ln in fc: + if cr.match(ln): return 1 + cr = re.compile("^TangentOperator[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +TangentOperatorInNS.info = u"The Python file has to contain explicitly a \"TangentOperator\" function definition with only one pair of vectors as argument." +def AdjointOperatorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^def[\s]*AdjointOperator[\s]*\(") + for ln in fc: + if cr.match(ln): return 1 + cr = re.compile("^AdjointOperator[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +AdjointOperatorInNS.info = u"The Python file has to contain explicitly an \"AdjointOperator\" function definition with only one pair of vectors as argument." +def ColDataFileExtVal(filename): + __readable = (".csv", ".tsv", ".txt", ".npy", ".npz") + if os.path.exists(filename) and os.path.splitext(filename)[1] in __readable: + return 1 + return 0 +ColDataFileExtVal.info = u"The data file has to contain explicitly one or more number columns with separator, or one variable, that can fit in a unique continuous vector." + +def F_Vector(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", "DataFile", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'Python Files (*.py)',), validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + DATA_DATA = BLOC ( condition = " FROM in ( 'DataFile', ) ", + DATA_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'CSV Text Files (*.csv);;TSV Text Files (*.tsv);;TXT Text Files (*.txt);;NPY Binary Numpy Files (*.npy);;NPZ Binary Numpy Files (*.npz);;All Files (*)", ',), validators=[OnlyStr(), FunctionVal(ColDataFileExtVal)], fr="En attente d'un nom de fichier de données, avec ou sans le chemin complet pour le trouver, contenant ou plusieurs colonnes pour définir un unique vecteur continu", ang="Waiting for a data file name, with or without the full path to find it, containing one or more columns to define a unique continuous vector"), + ColMajor = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Variables en colonnes acquises ligne par ligne (0) ou colonne par colonne (1)", ang="Variables in columns acquired line by line (0) or column by column (1)"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint('Analysis:',xa)" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_VectorSerie(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", "DataFile", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'Python Files (*.py)',), validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + DATA_DATA = BLOC ( condition = " FROM in ( 'DataFile', ) ", + DATA_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'CSV Text Files (*.csv);;TSV Text Files (*.tsv);;TXT Text Files (*.txt);;NPY Binary Numpy Files (*.npy);;NPZ Binary Numpy Files (*.npz);;All Files (*)", ',), validators=[OnlyStr(), FunctionVal(ColDataFileExtVal)], fr="En attente d'un nom de fichier de données, avec ou sans le chemin complet pour le trouver, contenant ou plusieurs colonnes pour définir un unique vecteur continu", ang="Waiting for a data file name, with or without the full path to find it, containing one or more columns to define a unique continuous vector"), + ColMajor = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Variables en colonnes acquises ligne par ligne (0) ou colonne par colonne (1)", ang="Variables in columns acquired line by line (0) or column by column (1)"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint('Analysis:',xa)" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_Matrix(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'Python Files (*.py)',), validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + DATA_DATA = BLOC ( condition = " FROM in ( 'DataFile', ) ", + DATA_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'CSV Text Files (*.csv);;TSV Text Files (*.tsv);;TXT Text Files (*.txt);;NPY Binary Numpy Files (*.npy);;NPZ Binary Numpy Files (*.npz);;All Files (*)", ',), validators=[OnlyStr(), FunctionVal(ColDataFileExtVal)], fr="En attente d'un nom de fichier de données, avec ou sans le chemin complet pour le trouver, contenant ou plusieurs colonnes pour définir un unique vecteur continu", ang="Waiting for a data file name, with or without the full path to find it, containing one or more columns to define a unique continuous vector"), + ColMajor = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Variables en colonnes acquises ligne par ligne (0) ou colonne par colonne (1)", ang="Variables in columns acquired line by line (0) or column by column (1)"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint('Analysis:',xa)" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_ScalarSparseMatrix(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'Python Files (*.py)',), validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + DATA_DATA = BLOC ( condition = " FROM in ( 'DataFile', ) ", + DATA_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'CSV Text Files (*.csv);;TSV Text Files (*.tsv);;TXT Text Files (*.txt);;NPY Binary Numpy Files (*.npy);;NPZ Binary Numpy Files (*.npz);;All Files (*)", ',), validators=[OnlyStr(), FunctionVal(ColDataFileExtVal)], fr="En attente d'un nom de fichier de données, avec ou sans le chemin complet pour le trouver, contenant ou plusieurs colonnes pour définir un unique vecteur continu", ang="Waiting for a data file name, with or without the full path to find it, containing one or more columns to define a unique continuous vector"), + ColMajor = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Variables en colonnes acquises ligne par ligne (0) ou colonne par colonne (1)", ang="Variables in columns acquired line by line (0) or column by column (1)"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", defaut="1.", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint('Analysis:',xa)" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_DiagonalSparseMatrix(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="String"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'Python Files (*.py)',), validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + DATA_DATA = BLOC ( condition = " FROM in ( 'DataFile', ) ", + DATA_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'CSV Text Files (*.csv);;TSV Text Files (*.tsv);;TXT Text Files (*.txt);;NPY Binary Numpy Files (*.npy);;NPZ Binary Numpy Files (*.npz);;All Files (*)", ',), validators=[OnlyStr(), FunctionVal(ColDataFileExtVal)], fr="En attente d'un nom de fichier de données, avec ou sans le chemin complet pour le trouver, contenant ou plusieurs colonnes pour définir un unique vecteur continu", ang="Waiting for a data file name, with or without the full path to find it, containing one or more columns to define a unique continuous vector"), + ColMajor = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Variables en colonnes acquises ligne par ligne (0) ou colonne par colonne (1)", ang="Variables in columns acquired line by line (0) or column by column (1)"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint('Analysis:',xa)" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_Function(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("ScriptWithOneFunction", "ScriptWithFunctions", "ScriptWithSwitch", "FunctionDict", ), defaut="ScriptWithOneFunction"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'Python Files (*.py)',), validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + DATA_DATA = BLOC ( condition = " FROM in ( 'DataFile', ) ", + DATA_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'CSV Text Files (*.csv);;TSV Text Files (*.tsv);;TXT Text Files (*.txt);;NPY Binary Numpy Files (*.npy);;NPZ Binary Numpy Files (*.npz);;All Files (*)", ',), validators=[OnlyStr(), FunctionVal(ColDataFileExtVal)], fr="En attente d'un nom de fichier de données, avec ou sans le chemin complet pour le trouver, contenant ou plusieurs colonnes pour définir un unique vecteur continu", ang="Waiting for a data file name, with or without the full path to find it, containing one or more columns to define a unique continuous vector"), + ColMajor = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Variables en colonnes acquises ligne par ligne (0) ou colonne par colonne (1)", ang="Variables in columns acquired line by line (0) or column by column (1)"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint('Analysis:',xa)" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_Dict(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", ), defaut="Script"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'Python Files (*.py)',), validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + DATA_DATA = BLOC ( condition = " FROM in ( 'DataFile', ) ", + DATA_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'CSV Text Files (*.csv);;TSV Text Files (*.tsv);;TXT Text Files (*.txt);;NPY Binary Numpy Files (*.npy);;NPZ Binary Numpy Files (*.npz);;All Files (*)", ',), validators=[OnlyStr(), FunctionVal(ColDataFileExtVal)], fr="En attente d'un nom de fichier de données, avec ou sans le chemin complet pour le trouver, contenant ou plusieurs colonnes pour définir un unique vecteur continu", ang="Waiting for a data file name, with or without the full path to find it, containing one or more columns to define a unique continuous vector"), + ColMajor = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Variables en colonnes acquises ligne par ligne (0) ou colonne par colonne (1)", ang="Variables in columns acquired line by line (0) or column by column (1)"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint('Analysis:',xa)" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def BackgroundInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^Background[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +BackgroundInNS.info = u"The Python file has to contain explicitly a \"Background\" variable." +def F_Background(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o", fv), + ), + VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", + data = F_VectorSerie("o", fv), + ), + ) + +def BackgroundErrorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^BackgroundError[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +BackgroundErrorInNS.info = u"The Python file has to contain explicitly a \"BackgroundError\" variable." +def F_BackgroundError(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", + data = F_ScalarSparseMatrix("o", fv), + ), + DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", + data = F_DiagonalSparseMatrix("o", fv), + ), + ) + +def ObservationInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^Observation[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +ObservationInNS.info = u"The Python file has to contain explicitly a \"Observation\" variable." +def F_Observation(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o", fv), + ), + VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", + data = F_VectorSerie("o", fv), + ), + ) + +def ObservationErrorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^ObservationError[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +ObservationErrorInNS.info = u"The Python file has to contain explicitly a \"ObservationError\" variable." +def F_ObservationError(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", + data = F_ScalarSparseMatrix("o", fv), + ), + DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", + data = F_DiagonalSparseMatrix("o", fv), + ), + ) + +def ObservationOperatorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^ObservationOperator[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +ObservationOperatorInNS.info = u"The Python file has to contain explicitly a \"ObservationOperator\" variable." +def F_ObservationOperator(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", + data = F_Function("o", fv), + ), + ) + +def EvolutionModelInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^EvolutionModel[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +EvolutionModelInNS.info = u"The Python file has to contain explicitly a \"EvolutionModel\" variable." +def F_EvolutionModel(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "Function", ), defaut="Function"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + Function = BLOC ( condition = " INPUT_TYPE in ( 'Function', ) ", + data = F_Function("o", fv), + ), + ) + +def EvolutionErrorInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^EvolutionError[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +EvolutionErrorInNS.info = u"The Python file has to contain explicitly a \"EvolutionError\" variable." +def F_EvolutionError(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Matrix", "ScalarSparseMatrix", "DiagonalSparseMatrix", ), defaut="ScalarSparseMatrix"), + Matrix = BLOC ( condition = " INPUT_TYPE in ( 'Matrix', ) ", + data = F_Matrix("o", fv), + ), + ScalarSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'ScalarSparseMatrix', ) ", + data = F_ScalarSparseMatrix("o", fv), + ), + DiagonalSparseMatrix = BLOC ( condition = " INPUT_TYPE in ( 'DiagonalSparseMatrix', ) ", + data = F_DiagonalSparseMatrix("o", fv), + ), + ) + +def AlgorithmParametersInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^AlgorithmParameters[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +AlgorithmParametersInNS.info = u"The Python file has to contain explicitly a \"AlgorithmParameters\" variable." +def F_AlgorithmParameters(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), + Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", + data = F_Dict("o", fv), + ), + ) + +def UserDataInitInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^UserDataInit[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +UserDataInitInNS.info = u"The Python file has to contain explicitly a \"UserDataInit\" variable." +def F_UserDataInit(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Dict", ), defaut="Dict"), + Dict = BLOC ( condition = " INPUT_TYPE in ( 'Dict', ) ", + data = F_Dict("o", fv), + ), + ) + +def CheckingPointInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^CheckingPoint[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +CheckingPointInNS.info = u"The Python file has to contain explicitly a \"CheckingPoint\" variable." +def F_CheckingPoint(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", ), defaut="Vector"), + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o", fv), + ), + ) + +def ControlInputInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^ControlInput[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +ControlInputInNS.info = u"The Python file has to contain explicitly a \"ControlInput\" variable." +def F_ControlInput(statut, fv=NoCheckInNS) : return FACT( + statut=statut, + Stored = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), + INPUT_TYPE = SIMP(statut="o", typ = "TXM", into=("Vector", "VectorSerie", ), defaut="Vector"), + Vector = BLOC ( condition = " INPUT_TYPE in ( 'Vector', ) ", + data = F_Vector("o", fv), + ), + VectorSerie = BLOC ( condition = " INPUT_TYPE in ( 'VectorSerie', ) ", + data = F_VectorSerie("o", fv), + ), + ) + +def F_UserPostAnalysis(statut, fv=NoCheckInNS) : return FACT( + statut = statut, + FROM = SIMP(statut = "o", typ = "TXM", into=("String", "Script", "Template", ), defaut="Template"), + SCRIPT_DATA = BLOC ( condition = " FROM in ( 'Script', ) ", + SCRIPT_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'Python Files (*.py)',), validators=[OnlyStr(), FileExtVal('py'), FunctionVal(fv)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant si nécessaire la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing if necessary the definition of an internal variable of the same name as the parent concept"), + ), + DATA_DATA = BLOC ( condition = " FROM in ( 'DataFile', ) ", + DATA_FILE = SIMP(statut = "o", typ = ("FichierNoAbs",'CSV Text Files (*.csv);;TSV Text Files (*.tsv);;TXT Text Files (*.txt);;NPY Binary Numpy Files (*.npy);;NPZ Binary Numpy Files (*.npz);;All Files (*)", ',), validators=[OnlyStr(), FunctionVal(ColDataFileExtVal)], fr="En attente d'un nom de fichier de données, avec ou sans le chemin complet pour le trouver, contenant ou plusieurs colonnes pour définir un unique vecteur continu", ang="Waiting for a data file name, with or without the full path to find it, containing one or more columns to define a unique continuous vector"), + ColMajor = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Variables en colonnes acquises ligne par ligne (0) ou colonne par colonne (1)", ang="Variables in columns acquired line by line (0) or column by column (1)"), + ), + STRING_DATA = BLOC ( condition = " FROM in ( 'String', ) ", + STRING = SIMP(statut = "o", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur ou une matrice, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector or a matrix, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), + ), + SCRIPTWITHFUNCTIONS_DATA = BLOC ( condition = " FROM in ( 'ScriptWithFunctions', ) ", + SCRIPTWITHFUNCTIONS_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS), FunctionVal(TangentOperatorInNS), FunctionVal(AdjointOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variables internes trois fonctions de calcul nommées DirectOperator, TangentOperator et AdjointOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variables three computation functions named DirectOperator, TangentOperator and AdjointOperator"), + ), + SCRIPTWITHONEFUNCTION_DATA = BLOC ( condition = " FROM in ( 'ScriptWithOneFunction', ) ", + SCRIPTWITHONEFUNCTION_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py'), FunctionVal(DirectOperatorInNS)], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant en variable interne une seule fonction de calcul nommée DirectOperator", ang="Waiting for a script file name, with or without the full path to find it, containing as internal variable only one function named DirectOperator"), + DifferentialIncrement = SIMP(statut="o", typ = "R", val_min=0, val_max=1, defaut=0.01, fr="Incrément de la perturbation dX pour calculer la dérivée, construite en multipliant X par l'incrément en évitant les valeurs nulles", ang="Increment of dX perturbation to calculate the derivative, build multiplying X by the increment avoiding null values"), + CenteredFiniteDifference = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Formulation centrée (1) ou décentrée (0) pour la méthode des différences finies", ang="Centered (1) or uncentered (0) formulation for the finite differences method"), + EnableMultiProcessing = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0, fr="Calculs élémentaires effectués en séquentiel (0) ou en parallèle (1) dans la méthode des différences finies", ang="Elementary calculations done sequentially (0) or in parallel (1) in the finite differences method"), + NumberOfProcesses = SIMP(statut="f", typ = "I", val_min=0, defaut=0, fr="Nombre de processus parallèles, 0 pour un contrôle automatique", ang="Number of parallel processes, 0 for automatic control"), + ), + SCRIPTWITHSWITCH_DATA = BLOC ( condition = " FROM in ( 'ScriptWithSwitch', ) ", + SCRIPTWITHSWITCH_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')], fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant un switch pour les calculs direct, tangent et adjoint", ang="Waiting for a script file name, with or without the full path to find it, containing a switch for direct, tangent and adjoint computations"), + ), + TEMPLATE_DATA = BLOC (condition = " FROM in ( 'Template', ) ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "AnalysisPrinter", into=("AnalysisPrinter", "AnalysisSaver", "AnalysisPrinterAndSaver")), + AnalysisPrinter = BLOC (condition = " Template == 'AnalysisPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint('Analysis:',xa)" ), + ), + AnalysisSaver = BLOC (condition = " Template == 'AnalysisSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nxa=numpy.ravel(ADD.get('Analysis')[-1])\nprint 'Analysis:',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)" ), + ), + ), + ) + +def F_InitChoice() : return ("Background", + "BackgroundError", + "Observation", + "ObservationError", + "ObservationOperator", + "EvolutionModel", + "EvolutionError", + "AlgorithmParameters", + "UserPostAnalysis", + ) + +def F_Init(statut) : return FACT(statut = statut, + INIT_FILE = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]), + TARGET_LIST = SIMP(statut = "o", typ = "TXM", min=1, max="**", into=F_InitChoice(), validators=(VerifExiste(2))), + ) + +def F_ObserverTemplate() : return BLOC(condition = " NodeType == 'Template' ", + Template = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "ValuePrinter", into=("ValuePrinter", "ValueAndIndexPrinter", "ValueSeriePrinter", "ValueSaver", "ValueSerieSaver", "ValuePrinterAndSaver", "ValueIndexPrinterAndSaver", "ValueSeriePrinterAndSaver", "ValueGnuPlotter", "ValueSerieGnuPlotter", "ValuePrinterAndGnuPlotter", "ValueSeriePrinterAndGnuPlotter", "ValuePrinterSaverAndGnuPlotter", "ValueSeriePrinterSaverAndGnuPlotter", "ValueMean", "ValueStandardError", "ValueVariance", "ValueL2Norm", "ValueRMS")), + ValuePrinter = BLOC (condition = " Template == 'ValuePrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[-1]))", fr="Imprime sur la sortie standard la valeur courante de la variable", ang="Print on standard output the current value of the variable" ), + ), + ValueAndIndexPrinter = BLOC (condition = " Template == 'ValueAndIndexPrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+(\" index %i:\"%(len(var)-1))+\" \"+str(var[-1]))", fr="Imprime sur la sortie standard la valeur courante de la variable, en ajoutant son index", ang="Print on standard output the current value of the variable, adding its index" ), + ), + ValueSeriePrinter = BLOC (condition = " Template == 'ValueSeriePrinter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[:]))", fr="Imprime sur la sortie standard la série des valeurs de la variable", ang="Print on standard output the value series of the variable" ), + ), + ValueSaver = BLOC (condition = " Template == 'ValueSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Enregistre la valeur courante de la variable dans un fichier du répertoire '/tmp' nommé 'value...txt' selon le nom de la variable et l'étape d'enregistrement", ang="Save the current value of the variable in a file of the '/tmp' directory named 'value...txt' from the variable name and the saving step" ), + ), + ValueSerieSaver = BLOC (condition = " Template == 'ValueSerieSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Enregistre la série des valeurs de la variable dans un fichier du répertoire '/tmp' nommé 'value...txt' selon le nom de la variable et l'étape", ang="Save the value series of the variable in a file of the '/tmp' directory named 'value...txt' from the variable name and the saving step" ), + ), + ValuePrinterAndSaver = BLOC (condition = " Template == 'ValuePrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nprint(str(info)+\" \"+str(v))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps enregistre dans un fichier du répertoire '/tmp', la valeur courante de la variable", ang="Print on standard output and, in the same time save in a file of the '/tmp' directory, the current value of the variable" ), + ), + ValueIndexPrinterAndSaver = BLOC (condition = " Template == 'ValueIndexPrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[-1], ndmin=1)\nprint(str(info)+(\" index %i:\"%(len(var)-1))+\" \"+str(v))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps enregistre dans un fichier du répertoire '/tmp', la valeur courante de la variable, en ajoutant son index", ang="Print on standard output and, in the same time save in a file of the '/tmp' directory, the current value of the variable, adding its index" ), + ), + ValueSeriePrinterAndSaver = BLOC (condition = " Template == 'ValueSeriePrinterAndSaver' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, re\nv=numpy.array(var[:], ndmin=1)\nprint(str(info)+\" \"+str(v))\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier du répertoire '/tmp', la série des valeurs de la variable", ang="Print on standard output and, in the same time, save in a file of the '/tmp' directory, the value series of the variable" ), + ), + ValueGnuPlotter = BLOC (condition = " Template == 'ValueGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Affiche graphiquement avec Gnuplot la valeur courante de la variable", ang="Graphically plot with Gnuplot the current value of the variable" ), + ), + ValueSerieGnuPlotter = BLOC (condition = " Template == 'ValueSerieGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig, gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Affiche graphiquement avec Gnuplot la série des valeurs de la variable", ang="Graphically plot with Gnuplot the value series of the variable" ), + ), + ValuePrinterAndGnuPlotter = BLOC (condition = " Template == 'ValuePrinterAndGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[-1]))\nimport numpy, Gnuplot\nv=numpy.array(var[-1], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la valeur courante de la variable", ang="Print on standard output and, in the same time, graphically plot with Gnuplot the current value of the variable" ), + ), + ValueSeriePrinterAndGnuPlotter = BLOC (condition = " Template == 'ValueSeriePrinterAndGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[:]))\nimport numpy, Gnuplot\nv=numpy.array(var[:], ndmin=1)\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, affiche graphiquement avec Gnuplot la série des valeurs de la variable", ang="Print on standard output and, in the same time, graphically plot with Gnuplot the value series of the variable" ), + ), + ValuePrinterSaverAndGnuPlotter = BLOC (condition = " Template == 'ValuePrinterSaverAndGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[-1]))\nimport numpy, re\nv=numpy.array(var[-1], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier du répertoire '/tmp' et affiche graphiquement la valeur courante de la variable", ang="Print on standard output and, in the same, time save in a file of the '/tmp' directory and graphically plot the current value of the variable" ), + ), + ValueSeriePrinterSaverAndGnuPlotter = BLOC (condition = " Template == 'ValueSeriePrinterSaverAndGnuPlotter' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print(str(info)+\" \"+str(var[:]))\nimport numpy, re\nv=numpy.array(var[:], ndmin=1)\nglobal istep\ntry:\n istep += 1\nexcept:\n istep = 0\nf='/tmp/value_%s_%05i.txt'%(info,istep)\nf=re.sub('\s','_',f)\nprint('Value saved in \"%s\"'%f)\nnumpy.savetxt(f,v)\nimport Gnuplot\nglobal ifig,gp\ntry:\n ifig += 1\n gp(' set style data lines')\nexcept:\n ifig = 0\n gp = Gnuplot.Gnuplot(persist=1)\n gp(' set style data lines')\ngp('set title \"%s (Figure %i)\"'%(info,ifig))\ngp.plot( Gnuplot.Data( v, with_='lines lw 2' ) )", fr="Imprime sur la sortie standard et, en même temps, enregistre dans un fichier du répertoire '/tmp' et affiche graphiquement la série des valeurs de la variable", ang="Print on standard output and, in the same, time save in a file of the '/tmp' directory and graphically plot the value series of the variable" ), + ), + ValueMean = BLOC (condition = " Template == 'ValueMean' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint(str(info)+\" \"+str(numpy.nanmean(var[-1])))", fr="Imprime sur la sortie standard la moyenne de la valeur courante de la variable", ang="Print on standard output the mean of the current value of the variable" ), + ), + ValueStandardError = BLOC (condition = " Template == 'ValueStandardError' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint(str(info)+\" \"+str(numpy.nanstd(var[-1])))", fr="Imprime sur la sortie standard l'écart-type de la valeur courante de la variable", ang="Print on standard output the standard error of the current value of the variable" ), + ), + ValueVariance = BLOC (condition = " Template == 'ValueVariance' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nprint(str(info)+\" \"+str(numpy.nanvar(var[-1])))", fr="Imprime sur la sortie standard la variance de la valeur courante de la variable", ang="Print on standard output the variance of the current value of the variable" ), + ), + ValueL2Norm = BLOC (condition = " Template == 'ValueL2Norm' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nv = numpy.ravel( var[-1] )\nprint(str(info)+\" \"+str(float( numpy.linalg.norm(v) )))", fr="Imprime sur la sortie standard la norme L2 de la valeur courante de la variable", ang="Print on standard output the L2 norm of the current value of the variable" ), + ), + ValueRMS = BLOC (condition = " Template == 'ValueRMS' ", + ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "import numpy\nv = numpy.ravel( var[-1] )\nprint(str(info)+\" \"+str(float( numpy.sqrt((1./v.size)*numpy.dot(v,v)) )))", fr="Imprime sur la sortie standard la racine de la moyenne des carrés (RMS), ou moyenne quadratique, de la valeur courante de la variable", ang="Print on standard output the root mean square (RMS), or quadratic mean, of the current value of the variable" ), + ), + ) + +def F_Observers(statut) : return FACT( + statut=statut, + SELECTION = SIMP(statut="o", defaut=[], typ="TXM", min=0, max="**", homo="SansOrdreNiDoublon", validators=NoRepeat(), into=(['Analysis', 'Innovation', 'InnovationAtCurrentState', 'CurrentState', 'CurrentOptimum', 'IndexOfOptimum', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulatedObservationAtCurrentOptimum', 'BMA', 'OMA', 'OMB', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'GradientOfCostFunctionJ', 'GradientOfCostFunctionJb', 'GradientOfCostFunctionJo', 'SigmaObs2', 'SigmaBck2', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'Residu'])), + Analysis = BLOC (condition=" 'Analysis' in set(SELECTION) ", + Analysis_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "Analysis"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + Innovation = BLOC (condition=" 'Innovation' in set(SELECTION) ", + Innovation_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "Innovation"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + InnovationAtCurrentState = BLOC (condition=" 'InnovationAtCurrentState' in set(SELECTION) ", + InnovationAtCurrentState_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "InnovationAtCurrentState"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CurrentState = BLOC (condition=" 'CurrentState' in set(SELECTION) ", + CurrentState_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentState"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CurrentOptimum = BLOC (condition=" 'CurrentOptimum' in set(SELECTION) ", + CurrentOptimum_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CurrentOptimum"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + IndexOfOptimum = BLOC (condition=" 'IndexOfOptimum' in set(SELECTION) ", + IndexOfOptimum_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "IndexOfOptimum"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SimulatedObservationAtBackground = BLOC (condition=" 'SimulatedObservationAtBackground' in set(SELECTION) ", + SimulatedObservationAtBackground_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtBackground"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SimulatedObservationAtCurrentState = BLOC (condition=" 'SimulatedObservationAtCurrentState' in set(SELECTION) ", + SimulatedObservationAtCurrentState_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentState"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SimulatedObservationAtOptimum = BLOC (condition=" 'SimulatedObservationAtOptimum' in set(SELECTION) ", + SimulatedObservationAtOptimum_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtOptimum"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SimulatedObservationAtCurrentOptimum = BLOC (condition=" 'SimulatedObservationAtCurrentOptimum' in set(SELECTION) ", + SimulatedObservationAtCurrentOptimum_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SimulatedObservationAtCurrentOptimum"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + BMA = BLOC (condition=" 'BMA' in set(SELECTION) ", + BMA_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "BMA"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + OMA = BLOC (condition=" 'OMA' in set(SELECTION) ", + OMA_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "OMA"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + OMB = BLOC (condition=" 'OMB' in set(SELECTION) ", + OMB_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "OMB"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CostFunctionJ = BLOC (condition=" 'CostFunctionJ' in set(SELECTION) ", + CostFunctionJ_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJ"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CostFunctionJb = BLOC (condition=" 'CostFunctionJb' in set(SELECTION) ", + CostFunctionJb_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJb"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + CostFunctionJo = BLOC (condition=" 'CostFunctionJo' in set(SELECTION) ", + CostFunctionJo_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "CostFunctionJo"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + GradientOfCostFunctionJ = BLOC (condition=" 'GradientOfCostFunctionJ' in set(SELECTION) ", + GradientOfCostFunctionJ_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJ"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + GradientOfCostFunctionJb = BLOC (condition=" 'GradientOfCostFunctionJb' in set(SELECTION) ", + GradientOfCostFunctionJb_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJb"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + GradientOfCostFunctionJo = BLOC (condition=" 'GradientOfCostFunctionJo' in set(SELECTION) ", + GradientOfCostFunctionJo_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "GradientOfCostFunctionJo"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SigmaObs2 = BLOC (condition=" 'SigmaObs2' in set(SELECTION) ", + SigmaObs2_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaObs2"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + SigmaBck2 = BLOC (condition=" 'SigmaBck2' in set(SELECTION) ", + SigmaBck2_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "SigmaBck2"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + APosterioriCorrelations = BLOC (condition=" 'APosterioriCorrelations' in set(SELECTION) ", + APosterioriCorrelations_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCorrelations"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + APosterioriCovariance = BLOC (condition=" 'APosterioriCovariance' in set(SELECTION) ", + APosterioriCovariance_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriCovariance"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + APosterioriStandardDeviations = BLOC (condition=" 'APosterioriStandardDeviations' in set(SELECTION) ", + APosterioriStandardDeviations_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriStandardDeviations"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + APosterioriVariances = BLOC (condition=" 'APosterioriVariances' in set(SELECTION) ", + APosterioriVariances_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "APosterioriVariances"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + Residu = BLOC (condition=" 'Residu' in set(SELECTION) ", + Residu_data = FACT(statut = "o", + Scheduler = SIMP(statut = "f", typ = "TXM"), + Info = SIMP(statut = "o", typ = "TXM", defaut = "Residu"), + NodeType = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "Template", into=("String", "Script", "Template")), + PythonScript = BLOC (condition = " NodeType == 'String' ", + Value = SIMP(statut = "o", typ = "TXM") + ), + UserFile = BLOC (condition = " NodeType == 'Script' ", + Value = SIMP(statut = "o", typ = "FichierNoAbs", validators=[OnlyStr(), FileExtVal('py')]) + ), + ObserverTemplate = F_ObserverTemplate(), + ), + ), + ) + +def AlgorithmParametersInNS(filename): + if os.path.exists(filename): + fc = open(filename, 'r').readlines() + cr = re.compile("^AlgorithmParameters[\s]*=") + for ln in fc: + if cr.match(ln): return 1 + return 0 +AlgorithmParametersInNS.info = u"The Python file has to contain explicitly an \"AlgorithmParameters\" variable." +def F_AlgorithmParameters(statut, algos_names, fv=NoCheckInNS) : return FACT( + statut = statut, + Algorithm = SIMP(statut="o", typ = "TXM", into = algos_names ), + Parameters = SIMP(statut="f", typ = "TXM", into=("Defaults", "Dict"), defaut="Defaults"), + Dict = BLOC ( condition = " Parameters == 'Dict' ", + statut="f", + data = F_Dict("o", fv), + ), + Parameters3DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '3DVAR') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du coût lors de l'arrêt"), + GradientNormTolerance = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), + NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), + ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), + Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'IndexOfOptimum', 'Innovation', 'InnovationAtCurrentState', 'JacobianMatrixAtBackground', 'JacobianMatrixAtOptimum', 'KalmanGainAtOptimum', 'MahalanobisConsistency', 'OMA', 'OMB', 'SigmaObs2', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulationQuantiles'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + Parameters4DVAR = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == '4DVAR') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du coût lors de l'arrêt"), + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + GradientNormTolerance = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS'], fr="Minimiseur utilisé"), + ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'BMA', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'IndexOfOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'Blue') ", + statut="f", + NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), + Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'Innovation', 'MahalanobisConsistency', 'OMA', 'OMB', 'SigmaBck2', 'SigmaObs2', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulationQuantiles'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersDerivativeFreeOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'DerivativeFreeOptimization') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du cout lors de l'arrêt"), + MaximumNumberOfFunctionEvaluations = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal d'évaluations de la fonction"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="BOBYQA", into=['BOBYQA', 'COBYLA', 'NEWUOA', 'POWELL', 'SIMPLEX', 'SUBPLEX'], fr="Minimiseur utilisé"), + QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'DA', 'WeightedLeastSquares', 'WLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), + StateVariationTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=0.0001, fr="Variation relative maximale de l'état lors de l'arrêt"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'BMA', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'IndexOfOptimum', 'Innovation', 'InnovationAtCurrentState', 'OMA', 'OMB', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersDifferentialEvolution = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'DifferentialEvolution') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + CrossOverProbability_CR = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.7, fr="Probabilité de recombinaison ou de croisement, notée CR"), + MaximumNumberOfFunctionEvaluations = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal d'évaluations de la fonction"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=15000, fr="Nombre maximal de générations"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="BEST1BIN", into=['BEST1BIN', 'BEST1EXP', 'RAND1EXP', 'RANDTOBEST1EXP', 'BEST2EXP', 'RAND2EXP', 'RANDTOBEST1BIN', 'BEST2BIN', 'RAND2BIN', 'RAND1BIN'], fr="Stratégie de minimisation utilisée"), + MutationDifferentialWeight_F = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Poids différentiel de mutation, constant ou aléatoire dans l'intervalle, noté F"), + PopulationSize = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Taille approximative de la population à chaque génération"), + QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'DA', 'WeightedLeastSquares', 'WLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'BMA', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'IndexOfOptimum', 'Innovation', 'InnovationAtCurrentState', 'OMA', 'OMB', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersEnsembleBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'EnsembleBlue') ", + statut="f", + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'CurrentState', 'Innovation', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersEnsembleKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'EnsembleKalmanFilter') ", + statut="f", + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + NumberOfMembers = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=100, fr="Nombre de membres dans l'ensemble"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'ForecastState', 'IndexOfOptimum', 'InnovationAtCurrentAnalysis', 'InnovationAtCurrentState', 'SimulatedObservationAtCurrentAnalysis', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersExtendedBlue = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedBlue') ", + statut="f", + NumberOfSamplesForQuantiles = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=100, fr="Nombre d'échantillons simulés pour le calcul des quantiles"), + Quantiles = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Liste des valeurs de quantiles"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + SimulationForQuantiles = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Linear", into=['Linear', 'NonLinear'], fr="Type de simulation pour l'estimation des quantiles"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'Innovation', 'MahalanobisConsistency', 'OMA', 'OMB', 'SigmaBck2', 'SigmaObs2', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum', 'SimulationQuantiles'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersExtendedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ExtendedKalmanFilter') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'ForecastState', 'IndexOfOptimum', 'InnovationAtCurrentAnalysis', 'InnovationAtCurrentState', 'SimulatedObservationAtCurrentAnalysis', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'KalmanFilter') ", + statut="f", + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'ForecastState', 'IndexOfOptimum', 'InnovationAtCurrentAnalysis', 'InnovationAtCurrentState', 'SimulatedObservationAtCurrentAnalysis', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearLeastSquares') ", + statut="f", + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'OMA', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersNonLinearLeastSquares = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'NonLinearLeastSquares') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1e-07, fr="Diminution relative minimale du coût lors de l'arrêt"), + GradientNormTolerance = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1e-05, fr="Maximum des composantes du gradient lors de l'arrêt"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="LBFGSB", into=['LBFGSB', 'TNC', 'CG', 'NCG', 'BFGS', 'LM'], fr="Minimiseur utilisé"), + ProjectedGradientTolerance = SIMP(statut="f", typ="R", val_min=-1, min=1, max=1, defaut=-1.0, fr="Maximum des composantes du gradient projeté lors de l'arrêt"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'BMA', 'CostFunctionJ', 'CostFunctionJAtCurrentOptimum', 'CostFunctionJb', 'CostFunctionJbAtCurrentOptimum', 'CostFunctionJo', 'CostFunctionJoAtCurrentOptimum', 'CurrentOptimum', 'CurrentState', 'IndexOfOptimum', 'Innovation', 'InnovationAtCurrentState', 'OMA', 'OMB', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentOptimum', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersParticleSwarmOptimization = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ParticleSwarmOptimization') ", + statut="f", + BoxBounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes d'incréments de paramètres"), + GroupRecallRate = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Taux de rappel au meilleur insecte du groupe (entre 0 et 1)"), + MaximumNumberOfFunctionEvaluations = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=15000, fr="Nombre maximal d'évaluations de la fonction"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=50, fr="Nombre maximal de pas d'optimisation"), + NumberOfInsects = SIMP(statut="f", typ="I", val_min=-1, min=1, max=1, defaut=100, fr="Nombre d'insectes dans l'essaim"), + QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'BMA', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation', 'OMA', 'OMB', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + SwarmVelocity = SIMP(statut="f", typ="R", val_min=0.0, min=1, max=1, defaut=1.0, fr="Vitesse de groupe imposée par l'essaim"), + ), + ParametersQuantileRegression = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'QuantileRegression') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + CostDecrementTolerance = SIMP(statut="f", typ="R", min=1, max=1, defaut=1e-06, fr="Maximum de variation de la fonction d'estimation lors de l'arrêt"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=15000, fr="Nombre maximal de pas d'optimisation"), + Minimizer = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="MMQR", into=['MMQR'], fr="Minimiseur utilisé"), + Quantile = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=0.5, fr="Quantile pour la regression de quantile"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'BMA', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'CurrentState', 'Innovation', 'OMA', 'OMB', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersTabuSearch = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'TabuSearch') ", + statut="f", + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + LengthOfTabuList = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=50, fr="Longueur de la liste tabou"), + MaximumNumberOfSteps = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=50, fr="Nombre maximal de pas d'optimisation"), + NoiseAddingProbability = SIMP(statut="f", typ="R", val_min=0.0, val_max=1.0, min=1, max=1, defaut=1.0, fr="Probabilité de perturbation d'une composante de l'état"), + NoiseDistribution = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Uniform", into=['Gaussian', 'Uniform'], fr="Distribution pour générer les perturbations d'état"), + NoiseHalfRange = SIMP(statut="f", typ="TXM", fr="Demi-amplitude des perturbations uniformes centrées d'état pour chaque composante de l'état"), + NumberOfElementaryPerturbations = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=1, fr="Nombre de perturbations élémentaires pour choisir une perturbation d'état"), + QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'DA', 'WeightedLeastSquares', 'WLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StandardDeviation = SIMP(statut="f", typ="TXM", fr="Ecart-type des perturbations gaussiennes d'état pour chaque composante de l'état"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'BMA', 'CurrentState', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'Innovation', 'OMA', 'OMB', 'SimulatedObservationAtBackground', 'SimulatedObservationAtCurrentState', 'SimulatedObservationAtOptimum'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersUnscentedKalmanFilter = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'UnscentedKalmanFilter') ", + statut="f", + Alpha = SIMP(statut="f", typ="R", val_min=0.0001, val_max=1.0, min=1, max=1, defaut=1.0, fr=""), + Beta = SIMP(statut="f", typ="R", min=1, max=1, defaut=2.0, fr=""), + Bounds = SIMP(statut="f", typ="TXM", fr="Liste des valeurs de bornes"), + ConstrainedBy = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="EstimateProjection", into=['EstimateProjection'], fr="Prise en compte des contraintes"), + EstimationOf = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="State", into=['State', 'Parameters'], fr="Estimation d'etat ou de parametres"), + Kappa = SIMP(statut="f", typ="I", val_max=2, min=1, max=1, defaut=0, fr=""), + Reconditioner = SIMP(statut="f", typ="R", val_min=0.001, val_max=10.0, min=1, max=1, defaut=1.0, fr=""), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['Analysis', 'APosterioriCorrelations', 'APosterioriCovariance', 'APosterioriStandardDeviations', 'APosterioriVariances', 'BMA', 'CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'CurrentState', 'InnovationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersAdjointTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'AdjointTest') ", + statut="f", + AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), + EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), + InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), + ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="ScalarProduct", into=['ScalarProduct'], fr="Formule de résidu utilisée"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersFunctionTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'FunctionTest') ", + statut="f", + NumberOfPrintedDigits = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=5, fr="Nombre de chiffres affichés pour les impressions de réels"), + NumberOfRepetition = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=1, fr="Nombre de fois où l'exécution de la fonction est répétée"), + SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersGradientTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'GradientTest') ", + statut="f", + AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), + AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), + EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), + InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), + ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Norm', 'TaylorOnNorm', 'Taylor'], fr="Formule de résidu utilisée"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersInputValuesTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'InputValuesTest') ", + statut="f", + NumberOfPrintedDigits = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=5, fr="Nombre de chiffres affichés pour les impressions de réels"), + PrintAllValuesFor = SIMP(statut="f", typ="TXM", max="**", into=['Background', 'CheckingPoint', 'Observation'], fr="Liste de noms de vecteurs dont les valeurs détaillées sont à imprimer"), + SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), + ShowInformationOnlyFor = SIMP(statut="f", typ="TXM", max="**", into=['Background', 'CheckingPoint', 'Observation'], fr="Liste de noms de vecteurs dont les informations synthétiques sont à imprimer"), + ), + ParametersLinearityTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LinearityTest') ", + statut="f", + AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), + AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), + EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), + InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), + ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="CenteredDL", into=['CenteredDL', 'Taylor', 'NominalTaylor', 'NominalTaylorRMS'], fr="Formule de résidu utilisée"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersLocalSensitivityTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'LocalSensitivityTest') ", + statut="f", + SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'JacobianMatrixAtCurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersParallelFunctionTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'ParallelFunctionTest') ", + statut="f", + NumberOfPrintedDigits = SIMP(statut="f", typ="I", val_min=0, min=1, max=1, defaut=5, fr="Nombre de chiffres affichés pour les impressions de réels"), + NumberOfRepetition = SIMP(statut="f", typ="I", val_min=1, min=1, max=1, defaut=1, fr="Nombre de fois où l'exécution de la fonction est répétée"), + SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersSamplingTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'SamplingTest') ", + statut="f", + QualityCriterion = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="AugmentedWeightedLeastSquares", into=['AugmentedWeightedLeastSquares', 'AWLS', 'AugmentedPonderatedLeastSquares', 'APLS', 'DA', 'WeightedLeastSquares', 'WLS', 'PonderatedLeastSquares', 'PLS', 'LeastSquares', 'LS', 'L2', 'AbsoluteValue', 'L1', 'MaximumError', 'ME'], fr="Critère de qualité utilisé"), + SampleAsExplicitHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable comme une liste"), + SampleAsIndependantRandomVariables = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont les points sur chaque axe proviennent de l'échantillonage indépendant de la variable selon la spécification ['distribution',[parametres],nombre]"), + SampleAsMinMaxStepHyperCube = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par un hyper-cube dont on donne la liste des échantillonages de chaque variable par un triplet [min,max,step]"), + SampleAsnUplet = SIMP(statut="f", typ="TXM", max="**", into=None, fr="Points de calcul définis par une liste de n-uplet"), + SetDebug = SIMP(statut="f", typ="I", min=1, max=1, defaut=0, fr="Activation du mode debug lors de l'exécution"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CostFunctionJ', 'CostFunctionJb', 'CostFunctionJo', 'CurrentState', 'InnovationAtCurrentState', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ParametersTangentTest = BLOC (condition = " (Parameters == 'Defaults') and (Algorithm == 'TangentTest') ", + statut="f", + AmplitudeOfInitialDirection = SIMP(statut="f", typ="R", min=1, max=1, defaut=1.0, fr="Amplitude de la direction initiale de la dérivée directionnelle autour du point nominal"), + AmplitudeOfTangentPerturbation = SIMP(statut="f", typ="R", val_min=1e-10, val_max=1.0, min=1, max=1, defaut=0.01, fr="Amplitude de la perturbation pour le calcul de la forme tangente"), + EpsilonMinimumExponent = SIMP(statut="f", typ="I", val_min=-20, val_max=0, min=1, max=1, defaut=-8, fr="Exposant minimal en puissance de 10 pour le multiplicateur d'incrément"), + InitialDirection = SIMP(statut="f", typ="TXM", fr="Direction initiale de la dérivée directionnelle autour du point nominal"), + ResiduFormula = SIMP(statut="f", typ="TXM", min=1, max=1, defaut="Taylor", into=['Taylor'], fr="Formule de résidu utilisée"), + SetSeed = SIMP(statut="f", typ="TXM", fr="Graine fixée pour le générateur aléatoire"), + StoreSupplementaryCalculations = SIMP(statut="f", typ="TXM", max="**", into=['CurrentState', 'Residu', 'SimulatedObservationAtCurrentState'], fr="Liste de calculs supplémentaires à stocker et/ou effectuer"), + ), + ) + +def F_variables(statut) : return FACT( + statut=statut, + regles = ( MEME_NOMBRE ('NAMES', 'SIZES')), + NAMES = SIMP(statut="o", typ="TXM", max="**", validators=NoRepeat()), + SIZES = SIMP(statut="o", typ="I", val_min=1, max="**") + ) +def ChDir(dirname): + os.chdir(os.path.abspath(dirname)) + return 1 +ChDir.info = u"This has to be a regular directory path." + +ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", + op=None, + repetable = "n", + StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Calculation Case"), + StudyRepertory = SIMP(statut="f", typ = "Repertoire", validators=FunctionVal(ChDir), min=1, max=1), + Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), + AlgorithmParameters = F_AlgorithmParameters("o",("3DVAR", "4DVAR", "Blue", "DerivativeFreeOptimization", "DifferentialEvolution", "EnsembleBlue", "EnsembleKalmanFilter", "ExtendedBlue", "ExtendedKalmanFilter", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", "TabuSearch", "UnscentedKalmanFilter", ), AlgorithmParametersInNS), + Background = F_Background("o", BackgroundInNS), + BackgroundError = F_BackgroundError("o", BackgroundErrorInNS), + Observation = F_Observation("o", ObservationInNS), + ObservationError = F_ObservationError("o", ObservationErrorInNS), + ObservationOperator = F_ObservationOperator("o"), + EvolutionModel = F_EvolutionModel("f"), + EvolutionError = F_EvolutionError("f", EvolutionErrorInNS), + ControlInput = F_ControlInput("f"), + UserDataInit = F_Init("f"), + UserPostAnalysis = F_UserPostAnalysis("o"), + InputVariables = F_variables("f"), + OutputVariables = F_variables("f"), + Observers = F_Observers("f") + ) + +CHECKING_STUDY = PROC(nom="CHECKING_STUDY", + op=None, + repetable = "n", + StudyName = SIMP(statut="o", typ = "TXM", defaut="ADAO Checking Case"), + StudyRepertory = SIMP(statut="f", typ = "Repertoire", validators=FunctionVal(ChDir), min=1, max=1), + Debug = SIMP(statut="f", typ = "I", into=(0, 1), defaut=0), + AlgorithmParameters = F_AlgorithmParameters("o", ("AdjointTest", "FunctionTest", "GradientTest", "InputValuesTest", "LinearityTest", "LocalSensitivityTest", "ObserverTest", "ParallelFunctionTest", "SamplingTest", "TangentTest", ), AlgorithmParametersInNS), + CheckingPoint = F_CheckingPoint("o", CheckingPointInNS), + Background = F_Background("f", BackgroundInNS), + BackgroundError = F_BackgroundError("f", BackgroundErrorInNS), + Observation = F_Observation("f", ObservationInNS), + ObservationError = F_ObservationError("f", ObservationErrorInNS), + ObservationOperator = F_ObservationOperator("o"), + UserDataInit = F_Init("f"), + Observers = F_Observers("f") + ) diff --git a/Adao/configuration_Adao.py b/Adao/configuration_Adao.py deleted file mode 100644 index e757a2d0..00000000 --- a/Adao/configuration_Adao.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2008-2016 EDF R&D -# -# This file is part of SALOME ADAO module -# -# 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 -# - -""" -""" -# Modules Python -# print "passage dans la surcharge de configuration pour Adao" -import os, sys, string, types, re - - -# Modules Eficas - - -#from Editeur import Eficas_utils -from InterfaceQT4 import configuration - -# Classe de base permettant de lire, afficher -# et sauvegarder les fichiers utilisateurs -class CONFIG(configuration.configBase): - - def __init__(self,appli,repIni): - - self.labels_eficas=['lang','rep_cata','catalogues','closeAutreCommande','closeFrameRechercheCommande','closeEntete','taille'] - configuration.configBase.__init__(self,appli,repIni) - - #self.rep_user = os.environ["HOME"] - self.rep_user = os.path.expanduser("~") - self.appli = appli - self.code = appli.code - # self.lang = "fr" - self.rep_ini = repIni - self.rep_mat=" " # Compatbilite Aster - self.savedir = self.rep_user - self.generator_module = "generator_adao" - self.convert_module = "convert_adao" - - # Format des catalogues... - # (code, version, catalogue, formatIn, formatOut) - # Il faut les mettre dans un tuple - #self.catalogues = (("ADAO", "V0", os.path.join(self.rep_ini, 'ADAO_Cata_V0.py'), "adao"),) - -def make_config(appli,rep): - return CONFIG(appli,rep) diff --git a/Adao/exempleGetattr.py b/Adao/exempleGetattr.py new file mode 100755 index 00000000..e18698c9 --- /dev/null +++ b/Adao/exempleGetattr.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 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 +# +""" +""" +import sys,os +import prefs +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +from InterfaceQT4 import eficas_go +jdd = eficas_go.createFromDocumentAccas('ADAO_Cata_V0_pour_V9_5_0.py','exemple01_Func.comm') + + +# les premiers niveaux sont tous des listes dans eficas car il est possible +# d en avoir plusieurs +myCheckingStudy=jdd.CHECKING_STUDY[0] +print ('myCheckingStudy', myCheckingStudy, ' a pour nom', myCheckingStudy.StudyName) + +# Pour les Facts, si c est une liste d'elements, utilisation de [n] +# si la liste ne contient qu'un element, l' utilisation de [0] est optionnelle + +print (myCheckingStudy.AlgorithmParameters.Algorithm) +print (myCheckingStudy.AlgorithmParameters[0].NumberOfRepetition) + +print ('on fait une erreur volontaire') +try : + myAssimilationStudy=jdd.ASSIMILATION_STUDY[0] +except : + print ('myAssimilationStudy non trouve') + myAssimilationStudy=None + +# Pour les OPER il est aussi possible de chercher par le nom du concept produit +# n exite pas dans Adao +#monRodBank2=jdd.getEtapeByConceptName('RB') + + + diff --git a/Adao/monCode_Cata.py b/Adao/monCode_Cata.py deleted file mode 100644 index 5e4e4292..00000000 --- a/Adao/monCode_Cata.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -from Accas import * - -JdC = JDC_CATA (code = 'ADAO', - execmodul = None, - ) -JdC = JDC_CATA (code = 'ADAO', - execmodul = None, - regles = ( AU_MOINS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY'), AU_PLUS_UN ('ASSIMILATION_STUDY','CHECKING_STUDY')), - ) - - -ASSIMILATION_STUDY = PROC(nom="ASSIMILATION_STUDY", op=None, repetable = "n", - Study_name = SIMP(statut="o", typ = "TXM"), - Study_repertory = SIMP(statut="f", typ = "Repertoire", min=1, max=1), - Debug = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0), - Algorithm = SIMP(statut="o", typ = "TXM", into=("3DVAR", "Blue", "EnsembleBlue", "KalmanFilter", "LinearLeastSquares", "NonLinearLeastSquares", "ParticleSwarmOptimization", "QuantileRegression", )), - Background = FACT(statut="o", - regles=(UN_PARMI('SCRIPT_DATA_FILE','VECTOR_STRING'),), - Stored = SIMP(statut="o", typ = "I", into=(0, 1), defaut=0, fr="Choix de stockage interne ou non du concept parent", ang="Choice of the storage or not of the parent concept"), - SCRIPT_DATA_FILE = SIMP(statut = "f", typ = "FichierNoAbs", validators=(OnlyStr()), fr="En attente d'un nom de fichier script, avec ou sans le chemin complet pour le trouver, contenant la définition d'une variable interne de même nom que le concept parent", ang="Waiting for a script file name, with or without the full path to find it, containing the definition of an internal variable of the same name as the parent concept"), - VECTOR_STRING = SIMP(statut = "f", typ = "TXM", fr="En attente d'une chaine de caractères entre guillements. Pour construire un vecteur, ce doit être une suite de nombres, utilisant un espace ou une virgule pour séparer deux éléments et un point-virgule pour séparer deux lignes", ang="Waiting for a string in quotes. To build a vector, it has to be a float serie, using a space or comma to separate two elements in a line, a semi-colon to separate rows"), - ), - -) diff --git a/Adao/prefs_Adao.py b/Adao/prefs_Adao.py index 5555f082..5846703d 100644 --- a/Adao/prefs_Adao.py +++ b/Adao/prefs_Adao.py @@ -14,18 +14,13 @@ encoding='iso-8859-1' # Choix des catalogues # format du Tuple (code,version,catalogue,formatOut, finit par defaut eventuellement) catalogues = ( -# ('Adao','V1',os.path.join(repIni,'ADAO_Cata_V1.py'),'python','python'), -# ('Adao','V770',os.path.join(repIni,'ADAO_Cata_V0_V7_7_0.py'),'python','python'), -# ('Adao','V83',os.path.join(repIni,'ADAO_Cata_V0_V8_3_0_DEV.py'),'dicoImbrique','dico'), -# ('Adao','dico',os.path.join(repIni,'ADAO_Cata_V0_V8_3_0_DEV.py'),'dico','dico'), - ('Adao','V83',os.path.join(repIni,'ADAO_Cata_V0_V8_3_0_DEV.py'),'python','python'), -# ('Adao','V83',os.path.join(repIni,'ADAO_Cata_PN.py'),'python','python'), -# ('Adao','V751',os.path.join(repIni,'ADAO_Cata_V0_V7_5_1.py'),'python','python'), + ('Adao','V95',os.path.join(repIni,'ADAO_Cata_V0_pour_V9_5_0.py'),'python','python'), ) # lang indique la langue utilisee pour les chaines d'aide : fr ou ang - +#lang='ang' lang='fr' + closeAutreCommande = True closeFrameRechercheCommande = True #closeEntete = True @@ -33,3 +28,4 @@ closeArbre = True translatorFichier = os.path.join(repIni,'Adao') nombreDeBoutonParLigne=1 #dumpXSD=True +#afficheIhm=False diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index 512c55b2..5688b448 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -159,6 +159,7 @@ class JDCTree( QTreeWidget,GereRegles ): self.itemCourant = item itemParent = item itemAvant = item + # PN : 22 juil 2021 --> bizarre ce itemAvant Verifier le while while not (hasattr (itemParent,'getPanel')) : if itemParent.plie==True : itemParent.setDeplie() @@ -171,11 +172,11 @@ class JDCTree( QTreeWidget,GereRegles ): # Attention - Specification particuliere pour MT qui permet de nn afficher qu 1 niveau # le catalogue contient cette indication dans fenetreIhm if estUneFeuille and itemParent.fenetreIhm=='deplie1Niveau' : - itemAvant.afficheCeNiveau() - return - if estUneFeuille : itemParent.affichePanneau() + if item == itemParent : itemParent.affichePanneau() + else : itemAvant.afficheCeNiveau() + elif estUneFeuille : itemParent.affichePanneau() elif self.editor.maConfiguration.afficheCommandesPliees : itemParent.plieToutEtReafficheSaufItem(item) - else : itemParent.affichePanneau() + else : itemParent.affichePanneau() elif (isinstance(item,composimp.Node)) and item.fenetre : item.fenetre.rendVisible() @@ -782,8 +783,8 @@ class JDCNode(QTreeWidgetItem,GereRegles): self.appliEficas.listeNoeudsColores=[] for noeud in liste : noeud.setTextColor( 0,Qt.blue ) - if item.nom != tr(item.nom) : labeltext = str(tr(item.nom)+" :") labeltext,fonte,couleur = noeud.item.getLabelText() + if item.nom != tr(item.nom) : labeltext = str(tr(item.nom)+" :") noeud.setText(0, labeltext) self.appliEficas.listeNoeudsColores.append(noeud) diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index 0ff50144..4c55cd7f 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -61,8 +61,6 @@ class configBase(object): self.repIni = repIni if self.code == None : self.code='' - #if sys.platform[0:5]=="linux" : - #self.rep_user = os.path.join(os.environ['HOME'],'.config/Eficas',self.code) self.rep_user = os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) #else : # self.rep_user = os.path.join('C:/','.config/Eficas',self.code) @@ -82,15 +80,8 @@ class configBase(object): #Particularite des schemas MAP if hasattr(self,'make_ssCode'): self.make_ssCode(self.ssCode) - #if self.appliEficas: self.parent=appliEficas.top - #else: self.parent=None - if not os.path.isdir(self.savedir) : - if sys.platform[0:5]=="linux" : - #self.savedir=os.environ['HOME'] - self.savedir=os.path.expanduser("~") - else: - self.savedir='C:/' + self.savedir=os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) @@ -102,9 +93,9 @@ class configBase(object): self.path_doc = os.path.abspath(os.path.join(self.repIni,'..','Doc')) self.exec_acrobat = 'acroread' nomDir="Eficas_"+self.code + self.savedir = os.path.abspath(os.path.join(os.path.expanduser("~"),nomDir)) #if sys.platform[0:5]=="linux" : #self.savedir = os.path.abspath(os.path.join(os.environ['HOME'],nomDir)) - self.savedir=os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) #else: # self.savedir = os.path.abspath('C:/') self.modeNouvCommande='initial' diff --git a/InterfaceQT4/editorSsIhm.py b/InterfaceQT4/editorSsIhm.py index 7627206d..d86a1a96 100755 --- a/InterfaceQT4/editorSsIhm.py +++ b/InterfaceQT4/editorSsIhm.py @@ -484,12 +484,12 @@ class JDCEditorSsIhm : def getChecksum(self,texte): #---------------------------# try : - import haslib + import hashlib newtexte=texte.replace('"','\\"') hash_checksum = hashlib.md5() hash_checksum.update(newtexte.encode('utf-8')) checksum = hash_checksum.hexdigest() - ligne = ligne="#CHECKSUM:"+checksum+":FIN CHECKSUM" + ligne = "#CHECKSUM:"+checksum+":FIN CHECKSUM" except : try : newtexte=texte.replace('"','\\"') diff --git a/InterfaceQT4/feuille.py b/InterfaceQT4/feuille.py index e8f1dc3c..37d57e06 100644 --- a/InterfaceQT4/feuille.py +++ b/InterfaceQT4/feuille.py @@ -80,7 +80,6 @@ class Feuille(QWidget,ContientIcones,SaisieValeur,FacultatifOuOptionnel): self.setCommentaire() self.setZoneInfo() self.setUnite() - self.setUQ() def setUnite(self): diff --git a/InterfaceQT4/monRecherche.py b/InterfaceQT4/monRecherche.py index 4e597c91..2baabb13 100644 --- a/InterfaceQT4/monRecherche.py +++ b/InterfaceQT4/monRecherche.py @@ -59,5 +59,5 @@ class DRecherche(Ui_desRecherche ,QDialog): def recherche(self): self.motAChercher=self.LERecherche.text() - self.listeTrouvee=self.tree.findItems(self.motAChercher,Qt.MatchContains|Qt.MatchRecursive,1) + self.listeTrouvee=self.tree.findItems(self.motAChercher,Qt.MatchContains|Qt.MatchRecursive,0) self.surLigne=0 diff --git a/InterfaceQT4/monWidgetTableau.py b/InterfaceQT4/monWidgetTableau.py index aaeca35b..7a535bd4 100644 --- a/InterfaceQT4/monWidgetTableau.py +++ b/InterfaceQT4/monWidgetTableau.py @@ -53,18 +53,6 @@ class MonWidgetTableau (Ui_WidgetTableau,MonWidgetPlusieursTuple): setattr(self,nomCol,objCol) spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.LATitre.addItem(spacerItem) - - - -# monObjTitreCol=getattr(self,nomCol) -# monObjTitreCol.setText(monSimpDef.homo[i]) - -# for i in range(maxLen-len(monSimpDef.homo)): -# index=i+len(monSimpDef.homo)+1 -# nomCol='LECol'+str(index) -# monObjTitreCol=getattr(self,nomCol) -# monObjTitreCol.close() - self.resize(self.width(),1800) def ajoutLineEdit(self,valeur=None,inInit=False): diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index 4bfc694d..6fc23c22 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -673,11 +673,7 @@ class Appli(AppliSsIhm,Ui_Eficas,QMainWindow): def initRecents(self): self.recent = [] try : - #if sys.platform[0:5]=="linux" : - #rep=os.path.join(os.environ['HOME'],'.config/Eficas',self.code) rep=os.path.join(os.path.expanduser("~"),'.config/Eficas',self.code) - #else : - # rep=os.path.join('C:/','.config/Eficas',self.code) monFichier=rep+"/listefichiers_"+self.code index=0 f=open(monFichier) diff --git a/InterfaceQT4/qtEficasSsIhm.py b/InterfaceQT4/qtEficasSsIhm.py index 4374a8fb..56e2ba50 100755 --- a/InterfaceQT4/qtEficasSsIhm.py +++ b/InterfaceQT4/qtEficasSsIhm.py @@ -38,7 +38,7 @@ class AppliSsIhm: """ Class implementing the main user interface. """ - def __init__(self,code=None,salome=1,parent=None,multi=False,langue='fr',ssIhm=True,labelCode=None,genereXSD=False): + def __init__(self,code=None,salome=1,parent=None,multi=False,langue='fr',ssIhm=True,labelCode=None,genereXSD=False,versionCode=None,ssCode=None,fichierCata=None): """ Constructor """ diff --git a/InterfaceQT4/qtEficas_with_log.py b/InterfaceQT4/qtEficas_with_log.py deleted file mode 100644 index ad1b229b..00000000 --- a/InterfaceQT4/qtEficas_with_log.py +++ /dev/null @@ -1,612 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2021 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 -# - -import os, sys - - -from PyQt4.QtGui import * -from PyQt4.QtCore import * -from myMain import Ui_Eficas -from viewManager import MyTabview -from getVersion import getEficasVersion - -from Extensions.i18n import tr -from Extensions.eficas_exception import EficasException - -from Editeur import session -import Accas - - -class Appli(Ui_Eficas,QMainWindow): - """ - Class implementing the main user interface. - """ - def __init__(self,code=None,salome=0,parent=None,ssCode=None,multi=False,langue='fr'): - """ - Constructor - """ - QMainWindow.__init__(self,parent) - Ui_Eficas.__init__(self) - self.setupUi(self) - - version=getEficasVersion() - self.VERSION_EFICAS="Eficas QT4 "+version - self.salome=salome - self.ihm="QT" - self.top = self #(pour CONFIGURATION) - self.QWParent=None #(Pour lancement sans IHM) - self.code=code - self.indice=0 - self.dict_reels={} - self.recent = QStringList() - self.ficRecents={} - self.listeAEnlever=[] - self.ListeCode=['Aster','Carmel3D','Cuve2dg','Openturns_Study','Openturns_Wrapper','MAP'] - myFilter = MyEventFilter() - self.installEventFilter(myFilter) - - - self.repIcon=os.path.join( os.path.dirname(os.path.abspath(__file__)),'../Editeur/icons') - self.multi=multi - if langue=='fr': self.langue=langue - else : self.langue="ang" - if self.multi == False : - self.definitCode(code,ssCode) - if code==None: return - - eficas_root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - self.ajoutIcones() - - self.viewmanager = MyTabview(self) - self.recentMenu=self.menuFichier.addMenu(tr('&Recents')) - self.connecterSignaux() - if self.code != None : self.construitMenu() - - - self.ouvreFichiers() - self.setWindowTitle(self.VERSION_EFICAS) - - #def eventFilter(QObject watched, QEvent e) : - #def eventFilter(watched, e) : - # print "hhhhhhhhhhhhhhhhhhhhhh" - # return QMainWindow.eventFilter(watched, e) - - def definitCode(self,code,ssCode) : - self.code=code - self.ssCode=ssCode - if self.code==None : - self.cleanPath() - from monChoixCode import MonChoixCode - widgetChoix = MonChoixCode(self) - ret=widgetChoix.exec_() - import sys - if self.code == None:return # pour le cancel de la fenetre choix code - name='prefs_'+self.code - prefsCode=__import__(name) - - self.repIni=prefsCode.repIni - if ssCode != None : - self.format_fichier= ssCode #par defaut - prefsCode.NAME_SCHEME=ssCode - else : - self.format_fichier="python" #par defaut - - nameConf='configuration_'+self.code - configuration=__import__(nameConf) - self.CONFIGURATION = configuration.make_config(self,prefsCode.repIni) - self.CONFIGStyle = None - if hasattr(configuration,'make_config_style'): - self.CONFIGStyle = configuration.make_config_style(self,prefsCode.repIni) - if hasattr(prefsCode,'encoding'): - import sys - reload(sys) - sys.setdefaultencoding(prefsCode.encoding) - - def construitMenu(self): - self.initPatrons() - self.initRecents() - self.initAides() - for intituleMenu in ("menuTraduction","menuOptions","menuMesh","menuExecution"): - if hasattr(self,intituleMenu): - menu=getattr(self,intituleMenu) - menu.setAttribute(Qt.WA_DeleteOnClose) - menu.close() - delattr(self,intituleMenu) - for intituleAction in ("actionExecution","actionSaveRun",): - if hasattr(self,intituleAction): - action=getattr(self,intituleAction) - self.toolBar.removeAction(action) - if self.code in Appli.__dict__.keys(): - listeTexte=apply(Appli.__dict__[self.code],(self,)) - - def initAides(self): - #print "je passe la" - repAide=os.path.dirname(os.path.abspath(__file__)) - fileName='index.html' - self.docPath=repAide+"/../Aide" - if hasattr(self,'CONFIGURATION') and hasattr(self.CONFIGURATION,'docPath') : self.docPath=self.CONFIGURATION.docPath - if hasattr(self,'CONFIGURATION') and hasattr(self.CONFIGURATION,'fileName'):fileName=self.CONFIGURATION.fileName - self.fileDoc=os.path.join(self.docPath,fileName) - self.actionCode.setText(tr("Aide specifique ")+str(self.code)) - if not os.path.isfile(self.fileDoc) : - self.fileDoc="" - self.docPath="" - self.actionCode.setEnabled(False) - return - - self.actionCode.setEnabled(True) - self.menuAide.addAction(self.actionCode) - - def MAP(self): - self.menuExecution = self.menubar.addMenu(QApplication.translate("Eficas", "Execution", None, QApplication.UnicodeUTF8)) - self.actionExecution = QAction(self) - icon6 = QIcon(self.repIcon+"/compute.png") - self.actionExecution.setIcon(icon6) - self.actionExecution.setObjectName("actionExecution") - self.menuExecution.addAction(self.actionExecution) - if not(self.actionExecution in self.toolBar.actions()): - self.toolBar.addAction(self.actionExecution) - self.actionExecution.setText(QApplication.translate("Eficas", "Execution ", None, QApplication.UnicodeUTF8)) - self.connect(self.actionExecution,SIGNAL("activated()"),self.run) - - self.actionSaveRun = QAction(self) - icon7 = QIcon(self.repIcon+"/export_MAP.png") - self.actionSaveRun.setIcon(icon7) - self.actionSaveRun.setObjectName("actionSaveRun") - self.menuExecution.addAction(self.actionSaveRun) - if not(self.actionSaveRun in self.toolBar.actions()): - self.toolBar.addAction(self.actionSaveRun) - self.actionSaveRun.setText(QApplication.translate("Eficas", "Save Run", None, QApplication.UnicodeUTF8)) - self.connect(self.actionSaveRun,SIGNAL("activated()"),self.saveRun) - - self.menuOptions = self.menubar.addMenu("menuOptions") - self.menuOptions.addAction(self.actionParametres_Eficas) - self.menuOptions.setTitle(tr("Options")) - - - def ASTER(self) : - self.menuTraduction = self.menubar.addMenu("menuTraduction") - self.menuTraduction.addAction(self.actionTraduitV7V8) - self.menuTraduction.addAction(self.actionTraduitV8V9) - self.menuTraduction.addAction(self.actionTraduitV9V10) - self.menuTraduction.setTitle(tr("Traduction")) - - self.menuOptions = self.menubar.addMenu("menuOptions") - self.menuOptions.addAction(self.actionParametres_Eficas) - self.menuOptions.addAction(self.actionLecteur_Pdf) - self.menuOptions.setTitle(tr("Options")) - - def CARMEL3D(self): - #if self.salome == 0 : return - self.menuMesh = self.menubar.addMenu("menuMesh") - self.menuMesh.setObjectName("Mesh") - self.menuMesh.addAction(self.actionChercheGrpMaille) - - def ChercheGrpMesh(self): - Msg,listeGroup=self.ChercheGrpMeshInSalome() - if Msg == None : - self.viewmanager.handleAjoutGroup(listeGroup) - else : - print "il faut gerer les erreurs" - - def ChercheGrpMaille(self): - Msg,listeGroup=self.ChercheGrpMailleInSalome() - if Msg == None : - self.viewmanager.handleAjoutGroup(listeGroup) - else : - print "il faut gerer les erreurs" - - - def ajoutIcones(self) : - # Pour pallier les soucis de repertoire d icone - icon = QIcon(self.repIcon+"/New24.png") - self.action_Nouveau.setIcon(icon) - icon1 = QIcon(self.repIcon+"/Open24.png") - self.action_Ouvrir.setIcon(icon1) - icon2 = QIcon(self.repIcon+"/Save24.png") - self.actionEnregistrer.setIcon(icon2) - icon3 = QIcon(self.repIcon+"/Cut24.png") - self.actionCouper.setIcon(icon3) - icon4 = QIcon(self.repIcon+"/Copy24.png") - self.actionCopier.setIcon(icon4) - icon5 = QIcon(self.repIcon+"/Paste24.png") - self.actionColler.setIcon(icon5) - icon6 = QIcon(self.repIcon+"/Delete24.png") - self.actionSupprimer.setIcon(icon6) - - - - def connecterSignaux(self) : - self.connect(self.recentMenu,SIGNAL('aboutToShow()'),self.handleShowRecentMenu) - - self.connect(self.action_Nouveau,SIGNAL("activated()"),self.fileNew) - self.connect(self.actionNouvel_Include,SIGNAL("activated()"),self.NewInclude) - self.connect(self.action_Ouvrir,SIGNAL("activated()"),self.fileOpen) - self.connect(self.actionEnregistrer,SIGNAL("activated()"),self.fileSave) - self.connect(self.actionEnregistrer_sous,SIGNAL("activated()"),self.fileSaveAs) - self.connect(self.actionFermer,SIGNAL("activated()"),self.fileClose) - self.connect(self.actionFermer_tout,SIGNAL("activated()"),self.fileCloseAll) - self.connect(self.actionQuitter,SIGNAL("activated()"),self.fileExit) - - self.connect(self.actionEficas,SIGNAL("activated()"),self.aidePPal) - self.connect(self.actionVersion,SIGNAL("activated()"),self.version) - - self.connect(self.actionCouper,SIGNAL("activated()"),self.editCut) - self.connect(self.actionCopier,SIGNAL("activated()"),self.editCopy) - self.connect(self.actionColler,SIGNAL("activated()"),self.editPaste) - self.connect(self.actionSupprimer,SIGNAL("activated()"),self.supprimer) - self.connect(self.actionRechercher,SIGNAL("activated()"),self.rechercher) - self.connect(self.actionDeplier_replier,SIGNAL("activated()"),self.Deplier) - - self.connect(self.actionRapport_de_Validation,SIGNAL("activated()"),self.jdcRapport) - self.connect(self.actionFichier_Source,SIGNAL("activated()"),self.jdcFichierSource) - self.connect(self.actionFichier_Resultat,SIGNAL("activated()"),self.visuJdcPy) - - - #self.connect(self.helpIndexAction,SIGNAL("activated()"),self.helpIndex) - #self.connect(self.helpContentsAction,SIGNAL("activated()"),self.helpContents) - - # Pour Aster - self.actionTraduitV7V8 = QAction(self) - self.actionTraduitV7V8.setObjectName("actionTraduitV7V8") - self.actionTraduitV8V9 = QAction(self) - self.actionTraduitV8V9.setObjectName("actionTraduitV8V9") - self.actionTraduitV9V10 = QAction(self) - self.actionTraduitV9V10.setObjectName("actionTraduitV9V10") - self.actionTraduitV7V8.setText(tr("TraduitV7V8")) - self.actionTraduitV8V9.setText(tr("TraduitV8V9")) - self.actionTraduitV9V10.setText(tr("TraduitV9V10")) - self.connect(self.actionParametres_Eficas,SIGNAL("activated()"),self.optionEditeur) - self.connect(self.actionLecteur_Pdf,SIGNAL("activated()"),self.optionPdf) - self.connect(self.actionTraduitV7V8,SIGNAL("activated()"),self.traductionV7V8) - self.connect(self.actionTraduitV8V9,SIGNAL("activated()"),self.traductionV8V9) - self.connect(self.actionTraduitV9V10,SIGNAL("activated()"),self.traductionV9V10) - - # Pour Carmel - self.actionChercheGrpMaille = QAction(self) - self.actionChercheGrpMaille.setText(tr("Acquiert Groupe Maille")) - self.connect(self.actionChercheGrpMaille,SIGNAL("activated()"),self.ChercheGrpMaille) - - # Pour Aide - self.actionCode = QAction(self) - self.actionCode.setText(tr("Specificites Maille")) - self.connect(self.actionCode,SIGNAL("activated()"),self.aideCode) - - def Deplier(self): - self.viewmanager.handleDeplier() - - def ouvreFichiers(self) : - # Ouverture des fichiers de commandes donnes sur la ligne de commande - cwd=os.getcwd() - self.dir=cwd - for study in session.d_env.studies: - os.chdir(cwd) - d=session.get_unit(study,self) - self.viewmanager.handleOpen(fichier=study["comm"],units=d) - - - def getSource(self,file): - # appele par Editeur/session.py - import convert - p=convert.plugins['python']() - p.readfile(file) - texte=p.convert('execnoparseur') - return texte - - def initPatrons(self) : - # Mise a jour du menu des fichiers recemment ouverts - from Editeur import listePatrons - if not(self.code in listePatrons.sous_menus.keys()) : - if hasattr(self,"menuPatrons"): - self.menuPatrons.setAttribute(Qt.WA_DeleteOnClose) - self.menuPatrons.close() - delattr(self,"menuPatrons") - return - if (not hasattr(self,"menuPatrons")): - self.menuPatrons = QMenu(self.menubar) - self.menuPatrons.setObjectName("menuPatrons") - self.menubar.addAction(self.menuPatrons.menuAction()) - self.menuPatrons.setTitle(QApplication.translate("Eficas", "Patrons", None, QApplication.UnicodeUTF8)) - else : - self.menuPatrons.clear() - self.listePatrons = listePatrons.listePatrons(self.code) - idx = 0 - for nomSsMenu in self.listePatrons.liste.keys(): - ssmenu=self.menuPatrons.addMenu(nomSsMenu) - for fichier in self.listePatrons.liste[nomSsMenu]: - id = ssmenu.addAction(fichier) - self.ficPatrons[id]=fichier - self.connect(id, SIGNAL('triggered()'),self.handleOpenPatrons) - # self.Patrons.setItemParameter(id,idx) - idx=idx+1 - - def initRecents(self): - self.recent = QStringList() - try : - #if 1 : - rep=os.path.join(os.environ['HOME'],'.config/Eficas',self.code) - monFichier=rep+"/listefichiers_"+self.code - index=0 - f=open(monFichier) - while ( index < 9) : - ligne=f.readline() - if ligne != "" : - l=(ligne.split("\n"))[0] - self.recent.append(l) - index=index+1 - except : - #else : - pass - - try : f.close() - except : pass - - def addToRecentList(self, fn): - """ - Public slot to add a filename to the list of recently opened files. - - @param fn name of the file to be added - """ - self.recent.removeAll(fn) - self.recent.prepend(fn) - if len(self.recent) > 9: - self.recent = self.recent[:9] - - def sauveRecents(self) : - try : - rep=self.CONFIGURATION.rep_user - monFichier=rep+"/listefichiers_"+self.code - except : - return - try : - f=open(monFichier,'w') - if len(self.recent) == 0 : return - index=0 - while ( index < len(self.recent)): - ligne=str(self.recent[index])+"\n" - f.write(ligne) - index=index+1 - except : - pass - try : - f.close() - except : - pass - - - - def traductionV7V8(self): - from gereTraduction import traduction - traduction(self.CONFIGURATION.repIni,self.viewmanager,"V7V8") - - def traductionV8V9(self): - from gereTraduction import traduction - traduction(self.CONFIGURATION.repIni,self.viewmanager,"V8V9") - - def traductionV9V10(self): - from gereTraduction import traduction - traduction(self.CONFIGURATION.repIni,self.viewmanager,"V9V10") - - def version(self) : - from monVisu import DVisu - titre = tr("version ") - monVisuDialg=DVisu(parent=self,fl=0) - monVisuDialg.setWindowTitle(titre) - monVisuDialg.TB.setText(self.VERSION_EFICAS +tr(" pour ") + self.code) - monVisuDialg.adjustSize() - monVisuDialg.show() - - def aidePPal(self) : - if self.code==None : return - repAide=os.path.dirname(os.path.abspath(__file__)) - maD=repAide+"/../Aide" - try : - indexAide=maD+"/fichiers_EFICAS/index.html" - cmd="xdg-open "+indexAide - os.system(cmd) - except: - QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee ")) - - - def aideCode(self) : - if self.code==None : return - try : - #if 1 : - cmd="xdg-open "+self.fileDoc - os.system(cmd) - except: - #else: - QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee ")) - - - def optionEditeur(self) : - try : - name='monOptions_'+self.code - except : - QMessageBox.critical( self,tr( "Parametrage"),tr( "Veuillez d abord choisir un code")) - return - try : - #if 1: - optionCode=__import__(name) - except : - #else : - QMessageBox.critical( self, tr("Parametrage"), tr("Pas de possibilite de personnalisation de la configuration ")) - return - monOption=optionCode.Options(parent=self,modal = 0 ,configuration=self.CONFIGURATION) - monOption.show() - - def optionPdf(self) : - from monOptionsPdf import OptionPdf - monOption=OptionPdf(parent=self,modal = 0 ,configuration=self.CONFIGURATION) - monOption.show() - - def handleShowRecentMenu(self): - """ - Private method to set up recent files menu. - """ - self.recentMenu.clear() - - for rp in self.recent: - id = self.recentMenu.addAction(rp) - self.ficRecents[id]=rp - self.connect(id, SIGNAL('triggered()'),self.handleOpenRecent) - self.recentMenu.addSeparator() - self.recentMenu.addAction(tr('&Effacer'), self.handleClearRecent) - - def handleOpenPatrons(self): - idx=self.sender() - fichier=self.repIni+"/../Editeur/Patrons/"+self.code+"/"+self.ficPatrons[idx] - self.viewmanager.handleOpen(fichier=fichier, patron = 1) - - def handleOpenRecent(self): - idx=self.sender() - fichier=self.ficRecents[idx] - self.viewmanager.handleOpen(fichier=fichier, patron =0 ) - - def handleClearRecent(self): - self.recent = QStringList() - self.sauveRecents() - - def fileNew(self): - try: - self.viewmanager.newEditor() - except EficasException, exc: - msg = unicode(exc) - if msg != "": - QMessageBox.warning(self, tr(u"Erreur"), msg) - - def fileOpen(self): - try: - self.viewmanager.handleOpen() - except EficasException, exc: - msg = unicode(exc) - if msg != "": - QMessageBox.warning(self, tr(u"Erreur"), msg) - - def fileSave(self): - return self.viewmanager.saveCurrentEditor() - - def fileSaveAs(self): - return self.viewmanager.saveAsCurrentEditor() - - def fileClose(self): - self.viewmanager.handleClose(texte='&Fermer') - - def fileCloseAll(self): - self.viewmanager.handleCloseAll(texte='&Fermer') - - def fileExit(self): - # On peut sortir sur Abort - res=self.viewmanager.handleCloseAll() - if (res != 2) : - self.close() - return res - - def editCopy(self): - self.viewmanager.handleEditCopy() - - def editCut(self): - self.viewmanager.handleEditCut() - - def editPaste(self): - self.viewmanager.handleEditPaste() - - def rechercher(self): - self.viewmanager.handleRechercher() - - def run(self): - self.viewmanager.run() - - def saveRun(self): - self.viewmanager.saveRun() - - def runYACS(self): - self.viewmanager.runYACS() - - def saveYACS(self): - self.viewmanager.saveYACS() - - def supprimer(self): - self.viewmanager.handleSupprimer() - - def jdcFichierSource(self): - self.viewmanager.handleViewJdcFichierSource() - - def jdcRapport(self): - self.viewmanager.handleViewJdcRapport() - - def visuJdcPy(self): - self.viewmanager.handleViewJdcPy() - - - def NewInclude(self): - self.viewmanager.newIncludeEditor() - - def cleanPath(self): - for pathCode in self.ListeCode: - try: - aEnlever=os.path.abspath(os.path.join(os.path.dirname(__file__),'..',pathCode)) - sys.path.remove(aEnlever) - except : - pass - for pathCode in self.listeAEnlever: - try: - sys.path.remove(aEnlever) - except : - pass - - - def closeEvent(self,event): - res=self.fileExit() - if res==2 : event.ignore() - -if __name__=='__main__': - - # Modules Eficas - rep=os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__),'..','ASTER'))) - sys.path.append(rep) - from Aster import prefsCode - if hasattr(prefsCode,'encoding'): - # Hack pour changer le codage par defaut des strings - import sys - reload(sys) - sys.setdefaultencoding(prefsCode.encoding) - del sys.setdefaultencoding - # Fin hack - - from Editeur import import_code - from Editeur import session - - # Analyse des arguments de la ligne de commande - options=session.parse(sys.argv) - code=options.code - - - app = QApplication(sys.argv) - #app.setMainWidget(mw) (qt3) - Eficas=Appli() - Eficas.show() - - #app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()")) - #mw.ouvreFichiers() - #mw.show() - - res=app.exec_() - sys.exit(res) diff --git a/Noyau/N_JDC.py b/Noyau/N_JDC.py index 4f1e7ba9..910c4797 100644 --- a/Noyau/N_JDC.py +++ b/Noyau/N_JDC.py @@ -259,7 +259,7 @@ Causes possibles : except NameError as e: etype, value, tb = sys.exc_info() l = traceback.extract_tb(tb) - s = traceback.format_exception_only("Erreur de nom", e)[0][:-1] + s = traceback.format_exception_only(NameError,e) msg = "erreur de syntaxe, %s ligne %d" % (s, l[-1][1]) if CONTEXT.debug: traceback.print_exc() @@ -654,7 +654,7 @@ Causes possibles : def getEtapeByConceptName(self,conceptName): for e in self.etapes : - if e.sdnom == conceptName : return e + if hasattr(e,'sdnom') and e.sdnom == conceptName : return e def _build_reserved_kw_list(self): diff --git a/Noyau/N_MCFACT.py b/Noyau/N_MCFACT.py index 1f539f08..a1fc0c72 100644 --- a/Noyau/N_MCFACT.py +++ b/Noyau/N_MCFACT.py @@ -42,7 +42,7 @@ class MCFACT(N_MCCOMPO.MCCOMPO): - nom - parent """ - print ('MCFACT', self, val, definition, nom, parent, dicoPyxbDeConstruction) + #print ('MCFACT', self, val, definition, nom, parent, dicoPyxbDeConstruction) #import traceback #traceback.print_stack() self.dicoPyxbDeConstruction=dicoPyxbDeConstruction diff --git a/Noyau/N_TUPLE.py b/Noyau/N_TUPLE.py index d4f9ccbc..a5b656cf 100644 --- a/Noyau/N_TUPLE.py +++ b/Noyau/N_TUPLE.py @@ -20,7 +20,8 @@ class N_Matrice: def __init__(self, nbLigs=None, nbCols=None, methodeCalculTaille=None, formatSortie="ligne", valSup=None, valMin=None, structure=None, typElt='R', - typEltInto=None, listeHeaders=None, coloree=False): + typEltInto=None, listeHeaders=None, coloree=False, + defaut=None): self.nbLigs = nbLigs self.nbCols = nbCols self.methodeCalculTaille = methodeCalculTaille @@ -33,6 +34,7 @@ class N_Matrice: self.typEltInto = typEltInto self.jdc=None self.coloree=coloree + self.defaut=defaut if self.coloree : self.activeCouleur() def __convert__(self, valeur): @@ -85,3 +87,5 @@ class N_Matrice: __repr__ = info __str__ = info +class N_Matrice_Correlation(N_Matrice): + pass diff --git a/Telemac/Telemac2d_Cata_auto.py b/Telemac/Telemac2d_Cata_auto.py deleted file mode 100644 index 110e237e..00000000 --- a/Telemac/Telemac2d_Cata_auto.py +++ /dev/null @@ -1,4244 +0,0 @@ - -# -*- coding: latin-1 -*- - -from Accas import * -class DateJJMMAAAA: - def __init__(self): - self.ntuple=3 - - def __convert__(self,valeur): - if type(valeur) == types.StringType: return None - if len(valeur) != self.ntuple: return None - return valeur - - def info(self): - return "Date : jj/mm/aaaa " - - __repr__=info - __str__=info - -class grma(GEOM): - pass - -import types -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - - -JdC = JDC_CATA (code = 'TELEMAC2D', - execmodul = None, - ) -# ======================================================================= -# Catalog entry for the MAP function : c_pre_interfaceBody_mesh -# ======================================================================= - -VERSION_CATALOGUE="TRUNK" -# ----------------------------------------------------------------------- -COMPUTATION_ENVIRONMENT = PROC(nom= "COMPUTATION_ENVIRONMENT",op = None, -# ----------------------------------------------------------------------- - UIinfo = {"groupes": ("CACHE")}, -# ----------------------------------- - INITIALIZATION = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - TITLE = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - defaut = '', - fr = """Titre du cas etudie. Ce titre figurera sur les dessins.""", - ang = """Title of the case being considered. This title shall be marked on the -drawings.""", - ), -# ----------------------------------- - INITIAL_CONDITIONS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ['ZERO ELEVATION','CONSTANT ELEVATION','ZERO DEPTH','CONSTANT DEPTH','SPECIAL','PARTICULIERES','PARTICULAR','TPXO SATELLITE ALTIMETRY'], - defaut = 'ZERO ELEVATION', - fr = """Permet de definir les conditions initiales sur -les hauteurs d''eau. -Les valeurs possibles sont : - - COTE NULLE. Initialise la cote de surface libre a 0. - Les hauteurs d''eau initiales sont alors retrouvees en - faisant la difference entre les cotes de surface libre - et du fond. - - COTE CONSTANTE .Initialise la cote de surface libre a la - valeur donnee par le mot-cle COTE INITIALE. Les hauteurs - d''eau initiales sont calculees comme precedemment. - - HAUTEUR NULLE .Initialise les hauteurs d''eau a 0. - - HAUTEUR CONSTANTE. Initialise les hauteurs d''eau a la valeur - donnee par le mot-cle HAUTEUR INITIALE. - - PARTICULIERES. Les conditions initiales sur la hauteur d''eau - doivent etre precisees dans le sous-programme CONDIN. - - ALTIMETRIE SATELLITE TPXO. Les conditions initiales sur la hauteur - d''eau et les vitesses sont etiblies sur la base des donnees - satellite TPXO dont les 8 premiers constistuents -ont ete extrait - et sauves dans le fichier BASE DE DONNEES DE MAREE.""", - ang = """Makes it possible to define the initial conditions with -the water depth. -The possible values are as follows: - - ZERO ELEVATION-. Initializes the free surface elevation to 0. -The initial water depths are then found by computing the difference -between the free surface and the bottom. - - CONSTANT ELEVATION-. Initializes the water elevation to the value -given by the keyword -INITIAL ELEVATION-. The initial water depths -are computed as in the previous case. - - ZERO DEPTH-. Initializes the water depths to 0. - - CONSTANT DEPTH-. Initializes the water depths to the value given -by the key-word -INITIAL DEPTH-. - - SPECIAL-. The initial conditions with the water depth should be -stated in the CONDIN subroutine. - - TPXO SATELITE ALTIMETRY. The initial conditions on the -free surface and -velocities are established from the TPXO satellite program data, -the harmonic -constituents of which are stored in the TIDE DATA BASE file.""", - ), -# ----------------------------------- - b_INITIAL_CONDITIONSG = BLOC(condition="INITIAL_CONDITIONS == 'CONSTANT ELEVATION'", -# ----------------------------------- -# ----------------------------------- - INITIAL_ELEVATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Valeur utilisee avec l''option : - CONDITIONS INITIALES - COTE CONSTANTE""", - ang = """Value to be used with the option : -INITIAL CONDITIONS -CONSTANT ELEVATION""", - ), - ), -# ----------------------------------- - b_INITIAL_CONDITIONSH = BLOC(condition="INITIAL_CONDITIONS == 'CONSTANT DEPTH'", -# ----------------------------------- -# ----------------------------------- - INITIAL_DEPTH = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Valeur utilisee avec l''option : -CONDITIONS INITIALES :-HAUTEUR CONSTANTE-""", - ang = """Value to be used along with the option: - INITIAL CONDITIONS -CONSTANT DEPTH-""", - ), - ), -# ----------------------------------- - BINARY_DATA_FILE_1_FORMAT = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ['BIN','SERAFIN','SERAFIND','MED'], - defaut = 'BIN', - fr = """Format du fichier de geometrie. -Les valeurs possibles sont : -- BIN : format binaire standard -- SERAFIN : format standard simple precision pour Telemac; -- SERAFIND: format standard double precision pour Telemac; -- MED : format MED base sur HDF5""", - ang = """Geometry file format. -Possible values are: -- BIN : Standard binary format -- SERAFIN : classical single precision format in Telemac; -- SERAFIND: classical double precision format in Telemac; -- MED : MED format based on HDF5""", - ), -# ----------------------------------- - BINARY_DATA_FILE_1 = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de donnees code en binaire mis a la disposition -de l''utilisateur. -Les donnees de ce fichier seront a lire sur le canal 24.""", - ang = """Binary-coded data file made available to the user. -The data in this file shall be read on channel 24.""", - ), -# ----------------------------------- - BINARY_DATA_FILE_2_FORMAT = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ['BIN','SERAFIN','SERAFIND','MED'], - defaut = 'BIN', - fr = """Format du fichier de geometrie. -Les valeurs possibles sont : -- BIN : format binaire standard -- SERAFIN : format standard simple precision pour Telemac; -- SERAFIND: format standard double precision pour Telemac; -- MED : format MED base sur HDF5""", - ang = """Geometry file format. -Possible values are: -- BIN : Standard binary format -- SERAFIN : classical single precision format in Telemac; -- SERAFIND: classical double precision format in Telemac; -- MED : MED format based on HDF5""", - ), -# ----------------------------------- - BINARY_DATA_FILE_2 = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de donnees code en binaire mis a la disposition -de l''utilisateur. -Les donnees de ce fichier seront a lire sur le canal 25.""", - ang = """Binary-coded data file made available to the user. -The data in this file shall be read on channel 25.""", - ), -# ----------------------------------- - FORMATTED_DATA_FILE_1 = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de donnees formate mis a la disposition de -l''utilisateur. -Les donnees de ce fichier seront a lire sur le canal 26.""", - ang = """Formatted data file made available to the user. -The data in this file shall be read on channel 26.""", - ), -# ----------------------------------- - FORMATTED_DATA_FILE_2 = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de donnees formate mis a la disposition de -l''utilisateur. -Les donnees de ce fichier seront a lire sur le canal 27.""", - ang = """Formatted data file made available to the user. -The data in this file shall be read on channel 27.""", - ), -# ----------------------------------- - INPUT_FILES = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - GEOMETRY_FILE_FORMAT = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ['SERAFIN','SERAFIND','MED'], - defaut = 'SERAFIN', - fr = """Format du fichier de geometrie. -Les valeurs possibles sont : -- SERAFIN : format standard simple precision pour Telemac; -- SERAFIND: format standard double precision pour Telemac; -- MED : format MED base sur HDF5""", - ang = """Geometry file format. -Possible values are: -- SERAFIN : classical single precision format in Telemac; -- SERAFIND: classical double precision format in Telemac; -- MED : MED format based on HDF5""", - ), -# ----------------------------------- - GEOMETRY_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - fr = """Nom du fichier contenant le maillage du calcul a realiser.""", - ang = """Name of the file containing the mesh. This file may also -contain the topography and the friction coefficients.""", - ), -# ----------------------------------- - FORTRAN_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = 'FichierOuRepertoire', - defaut = 'DEFAUT', - fr = """Nom du fichier FORTRAN a soumettre.""", - ang = """Name of FORTRAN file to be submitted.""", - ), -# ----------------------------------- - BOTTOM_TOPOGRAPHY_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Nom du fichier eventuel contenant la bathymetrie associee au -maillage. -Si ce mot-cle est utilise; c''est cette bathymetrie qui sera utilisee -pour le calcul.""", - ang = """Name of the possible file containing the bathymetric data. -Where this keyword is used, these bathymetric data shall be used in -the computation.""", - ), -# ----------------------------------- - BOTTOM_SMOOTHINGS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Nombre de lissages effectues sur la topographie. -chaque lissage, effectue a l''aide d''une matrice de masse, -est conservatif. -Utilise lorsque les donnees de bathymetrie donnent des resultats -trop irreguliers apres interpolation.""", - ang = """Number of smoothings on bottom topography. -each smoothing is mass conservative. -to be used when interpolation of bathymetry on the mesh gives -very rough results.""", - ), -# ----------------------------------- - BOUNDARY_CONDITIONS_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - fr = """Nom du fichier contenant les types de conditions aux limites. -Ce fichier est rempli de facon automatique par le mailleur au moyen de -couleurs affectees aux noeuds des frontieres du domaine de calcul.""", - ang = """Name of the file containing the types of boundary conditions. -This file is filled automatically by the mesh generator through -through colours that are assigned to the boundary nodes.""", - ), -# ----------------------------------- - VALIDATION = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Option utilisee principalement pour le dossier de validation. Le -fichier des resultats du calcul precedent est alors considere comme une -reference a laquelle on va comparer le calcul. La comparaison est -effectuee par le sous-programme VALIDA qui peut etre une comparaison -avec une solution exacte par exemple.""", - ang = """This option is primarily used for the validation documents. The -PREVIOUS COMPUTATION FILE is then considered as a reference which the -computation is going to be compared with. The comparison is made by the -subroutine VALIDA, which can be modified as to so as to include, for -example,a comparison with an exact solution.""", - ), -# ----------------------------------- - REFERENCE_FILE_FORMAT = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ['SERAFIN','SERAFIND','MED'], - defaut = 'SERAFIN', - fr = """Format du fichier de resultats du calcul precedent. -Les valeurs possibles sont : -- SERAFIN : format standard simple precision pour Telemac; -- SERAFIND: format standard double precision pour Telemac; -- MED : format MED base sur HDF5""", - ang = """Previous computation results file format. -Possible values are: -- SERAFIN : classical single precision format in Telemac; -- SERAFIND: classical double precision format in Telemac; -- MED : MED format based on HDF5""", - ), -# ----------------------------------- - REFERENCE_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de resultats de reference pour la validation. Les resultats a -placer dans ce fichier seront a ecrire sur le canal 22.""", - ang = """Binary-coded result file for validation. The results to be entered -into this file shall be written on channel 22.""", - ), - ), -# ----------------------------------- - GLOBAL = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - PARALLEL_PROCESSORS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """NOMBRE DE PROCESSEURS EN CALCUL PARALLELE -0 : 1 machine, compilation sans bibliotheque de parallelisme -1 : 1 machine, compilation avec bibliotheque de parallelisme -2 : 2 processeurs ou machines en parallele -etc...""", - ang = """NUMBER OF PROCESSORS FOR PARALLEL PROCESSING -0 : 1 machine, compiling without parallel library -1 : 1 machine, compiling with a parallel library -2 : 2 processors or machines in parallel -etc....""", - ), -# ----------------------------------- - CHECKING_THE_MESH = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Si oui on appelle le sous-programme checkmesh qui verifie -la coherence du maillage, points superposes, etc.""", - ang = """if this key word is equal to yes, a call to subroutine -checkmesh will look for errors in the mesh, superimposed points, etc.""", - ), -# ----------------------------------- - MAXIMUM_NUMBER_OF_BOUNDARIES = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 30, - fr = """nombre maximal de frontieres differentes dans le maillage. -Sert au dimensionnement de la memoire, a augmenter si necessaire""", - ang = """maximal number of boundaries in the mesh. -Used for dimensioning arrays. Can be increased if needed""", - ), -# ----------------------------------- - MAXIMUM_NUMBER_OF_SOURCES = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 20, - fr = """nombre maximal de points sources dans le maillage. -Sert au dimensionnement de la memoire, a augmenter si necessaire""", - ang = """maximal number of punctual sources in the mesh. -Used for dimensioning arrays. Can be increased if needed""", - ), -# ----------------------------------- - MAXIMUM_NUMBER_OF_TRACERS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 20, - fr = """nombre maximal de traceurs. -Sert au dimensionnement de la memoire, a augmenter si necessaire""", - ang = """maximal number of tracers. -Used for dimensioning arrays. Can be increased if needed""", - ), -# ----------------------------------- - VECTOR_LENGTH = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """LONGUEUR DU VECTEUR POUR LES MACHINES VECTORIELLES""", - ang = """VECTOR LENGTH ON VECTOR MACHINES""", - ), - ), - ), -# ----------------------------------- - RESTART = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - COMPUTATION_CONTINUED = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Determine si le calcul en cours est independant de tout autre -resultat ou est une reprise effectuee a partir du resultat d''un calcul -precedent. -NON : Il s''agit du premier passage pour ce calcul et il est necessaire -de definir un jeu complet de conditions initiales -OUI : Il s''agit d''une reprise de calcul : -les conditions initiales sont constituees par le dernier pas de -temps du ''FICHIER DU CALCUL PRECEDENT'' du fichier des parametres -utilise pour soumettre le calcul. -Par contre, l''ensemble des donnees du fichier des parametres -peuvent etre redefinies ; ce qui offre la possibilite de changer -par exemple, le pas de temps, le modele de turbulence, le -frottement, d''ajouter ou retirer un traceur ... -De meme, il est necessaire de definir des conditions aux limites -(sous-programme BORD ou valeurs placees dans le fichier des -parametres), qui peuvent egalement etre modifiees.""", - ang = """Determines whether the computation under way is independent -result or is following an earlier result. -NO: It is the first run for this computation and a whole set of -initial conditions should be defined. -YES: It follows a former computation: -the initial conditions consist in the last time step of the -PREVIOUS COMPUTATION FILE in the steering file used for submitting -the computation. -All the data from the steering file may be defined once again, which -provides an opportunity to change, for example, the time step, -the turbulence model, the friction, to add or remove a tracer... -It is also possible to define new boundary conditions.""", - ), -# ----------------------------------- - b_COMPUTATION_CONTINUEDG = BLOC(condition="COMPUTATION_CONTINUED == True", -# ----------------------------------- -# ----------------------------------- - PREVIOUS_COMPUTATION_FILE_FORMAT = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ['SERAFIN','SERAFIND','MED'], - defaut = 'SERAFIN', - fr = """Format du fichier de resultats du calcul precedent. -Les valeurs possibles sont : -- SERAFIN : format standard simple precision pour Telemac; -- SERAFIND: format standard double precision pour Telemac; -- MED : format MED base sur HDF5""", - ang = """Previous computation results file format. -Possible values are: -- SERAFIN : classical single precision format in Telemac; -- SERAFIND: classical double precision format in Telemac; -- MED : MED format based on HDF5""", - ), -# ----------------------------------- - PREVIOUS_COMPUTATION_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Nom d''un fichier contenant les resultats d''un calcul -precedent realise sur le meme maillage et dont le dernier pas de temps -enregistre va fournir les conditions initiales pour une suite de de -calcul.""", - ang = """Name of a file containing the results of an earlier -computation which was made on the same mesh. The last recorded time -step will provid the initial conditions for the new computation.""", - ), -# ----------------------------------- - RECORD_NUMBER_FOR_RESTART = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """En cas de suite de calcul, numero de l''enregistrement -de depart dans le fichier du calcul precedent. 0 signifie -qu''on prend le dernier enregistrement""", - ang = """In case of COMPUTATION CONTINUED, record number to -start from in the PREVIOUS COMPUTATION FILE""", - ), - ), -# ----------------------------------- - INITIAL_TIME_SET_TO_ZERO = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Remet le temps a zero en cas de suite de calcul""", - ang = """Initial time set to zero in case of restart""", - ), - ), -# ----------------------------------- - OUTPUT_FILES = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - RESULTS_FILES = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - NUMBER_OF_FIRST_TIME_STEP_FOR_GRAPHIC_PRINTOUTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Determine le nombre de pas de temps a partir duquel debute -l''ecriture des resultats dans le FICHIER DES RESULTATS.""", - ang = """Determines the number of time steps after which the results -are first written into the RESULTS FILE.""", - ), -# ----------------------------------- - GRAPHIC_PRINTOUT_PERIOD = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """ Determine la periode en nombre de pas de temps d''impression des -VARIABLES POUR LES SORTIES GRAPHIQUES (voir ce mot-cle) dans le FICHIER -DES RESULTATS.""", - ang = """ Determines, in number of time steps, the printout period for the -VARIABLES FOR GRAPHIC PRINTOUTS in the RESULTS FILE.""", - ), -# ----------------------------------- - VARIABLES_FOR_GRAPHIC_PRINTOUTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - into = ["velocity along x axis (m/s)","velocity along y axis (m/s)","wave celerity (m/s)","water depth (m)","free surface elevation (m)","bottom elevation (m)","Froude number","scalar flowrate of fluid (m2/s)","tracer 1 etc.","All the tracers 1 to 9.","All the tracers 10 to 19.","turbulent kinetic energy in k-epsilon model (J/kg)","dissipation of turbulent energy (W/kg)","turbulent viscosity (m2/s)","flowrate along x axis (m2/s)","flowrate along y axis (m2/s)","scalar velocity (m/s)","wind along x axis (m/s)","wind along y axis (m/s)","air pressure (Pa)","friction coefficient","drift along x (m)","drift along y (m)","Courant number ","supplementary variable N","supplementary variable O","supplementary variable R","supplementary variable Z","maximum elevation","time of maximum elevation","maximum velocity","time of maximum velocity","friction velocity","gradient 1, etc. "], - defaut = ["velocity along x axis (m/s)","velocity along y axis (m/s)","water depth (m)","bottom elevation (m)"], - fr = """ Noms des variables que l''utilisateur veut ecrire dans le fichier des -resultats. Chaque variable est representee par une lettre. Le choix des -separateurs est libre. Les possibilites offertes sont les suivantes : - - U : vitesse suivant l''axe des x (m/s), - - V : vitesse suivant l''axe des y (m/s), - - C : celerite des ondes (m/s), - - H : hauteur d''eau (m), - - S : cote de surface libre (m), - - B : cote du fond (m), - - F : nombre de Froude, - - Q : debit scalaire du fluide (m2/s), - - Tn: traceur, avec n le numero du traceur, - - K : energie turbulente du modele k-epsilon (J/kg), - - E : dissipation de l''energie turbulente (W/kg), - - D : viscosite turbulente du modele k-epsilon (m2/s), - - I : debit suivant l''axe des x (m2/s), - - J : debit suivant l''axe des y (m2/s), - - M : vitesse scalaire (m/s), - - X : vent suivant l''axe des x (m/s), - - Y : vent suivant l''axe des y (m/s), - - P : pression atmospherique (Pa), - - W : coefficient de frottement sur le fond, - - A : derive en x (m), - - G : derive en y (m), - - L : coefficient de frottement sur le fond, - - Gn: gradient differencie, avec n le numero de reference du gradient. -L''utilisateur dispose egalement de 4 champs libres, qu''il peut -utiliser pour ecrire dans le fichier des resultats des variables qu''il -cree lui-meme. Ces variables propres a l''utlisateur doivent etre -calculees dans le sous-programme PRERES et le nom que l''on desire leur -donner doit etre ecrit dans le sous-programme NOMVAR. Ces 7 champs sont -: - - N, O, R, Z qui correspondent aux tableaux PRIVE(1,1), PRIVE(1,2), - PRIVE(1,3), PRIVE(1,4). -A la difference des variables precedentes, celles-ci sont conservees -dans tout le programme, et peuvent donc etre reutilisees. Dans ce -dernier cas ne pas oublier de donner une taille suffisante au tableau -PRIVE (dans le programme principal). Il est ainsi possible de limiter, -par exemple, la taille des fichiers de resultats pour de tres gros -calculs. Cependant, il faut etre conscient du fait que, dans -l''eventualite d''une reprise de calcul, le code doit disposer, dans le -fichier des resultats, des informations necessaires a sa poursuite, a -savoir : - - les vitesses U et V, - - les hauteurs d''eau H, - - les cotes du fond B. -Toutefois, TELEMAC peut recalculer certaines de ces variables a -partir d''autres qui lui seront fournies (par exemple, il recalculera H -a partir de S et B).""", - ang = """ Names of variables the user wants to write into the results file. Each -variable is represented by a letter. The separators can be freely -selected. The available capabilities are as follows: - - U : velocity along x axis (m/s), - - V : velocity along y axis (m/s), - - C : wave celerity (m/s), - - H : water depth (m), - - S : free surface elevation (m), - - B : bottom elevation (m), - - F : Froude number, - - Q : scalar flowrate of fluid (m2/s), - - Tn : tracer, with n the tracer number, - - K : turbulent kinetic energy in k-epsilon model (J/kg), - - E : dissipation of turbulent energy (W/kg), - - D : turbulent viscosity of k-epsilon model (m2/s), - - I : flowrate along x axis (m2/s), - - J : flowrate along y axis (m2/s), - - M : scalar velocity (m/s), - - X : wind along x axis (m/s) Y : wind along y axis (m/s), - - P : air pressure (Pa), - - W : friction coefficient , - - A : drift along x, - - G : drift along y, - - L : nombre de courant, - - Gn : differentiated gradient, with n the gradient reference number. -Four other variables are also made available to the -user who may use them for writing into the file the results of variables -he creates himself. These user-specific variables should be computed in -the subroutine PRERES and their desired name should be written into the -subroutine NOMVAR. These seven variables are as follows: -- N, O, R, Z -which correspond to arrays PRIVE(1,1) up to PRIVE(1, Unlike the -preceding variables, they are preserved throughout the program, so that -they can be used again. -In the latter case, do not forget to provide the -array PRIVE with sufficiently large dimensions (in FORTRAN file). With -this key-word, one can limit the size of the RESULTS FILE. It should be -kept in mind, however, that if a computation has to be continued, the -RESULTS FILE should contain the appropriate information for running the -code,i.e.: - - velocities U and V, - - water depths H, - - bottom elevations B. -TELEMAC, however, can compute some of these variables from others for -example, it will compute H from S and B.""", - ), -# ----------------------------------- - NUMBER_OF_PRIVATE_ARRAYS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Nombre de tableaux mis a disposition de l utilisateur""", - ang = """Number of arrays for own user programming""", - ), -# ----------------------------------- - NAMES_OF_PRIVATE_VARIABLES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - fr = """Noms des variables privees en 32 caracteres, 16 pour le nom - 16 pour l''unite. Elles correspondent au bloc PRIVE - et peuvent etre lues dans le fichier de geometrie si elles - y sont presentes avec leur nom""", - ang = """Name of private variables in 32 characters, 16 for the name, - 16 for the unit. They are stored in the block PRIVE and - can be read in the geometry file if they are here with their - name""", - ), -# ----------------------------------- - RESULTS_FILE_FORMAT = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ['SERAFIN','SERAFIND','MED'], - defaut = 'SERAFIN', - fr = """Format du fichier de resultats. -Les valeurs possibles sont : -- SERAFIN : format standard simple precision pour Telemac; -- SERAFIND: format standard double precision pour Telemac; -- MED : format MED base sur HDF5""", - ang = """Results file format. Possible values are: -- SERAFIN : classical single precision format in Telemac; -- SERAFIND: classical double precision format in Telemac; -- MED : MED format based on HDF5""", - ), -# ----------------------------------- - RESULTS_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Nom du fichier dans lequel seront ecrits les resultats du -calcul avec la periodicite donnee par le mot cle ''PERIODE POUR LES -SORTIES GRAPHIQUES''.""", - ang = """Name of the file into which the computation results shall be -written, -the periodicity being given by the key-word: -GRAPHIC PRINTOUT PERIOD.""", - ), -# ----------------------------------- - BINARY_RESULTS_FILE_FORMAT = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ['BIN','SERAFIN','SERAFIND','MED'], - defaut = 'BIN', - fr = """Format du fichier de geometrie. -Les valeurs possibles sont : -- SERAFIN : format standard simple precision pour Telemac; -- SERAFIND: format standard double precision pour Telemac; -- MED : format MED base sur HDF5""", - ang = """Geometry file format. -Possible values are: -- SERAFIN : classical single precision format in Telemac; -- SERAFIND: classical double precision format in Telemac; -- MED : MED format based on HDF5""", - ), -# ----------------------------------- - BINARY_RESULTS_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats code en binaire mis a la disposition -de l''utilisateur. Les resultats a placer dans ce fichier seront a -ecrire sur le canal 28.""", - ang = """Additional binary-coded result file made available -to the user. The results to be entered into this file shall be written -on channel 28.""", - ), -# ----------------------------------- - FORMATTED_RESULTS_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats formate mis a la disposition de -l''utilisateur. -Les resultats a placer dans ce fichier seront a ecrire sur -le canal 29.""", - ang = """Formatted file of results made available to the user. -The results to be entered into this file shall be written -on channel 29.""", - ), - ), -# ----------------------------------- - CONTROL_SECTION = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - CONTROL_SECTIONS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', min=0, max='**', - fr = """Couples de points (numeros globaux dans le maillage) entre -lesquels les debits instantanes et cumules seront donnes.""", - ang = """Couples of points (global numbers -in the mesh) defining sections - where the instantaneous and cumulated discharges will be given""", - ), -# ----------------------------------- - PRINTING_CUMULATED_FLOWRATES = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """IMPRESSION DU FLUX CUMULE A TRAVERS LES SECTIONS DE CONTROLE""", - ang = """PRINTING THE CUMULATED FLOWRATES THROUGH CONTROL SECTIONS""", - ), -# ----------------------------------- - COMPATIBLE_COMPUTATION_OF_FLUXES = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """FLUX A TRAVERS LES SECTIONS DE CONTROLE, CALCUL COMPATIBLE -AVEC L''IMPERMEABILITE SOUS FORME FAIBLE""", - ang = """FLOWRATES THROUGH CONTROL SECTIONS, COMPUTATION COMPATIBLE -WITH THE WEAK FORMULATION OF NO-FLUX BOUNDARY CONDITION""", - ), -# ----------------------------------- - SECTIONS_INPUT_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """sections input file, partitioned""", - ang = """sections input file, partitioned""", - ), -# ----------------------------------- - SECTIONS_OUTPUT_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """sections output file, written by the master""", - ang = """sections output file, written by the master""", - ), -# ----------------------------------- - FLUXLINE = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """FLUXLINE""", - ang = """Use Fluxline to compute flux over lines""", - ), -# ----------------------------------- - FLUXLINE_INPUT_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Nom du fichier de fluxline, avec des donnees sur les sections""", - ang = """Name of the Fluxline file, with data on cross-sections""", - ), - ), -# ----------------------------------- - LISTING = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - NUMBER_OF_FIRST_TIME_STEP_FOR_LISTING_PRINTOUTS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Determine le nombre de pas de temps a partir duquel debute -l''ecriture des resultats dans le listing.""", - ang = """Determines the number of time steps after which the results -are first written into the listing.""", - ), -# ----------------------------------- - LISTING_PRINTOUT_PERIOD = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """ Determine la periode en nombre de pas de temps d''impression des -VARIABLES A IMPRIMER (voir ce mot-cle) Pour la mise au point, il faut -savoir que la sortie des resultats est effectuee systematiquement sur le -fichier de retour d''execution du code (actuellement accessible par le -menu 3.f de SPF sur IBM, et dans le fichier !CAS.SORTIE sur station de -travail)""", - ang = """ Determines, in number of time steps, the printout period of the -VARIABLES TO BE PRINTED The results are systematically printed out on -the listing file (file CAS.SORTIE at the workstation).""", - ), -# ----------------------------------- - LISTING_FOR_PRINTOUT_PERIOD = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Determine la periode en nombre de pas de temps d''impression -des VARIABLES A IMPRIMER (voir ce mot-cle) Pour la mise au point, -il faut savoir que la sortie des resultats est effectuee -systematiquement sur le fichier de retour d''execution du code -(actuellement accessible par le menu 3.f de SPF sur IBM, et dans -le fichier !CAS.SORTIE sur station de travail)""", - ang = """Determines, in number of time steps, the printout period of -the VARIABLES TO BE PRINTED -The results are systematically printed out on the listing file -(file CAS.SORTIE at the workstation).""", - ), -# ----------------------------------- - LISTING_PRINTOUT = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Sortie des resultats sur support papier. -Si l''on met NON le listing ne contient que l''entete et la mention -FIN NORMALE DU PROGRAMME -Commande a eviter""", - ang = """Result printout on hard copy. -When NO is selected, the listing only includes the heading and the -phrase "NORMAL END OF PROGRAM" -In addition, the options MASS BALANCE and VALIDATION are inhibited. -Not recommended for use.""", - ), -# ----------------------------------- - VARIABLES_TO_BE_PRINTED = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - intoSug = ["velocity along x axis (m/s)","velocity along y axis (m/s)","wave celerity (m/s)","water depth (m)","free surface elevation (m)","bottom elevation (m)","Froude number","scalar flowrate of fluid (m2/s)","tracer 1, etc.","turbulent kinetic energy in k-epsilon model (J/kg)","dissipation of turbulent energy (W/kg)","turbulent viscosity of k-epsilon model (m2/s)","flowrate along x axis (m2/s)","flowrate along y axis (m2/s)","scalar velocity (m/s)","wind along x axis (m/s)","wind along y axis (m/s)","air pressure (Pa)","friction coefficient","drift along x (m)","drift along y (m)","nombre de courants ","supplementary variable N","supplementary variable O","supplementary variable R","supplementary variable Z","gradient 1, etc."], - defaut = '', - fr = """Nom des variables que l''utilisateur desire ecrire a l''ecran. Meme -possibilites que pour les sorties graphiques.""", - ang = """Name of the variables that the user wants printed on screen. -Same values available as graphical outputs""", - ), -# ----------------------------------- - MASS_BALANCE = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Determine si l''on effectue ou non le bilan de masse -sur le domaine. -Cette procedure calcule a chaque pas de temps : - - les flux aux entrees et sorties du domaine; - - le flux global a travers l''ensemble des parois du domaine (liquides -ou solides) -- l''erreur relative sur la masse pour ce pas de temps. -En fin de listing, on trouve l''erreur relative sur la masse pour -l''ensemble du calcul. -Il ne s''agit que d''un calcul indicatif car il n''existe pas -d''expression compatible du debit en formulation c,u,v.""", - ang = """Determines whether a check of the mass-balance over -the domain is mader or not. -This procedures computes the following at each time step: -the domain inflows and outflows, -the overall flow across all the boundaries, -the relative error in the mass for that time step. -The relative error in the mass over the whole computation can be found -at the end of the listing.""", - ), -# ----------------------------------- - INFORMATION_ABOUT_SOLVER = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Donne a chaque pas de temps le nombre d''iterations necessaires -a la convergence du solveur de l''etape de propagation.""", - ang = """if YES, prints the number of iterations -that have been necessar -to get the solution of the linear system.""", - ), -# ----------------------------------- - LIST_OF_POINTS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', min=0, max='**', - fr = """Liste de points remarquables pour les impressions""", - ang = """List of remarkable points for printouts""", - ), -# ----------------------------------- - NAMES_OF_POINTS = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - fr = """Noms des points remarquables pour les impressions""", - ang = """Names of remarkable points for printouts""", - ), - ), -# ----------------------------------- - FOURIER = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - FOURIER_ANALYSIS_PERIODS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """Liste des periodes que l''on veut analyser""", - ang = """List of periods to be analysed""", - ), -# ----------------------------------- - TIME_RANGE_FOR_FOURIER_ANALYSIS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min= 2, max= 2, - defaut = [0.,0.], - fr = """Pour le calcul du marnage et de la phase de la maree""", - ang = """For computing tidal range and phase of tide""", - ), - ), - ), -) -# ----------------------------------------------------------------------- -HYDRO = PROC(nom= "HYDRO",op = None, -# ----------------------------------------------------------------------- - UIinfo = {"groupes": ("CACHE")}, -# ----------------------------------- - BOUNDARY_CONDITIONS = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - PRESCRIBED_ELEVATIONS = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', max='**', - fr = """Valeurs des cotes imposees aux frontieres liquides entrantes. -Lire la partie du mode d''emploi consacree aux conditions aux limites""", - ang = """Values of prescribed elevations at the inflow boundaries. -The section about boundary conditions is to be read in the manual""", - ), -# ----------------------------------- - PRESCRIBED_FLOWRATES = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', max='**', - fr = """Valeurs des debits imposes aux frontieres liquides entrantes. -Lire la partie du mode d''emploi consacree aux conditions aux limites""", - ang = """Values of prescribed flowrates at the inflow boundaries. -The section about boundary conditions is to be read in the manual""", - ), -# ----------------------------------- - PRESCRIBED_VELOCITIES = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', max='**', - fr = """Valeurs des vitesses imposees aux frontieres liquides entrantes. - Lire la partie du mode d''emploi consacree aux conditions aux limites""", - ang = """Values of prescribed velocities at the liquid inflow boundaries. - Refer to the section dealing with the boundary conditions""", - ), - ), -# ----------------------------------- - BOUNDARY_CONDITIONS_OTHERS = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - STAGE_DISCHARGE_CURVES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', max='**', - into = ["no","Z(Q)","Q(Z) not programmed"], - fr = """Indique si une courbe de tarage doit etre utilisee pour une frontiere -0:non 1:Z(Q) 2: Q(Z) (2 non programme)""", - ang = """Says if a discharge-elevation curve must be used for a given boundary -0:NO 1:Z(Q) 2: Q(Z) (2 not programmed)""", - ), -# ----------------------------------- - b_STAGE_DISCHARGE_CURVESG = BLOC(condition="STAGE_DISCHARGE_CURVES != 'no'", -# ----------------------------------- -# ----------------------------------- - STAGE_DISCHARGE_CURVES_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Nom du fichier contenant les courbes de tarage""", - ang = """Name of the file containing stage-discharge curves""", - ), - ), -# ----------------------------------- - VELOCITY_PROFILES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - into = ["constant normal profile","u and v given in the conlim file","normal velocity given in ubor in the conlim file","velocity proportional to square root of depth","velocity proportional to square root of depth, variant"], - fr = """1:profil normal constant 2:u et v -donnes dans le fichier conlim - 3:vitesse normale donnee dans ubor dans le fichier conlim - 4:profil en racine de la profondeur - 5:profil en racine de la profondeur, variante""", - ang = """1:constant normal profile 2:u and v given in the conlim file - 3:normal velocity given in ubor in the conlim file - 4:sqrt(depth) profile - 5:sqrt(depth) profile, variant""", - ), -# ----------------------------------- - OPTION_FOR_LIQUID_BOUNDARIES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', max='**', - into = ["classical","Thompson method based on characteristics"], - fr = """On donne 1 entier par frontiere liquide - 1 : conditions aux limites classiques - 2 : methode de Thompson avec calcul de caracteristiques""", - ang = """One integer per liquid boundary is given - 1 : classical boundary conditions - 2 : Thompson method based on characteristics""", - ), -# ----------------------------------- - LIQUID_BOUNDARIES_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de variations en temps des conditions aux limites. -Les donnees de ce fichier seront a lire sur le canal 12.""", - ang = """Variations in time of boundary conditions. -Data of this file are read -on channel 12.""", - ), -# ----------------------------------- - ELEMENTS_MASKED_BY_USER = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """SI OUI REMPLIR LE SOUS-PROGRAMME MASKOB""", - ang = """IF YES REWRITE SUBROUTINE MASKOB""", - ), -# ----------------------------------- - b_ELEMENTS_MASKED_BY_USERG = BLOC(condition="ELEMENTS_MASKED_BY_USER == True", -# ----------------------------------- -# ----------------------------------- - Consigne = SIMP(statut ="o", homo="information", typ="TXM", -# ----------------------------------- - defaut = "Rewrite subroutine maskob"), - ), - ), -# ----------------------------------- - PHYSICAL_PARAMETERS_HYDRO = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - FRICTION = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - MAXIMUM_NUMBER_OF_FRICTION_DOMAINS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 10, - fr = """nombre maximal de zones pouvant etre definies pour le -frottement. Peut etre augmente si necessaire""", - ang = """maximal number of zones defined for the friction. -Could be increased if needed""", - ), -# ----------------------------------- - FRICTION_DATA = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Lois de frottements definies par zone""", - ang = """Friction law defined by area""", - ), -# ----------------------------------- - FRICTION_DATA_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """fichier de donnees pour le frottement""", - ang = """friction data file""", - ), -# ----------------------------------- - LAW_OF_BOTTOM_FRICTION = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["NO FRICTION","HAALAND","CHEZY","STRICKLER","MANNING","NIKURADSE"], - fr = """ selectionne le type de formulation utilisee pour le calcul du -frottement sur le fond. Les lois possibles sont les suivantes (cf. Note -de principe) : - 0 : pas de frottement sur le fond; 1 : formule de -Haaland 2 : formule de Chezy 3 : formule de STRICKLER 4 : formule de -MANNING 5 : formule de NIKURADSE""", - ang = """ Selects the type of formulation used for the bottom friction. The -possible laws are as follows (refer to the Principle note): 0: no -friction against bottom, 1: Haaland''s formula 2: CHEZY''s formula 3: -STRICKLER''s formula 4: MANNING''s formula 5: NIKURADSE''s formula""", - ), -# ----------------------------------- - b_LAW_OF_BOTTOM_FRICTIONG = BLOC(condition="LAW_OF_BOTTOM_FRICTION != 'NO FRICTION'", -# ----------------------------------- -# ----------------------------------- - FRICTION_COEFFICIENT = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 50., - fr = """Fixe la valeur du coefficient de frottement pour la -formulation choisie. -Attention; la signification de ce chiffre varie suivant la formule -choisie : - 1 : coefficient lineaire - 2 : coefficient de Chezy - 3 : coefficient de Strickler - 4 : coefficient de Manning - 5 : hauteur de rugosite de Nikuradse""", - ang = """Sets the value of the friction coefficient for the selected -formulation. It is noteworthy that the meaning of this figure changes -according to the selected formula (Chezy, Strickler, etc.) : - 1 : linear coefficient - 2 : Chezy coefficient - 3 : Strickler coefficient - 4 : Manning coefficient - 5 : Nikuradse grain size""", - ), - ), -# ----------------------------------- - MANNING_DEFAULT_VALUE_FOR_COLEBROOK_WHITE_LAW = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.02, - fr = """valeur par defaut du manning pour la loi de frottement de -Colebrook-White (loi numero 7)""", - ang = """Manning default value for the friction law of Colebrook-White -(law number 7)""", - ), -# ----------------------------------- - DEPTH_IN_FRICTION_TERMS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["nodal","average"], - defaut = "nodal", - fr = """1 : nodale 2 : moyenne""", - ang = """1: nodal 2: average""", - ), -# ----------------------------------- - NON_SUBMERGED_VEGETATION_FRICTION = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """calcul du frottement du a la vegetation non submergee""", - ang = """friction calculation of the non-submerged vegetation""", - ), -# ----------------------------------- - b_NON_SUBMERGED_VEGETATION_FRICTIONG = BLOC(condition="NON_SUBMERGED_VEGETATION_FRICTION == True", -# ----------------------------------- -# ----------------------------------- - DIAMETER_OF_ROUGHNESS_ELEMENTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.006, - fr = """diametre des elements de frottements""", - ang = """diameter of roughness element""", - ), -# ----------------------------------- - SPACING_OF_ROUGHNESS_ELEMENTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.14, - fr = """espacement des elements de frottement""", - ang = """spacing of rouhness element""", - ), - ), -# ----------------------------------- - LAW_OF_FRICTION_ON_LATERAL_BOUNDARIES = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["NO FRICTION","HAALAND","CHEZY","STRICKLER","MANNING","NIKURADSE","LOG LAW","COLEBROOK-WHITE"], - defaut = "NO FRICTION", - fr = """selectionne le type de formulation utilisee pour le calcul -du frottement sur les parois laterales. -Les lois possibles sont les suivantes (cf. Note de principe) : -0 : pas de frottement -1 : lineaire -2 : Chezy -3 : Strickler -4 : Manning -5 : formule de NIKURADSE -6 : loi en log -7 : Colebrook-White""", - ang = """Selects the type of formulation used -for the friction on lateral boundaries. -The possible laws are as follows (refer to the Principle note): -0: no friction -1: linear -2: Chezy -3: Strickler -4: Manning -5: NIKURADSE''s formula -6 : law log -7 : Colebrook-White""", - ), -# ----------------------------------- - b_LAW_OF_FRICTION_ON_LATERAL_BOUNDARIESG = BLOC(condition="LAW_OF_FRICTION_ON_LATERAL_BOUNDARIES != 'NO FRICTION'", -# ----------------------------------- -# ----------------------------------- - ROUGHNESS_COEFFICIENT_OF_BOUNDARIES = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 100., - fr = """Fixe la valeur du coefficient de frottement sur les frontieres -solides avec un regime turbulent rugueux sur les bords du domaine. -meme convention que pour le coefficient de frottement: - 1 : non programme - 2 : coefficient de Chezy - 3 : coefficient de Strickler - 4 : coefficient de Manning - 5 : hauteur de rugosite de Nikuradse""", - ang = """Sets the value of the friction coefficient of the solid -boundary with the bed roughness option. Same meaning than friction -coefficient""", - ), - ), -# ----------------------------------- - DEFINITION_OF_ZONES = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Declenche l''appel a def\_zones, pour donner - un numero de zone a chaque point""", - ang = """Triggers the call to def\_zones to give a zone number to every point""", - ), -# ----------------------------------- - b_DEFINITION_OF_ZONESG = BLOC(condition="DEFINITION_OF_ZONES == True", -# ----------------------------------- -# ----------------------------------- - Consigne = SIMP(statut ="o", homo="information", typ="TXM", -# ----------------------------------- - defaut = "Rewrite subroutine def_zones"), - ), -# ----------------------------------- - ZONES_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier des zones avec sur chaque ligne -numero de point numero de zone""", - ang = """Zones file, with on every line: -point number zone number""", - ), - ), -# ----------------------------------- - METEOROLOGY = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - WIND = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Prise en compte ou non des effets du vent.""", - ang = """Determines whether the wind effects are to be taken into -account or not.""", - ), -# ----------------------------------- - b_WINDG = BLOC(condition="WIND == True", -# ----------------------------------- -# ----------------------------------- - WIND_VELOCITY_ALONG_X = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Composante de la vitesse du vent suivant l''axe des x (m/s).""", - ang = """Wind velocity, component along x axis (m/s).""", - ), -# ----------------------------------- - WIND_VELOCITY_ALONG_Y = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Composante de la vitesse du vent suivant l''axe des y (m/s).""", - ang = """Wind velocity, component along y axis (m/s).""", - ), -# ----------------------------------- - THRESHOLD_DEPTH_FOR_WIND = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1., - fr = """Retire la force due au vent dans les petites profondeurs""", - ang = """Wind is not taken into account for small depths""", - ), -# ----------------------------------- - COEFFICIENT_OF_WIND_INFLUENCE = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Fixe la valeur du coefficient d''entrainement du vent (cf. -Note de principe).""", - ang = """Sets the value of the wind driving coefficient. -Refer to principle note.""", - ), -# ----------------------------------- - OPTION_FOR_WIND = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["constant in time and space","variable in time given by formated file","variable in time and space given by formated file"], - defaut = "constant in time and space", - fr = """donne les options pour introduire le vent: - 1: constant en temps et en espace (donne par le mot cle - VITESSE ET DIRECTION DU VENT) - 2: variable en temps donne par fichier formate - 3: variable en temps et en espace donne par fichier formate - ou un fichier binaire serafin""", - ang = """gives option for managing the wind: - 1: constant in time and space, given by keyword SPEED AND - DIRECTION OF WIND - 2: variable in time and (constant in space), given by formated file - 3: variable in time and space , given by formated file or by - a binary serafin file""", - ), -# ----------------------------------- - b_OPTION_FOR_WINDG = BLOC(condition="OPTION_FOR_WIND == 'constant in time and space'", -# ----------------------------------- -# ----------------------------------- - SPEED_AND_DIRECTION_OF_WIND = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min= 2, max= 2, - defaut = [0.,0.], - fr = """Donne la vitesse et la direction (en degres de 0 a 360, -0 etant y=0 et x=+inf) du vent lorsqu ils sont consant en temps et -en espace (mot cle OPTION DU VENT = 1)""", - ang = """gives the speed and direction (degre (from 0 to 360), -0 given y=0 anx x=+infinity) when they are constant in time and space -(keyword OPTION FOR WIND = 1)""", - ), - ), -# ----------------------------------- - b_OPTION_FOR_WINDH = BLOC(condition="OPTION_FOR_WIND == 'variable in time given by formated file' or OPTION_FOR_WIND == 'variable in time and space given by formated file'", -# ----------------------------------- -# ----------------------------------- - Consigne = SIMP(statut ="o", homo="information", typ="TXM", -# ----------------------------------- - defaut = "Give the formatted file 3"), - ), - ), -# ----------------------------------- - AIR_PRESSURE = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Permet de decider si l''on prend ou non en compte l''influence -d''un champ de pression.""", - ang = """Provided to decide whether the influence of -an atmosphere field -is taken into account or not.""", - ), -# ----------------------------------- - b_AIR_PRESSUREG = BLOC(condition="AIR_PRESSURE == True", -# ----------------------------------- -# ----------------------------------- - VALUE_OF_ATMOSPHERIC_PRESSURE = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 100000., - fr = """donne la valeur de la pression atmospherique lorsquelle est -constante en temps et en espace""", - ang = """gives the value of atmospheric pressure when it is contant -in time and space""", - ), - ), -# ----------------------------------- - RAIN_OR_EVAPORATION = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Pour ajouter un apport ou une perte d''eau en surface. -Voir le mot-cle PLUIE OU EVAPORATION EN MM PAR JOUR""", - ang = """to add or remove water at the free surface. See the key-word -RAIN OR EVAPORATION IN MM PER DAY""", - ), -# ----------------------------------- - b_RAIN_OR_EVAPORATIONG = BLOC(condition="RAIN_OR_EVAPORATION == True", -# ----------------------------------- -# ----------------------------------- - RAIN_OR_EVAPORATION_IN_MM_PER_DAY = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.0, - fr = """Pour ajouter un apport ou une perte d''eau en surface""", - ang = """to add or remove water at the free surface""", - ), - ), -# ----------------------------------- - RAINFALL_RUNOFF_MODEL = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ["No infiltration","CN runoff model"], - defaut = "No infiltration", - fr = """Option pour modele pluie-debit. Les options disponibles sont: - 0 : Pas d infiltration (fonction de base) - 1 : Modele CN (Curve Number du SCS)""", - ang = """Option for the rainfall-runoff model. Available options are: - 0 : No infiltration - 1 : CN runoff model (Curve Number method of the SCS)""", - ), -# ----------------------------------- - ANTECEDENT_MOISTURE_CONDITIONS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 2, - fr = """Donne les conditions d humidite precedant un episode de pluie pour -le modele CN du SCS. Les options disponibles sont: - 1 : conditions precedentes seches - 2 : conditions precedentes normales - 3 : conditions prcedentes mouillees -ce mot cle est uniquement utile pour le modele pluie-debit 1 (CN)""", - ang = """Gives the antecedent moisture conditions before a rainfall - event for the SCS CN runoff model. Available options are: - 1 : dry antecedent conditions - 2 : normal antecedent conditions - 3 : wet antecedent conditions -This keyword is only usefull for runoff model 1 (SCS CN model)""", - ), -# ----------------------------------- - DURATION_OF_RAIN_OR_EVAPORATION_IN_HOURS = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', - defaut = 1.E6, - fr = """Donne la duree de la pluie en heure, par defaut pluie infinie""", - ang = """Gives the duration of the rain in hour, -default value is infinite""", - ), -# ----------------------------------- - ASCII_ATMOSPHERIC_DATA_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de donnees en ascii contenant les informations -atmospheriques variables en temps""", - ang = """Ascii data file containing the atmospheric data varying in -time""", - ), -# ----------------------------------- - BINARY_ATMOSPHERIC_DATA_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de donnees code en binaire contenant les informations -atmospheriques variables en temps et en espace sur le maillage""", - ang = """Binary-coded data file containing the atmospheric data varying in -time and space on the mesh""", - ), -# ----------------------------------- - BINARY_ATMOSPHERIC_DATA_FILE_FORMAT = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ['SERAFIN','SERAFIND','MED'], - defaut = 'SERAFIN', - fr = """Format du fichier binaire de donn\E9es atmospheriques. -Les valeurs possibles sont : -- SERAFIN : format standard simple precision pour Telemac; -- SERAFIND: format standard double precision pour Telemac; -- MED : format MED base sur HDF5""", - ang = """Binary atmospheric file format. -Possible values are: -- SERAFIN : classical single precision format in Telemac; -- SERAFIND: classical double precision format in Telemac; -- MED : MED format based on HDF5""", - ), -# ----------------------------------- - OPTION_FOR_INITIAL_ABSTRACTION_RATIO = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Donne le ratio entre pertes initiales IA et la retention potenti -maximale S pour le modele pluie-debit SCS CN. Les options disponibles so - 1 : IA/S = 0.2 (methode standard) - 2 : IA/S = 0.05 (methode revisee, cf. Woodward, Hawkins et al. 2003. A - cette option les coefficients CN fournis en entree sont alors - automatiquement corriges, cf. manuel utilisateur). -Ce mot cle est uniquement utile pour le modele pluie-d�bit 1 (CN)""", - ang = """Gives the ratio for Initial Abstraction to Maximal Potential -Retention S for the SCS CN runoff model. Available options are: - 1 : IA/S = 0.2 (standard method) - 2 : IA/S = 0.05 (revised method, see Woodward, Hawkins et al. 2003. Wi - this option the CN values given in input are automatically convers - see user manual). -This keyword is only useful for runoff model 1 (SCS CN model)""", - ), - ), -# ----------------------------------- - WAVE = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - WAVE_DRIVEN_CURRENTS = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Active la prise en compte des courants de houle""", - ang = """Wave driven currents are taken into account.""", - ), -# ----------------------------------- - b_WAVE_DRIVEN_CURRENTSG = BLOC(condition="WAVE_DRIVEN_CURRENTS == True", -# ----------------------------------- -# ----------------------------------- - RECORD_NUMBER_IN_WAVE_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Numero d enregistrement dans le fichier des courants de houle""", - ang = """Record number to read in the wave driven currents file""", - ), - ), -# ----------------------------------- - WAVE_ENHANCED_FRICTION_FACTOR = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Active la prise en compte des interactions non-lineaires entre la -houle et les courant pour le calcul du courant de houle (cf OConnor and -Yoo, 1988, Coast Eng.12.)""", - ang = """Wave friction enhancement for the calculation of the wave generated -longshore current (cf OConnor and Yoo, 1988, Coast Eng.12.)""", - ), - ), -# ----------------------------------- - ESTIMATION = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - PARAMETER_ESTIMATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ['','FRICTION','FRICTION, STEADY'], - defaut = '', - fr = """Liste des parametres a estimer, choix : FROTTEMENT - ou FROTTEMENT, PERMANENT""", - ang = """List of parameter to be estimated, choice : FRICTION - or FRICTION, STEADY""", - ), -# ----------------------------------- - COST_FUNCTION = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ["Computed with h,u,v","Computed with c,u,v"], - defaut = "Computed with h,u,v", - fr = """1 : calculee sur h, u , v 2 : calculee avec c, u , v""", - ang = """1: computed with h, u , v 2: computed with c, u , v""", - ), -# ----------------------------------- - IDENTIFICATION_METHOD = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["list of tests","gradient simple","conj gradient","Lagrange interp."], - defaut = "gradient simple", - fr = """0 : plan d''experience -1 : gradient simple -2 : gradient conj. -3 : interp. de Lagrange""", - ang = """0 : list of tests -1: gradient -2 : conj. gradient -3 : lagrange interp.""", - ), -# ----------------------------------- - TOLERANCES_FOR_IDENTIFICATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min= 4, max= 4, - defaut = [1.E-3,1.E-3,1.E-3,1.E-4], - fr = """4 nombres : precision absolue sur H, U, V, - et precision relative sur la fonction cout""", - ang = """4 numbers: absolute precision on H, U V, - and relative precision on the cost function""", - ), -# ----------------------------------- - MAXIMUM_NUMBER_OF_ITERATIONS_FOR_IDENTIFICATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 20, - fr = """chaque iteration comprend au moins un - calcul direct et un calcul adjoint""", - ang = """every iteration implies at least a direct and - an adjoint computation""", - ), - ), -# ----------------------------------- - SOURCES = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - ABSCISSAE_OF_SOURCES = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """Valeurs des abscisses des sources de debit et de traceur.""", - ang = """abscissae of sources of flowrate and/or tracer""", - ), -# ----------------------------------- - ORDINATES_OF_SOURCES = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """Valeurs des ordonnees des sources de debit et de traceur.""", - ang = """ordinates of sources of flowrate and/or tracer""", - ), -# ----------------------------------- - WATER_DISCHARGE_OF_SOURCES = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """Valeurs des debits des sources.""", - ang = """values of water discharge of sources""", - ), -# ----------------------------------- - VELOCITIES_OF_THE_SOURCES_ALONG_X = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """Vitesses du courant a chacune des sources. Si elles ne sont pas -donnees, on considere que la vitesse est celle du courant""", - ang = """Velocities at the sources. If they are not given, the velocity -of the flow at this location is taken""", - ), -# ----------------------------------- - VELOCITIES_OF_THE_SOURCES_ALONG_Y = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """Vitesses du courant a chacune des sources""", - ang = """Velocities at the sources""", - ), -# ----------------------------------- - TYPE_OF_SOURCES = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["Normal","Dirac"], - defaut = "Normal", - fr = """1: Source portee par une base elements finis -2: Source portee par une fonction de Dirac""", - ang = """1: Source term multiplied by a finite element basis -2: Source term multiplied by a Dirac function""", - ), -# ----------------------------------- - SOURCES_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Nom du fichier contenant les informations variables -en temps des sources""", - ang = """Name of the file containing time-dependent -information on sources""", - ), -# ----------------------------------- - BLOBAL_NUMBERS_OF_SOURCE_NODES = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', min=0, max='**', - fr = """ Numeros globaux des noeuds du maillage sur lequels sont affectes des -points source""", - ang = """ Global numbers of nodes in the mesh that correspond to source point -locations""", - ), - ), -# ----------------------------------- - WATER_QUALITY_INFO = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - WATER_QUALITY_PROCESS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """donne le numero du processus waq (1 ou 2 ou 3 -ou 4 ou 5) -0- RIEN, 1-O2, 2-BIOMASS, 3-EUTRO 4-MICROPOL 5-THERMIC)""", - ang = """gives the waq process number (from 1 to 5) -0-NOTHING, 1-O2, 2-BIOMASS, 3-EUTRO 4-MICROPOL 5-THERMIC)""", - ), - ), -# ----------------------------------- - ADVANCED_PHY = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - WATER_DENSITY = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1000., - fr = """Fixe la valeur de la masse volumique de l''eau.""", - ang = """set the value of water density""", - ), -# ----------------------------------- - GRAVITY_ACCELERATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 9.81, - fr = """Fixe la valeur de l''acceleration de la pesanteur.""", - ang = """Set the value of the acceleration due to gravity.""", - ), -# ----------------------------------- - VERTICAL_STRUCTURES = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Prise en compte de la force de trainee de structures verticales -(il faut alors remplir la subroutine DRAGFO)""", - ang = """drag forces from vertical structures are taken into account. -(subroutine DRAGFO must then be implemented)""", - ), -# ----------------------------------- - b_VERTICAL_STRUCTURESG = BLOC(condition="VERTICAL_STRUCTURES == True", -# ----------------------------------- -# ----------------------------------- - Consigne = SIMP(statut ="o", homo="information", typ="TXM", -# ----------------------------------- - defaut = "Fill the subroutine DRAGFO"), - ), - ), - ), -# ----------------------------------- - NUMERICAL_PARAMETERS_HYDRO = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - EQUATIONS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ['SAINT-VENANT FE','SAINT-VENANT FV','BOUSSINESQ'], - defaut = 'SAINT-VENANT FE', - fr = """CHOIX DES EQUATIONS A RESOUDRE : SAINT-VENANT ELEMENTS FINIS, -SAINT-VENANT VOLUMES FINIS OU BOUSSINESQ 20 CARACTERES""", - ang = """CHOICE OF EQUATIONS TO SOLVE : SAINT-VENANT FINITE ELEMENTS, -SAINT-VENANT FINITE VOLUMES OR BOUSSINESQ 20 CHARACTERS""", - ), -# ----------------------------------- - b_EQUATIONSG = BLOC(condition="EQUATIONS == 'SAINT-VENANT FV'", -# ----------------------------------- -# ----------------------------------- - FINITE_VOLUME_SCHEME = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["Roe scheme","kinetic order 1","kinetic order 2","Zokagoa scheme order 1","Tchamen scheme order 1","HLLC scheme order 1","WAF scheme order 2"], - defaut = "kinetic order 1", - fr = """0 : schema de Roe 1 : cinetique ordre 1 2 : cinetique ordre 2 -3 : schema de Zokagoa 4 : schema de Tchamen 5 : HLLC ordre 1 -6 : WAF ordre 2""", - ang = """0: Roe scheme 1: kinetic order 1 2: kinetic order 2 -3 : Zokagoa scheme 4 : Tchamen scheme 5 : HLLC order 1 -6 : WAF order 2""", - ), - ), -# ----------------------------------- - TREATMENT_OF_THE_LINEAR_SYSTEM = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["coupled","Wave equation"], - defaut = "coupled", - fr = """1 : Traitement couple 2 : equation d onde""", - ang = """1 : Coupled 2 : wave equation""", - ), - ), -# ----------------------------------- - FLUID = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - CORIOLIS_EFFECT = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - CORIOLIS = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Prise en compte ou non de la force de Coriolis.""", - ang = """The Coriolis force is taken into account or ignored.""", - ), -# ----------------------------------- - CORIOLIS_COEFFICIENT = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Fixe la valeur du coefficient de la force de Coriolis. -Celui-ci doit etre calcule en fonction de la latitude l par la formule - FCOR = 2w sin(l) , w etant la vitesse de rotation de la terre. - w = 7.2921 10-5 rad/s -Les composantes de la force de Coriolis sont alors : - FU = FCOR x V - FV = - FCOR x U""", - ang = """Sets the value of the Coriolis force coefficient, in cartesian -coordinates. -This coefficient, denoted FCOR in the code, should be equal to -2 w sin(l)d where w denotes the earth angular speed of rotation -and l the latitude. w = 7.27 10-5 rad/sec -The Coriolis force components are then: -FU = FCOR x V, -FV = -FCOR x U -In spherical coordinates, the latitudes are known""", - ), - ), -# ----------------------------------- - TSUNAMI = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - OPTION_FOR_TSUNAMI_GENERATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["No Tsunami","Tsunami generated on the basis of the Okada model 1992"], - defaut = "No Tsunami", - fr = """""", - ang = """""", - ), -# ----------------------------------- - PHYSICAL_CHARACTERISTICS_OF_THE_TSUNAMI = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min=10, max=10, - defaut = [100.,210000.,75000.,13.6,81.,41.,110.,0.,0.,3.], - fr = """""", - ang = """""", - ), - ), -# ----------------------------------- - SECONDARY_CURRENTS_INFO = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - SECONDARY_CURRENTS = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Pour prendre en compte les courants secondaires""", - ang = """Using the parametrisation for secondary currents""", - ), -# ----------------------------------- - b_SECONDARY_CURRENTSG = BLOC(condition="SECONDARY_CURRENTS == True", -# ----------------------------------- -# ----------------------------------- - PRODUCTION_COEFFICIENT_FOR_SECONDARY_CURRENTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 7.071, - fr = """Une constante dans les termes de creation de Omega""", - ang = """A constant in the production terms of Omega""", - ), -# ----------------------------------- - DISSIPATION_COEFFICIENT_FOR_SECONDARY_CURRENTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 5.E-1, - fr = """Coefficient de dissipation de Omega""", - ang = """Coefficient of dissipation term of Omega""", - ), - ), - ), - ), -) -# ----------------------------------------------------------------------- -GENERAL_PARAMETERS = PROC(nom= "GENERAL_PARAMETERS",op = None, -# ----------------------------------------------------------------------- - UIinfo = {"groupes": ("CACHE")}, -# ----------------------------------- - DEBUGGER = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Pour imprimer la sequence des appels, mettre 1""", - ang = """If 1, calls of subroutines will be printed in the listing""", - ), -# ----------------------------------- - TIME = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - TIME_STEP = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1., - fr = """Definit le pas de temps en secondes. Remarque : Pour une bonne -precision; il est souhaitable de choisir le pas de temps de telle sorte -que le nombre de Courant de propagation soit inferieur a 2 ; voir 3. -Ceci peut etre realisable en hydraulique fluviale ; mais ne l''est -pratiquement jamais en hydraulique maritime ou l''on peut atteindre des -valeurs de 50.""", - ang = """Specifies the time step in seconds.""", - ), -# ----------------------------------- - NUMBER_OF_TIME_STEPS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """ Definit le nombre de pas de temps effectues lors de l''execution du -code.""", - ang = """ Specifies the number of time steps performed when running the code.""", - ), -# ----------------------------------- - DURATION = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Duree de la simulation. alternative au parametre nombre de pas -de temps. On en deduit le nombre de pas de temps en prenant l''entier le - plus proche de (duree du calcul/pas de temps). Si le nombre de pas de -temps est aussi donne, on prend la plus grande valeur""", - ang = """Duration of simulation. May be used instead of the parameter -NUMBER OF TIME STEPS. The nearest integer to (duration/time step) is -taken. -If NUMBER OF TIME STEPS is also given, the greater value is taken""", - ), -# ----------------------------------- - ORIGINAL_DATE_OF_TIME = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', min= 3, max= 3, - defaut = [1900,1,1], - fr = """Permet de fixer la date d''origine des temps du modele lors -de la prise en compte de la force generatrice de la maree.""", - ang = """Give the date of the time origin of the model when taking into -account the tide generating force.""", - ), -# ----------------------------------- - ORIGINAL_HOUR_OF_TIME = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', min= 3, max= 3, - defaut = [0,0,0], - fr = """ Permet de fixer l''heure d''origine des temps du modele lors de la -prise en compte de la force generatrice de la maree.""", - ang = """ Give the time of the time origin of the model when taking into account -of the tide generator force.""", - ), -# ----------------------------------- - STOP_IF_A_STEADY_STATE_IS_REACHED = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """A UTILISER AVEC LE MOT-CLE : CRITERES D''ARRET""", - ang = """TO BE USED WITH THE KEY-WORD: STOP CRITERIA""", - ), -# ----------------------------------- - b_STOP_IF_A_STEADY_STATE_IS_REACHEDG = BLOC(condition="STOP_IF_A_STEADY_STATE_IS_REACHED == True", -# ----------------------------------- -# ----------------------------------- - STOP_CRITERIA = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min= 3, max= 3, - defaut = [1.E-4,1.E-4,1.E-4], - fr = """Criteres d''arret pour un ecoulement permanent -ces coefficients sont respectivement appliques a - 1) U et V - 2) H - 3) T -A utiliser avec le mot-cle : ARRET SI UN ETAT PERMANENT EST ATTEINT""", - ang = """Stop criteria for a steady state -These coefficients are applied respectively to - 1) U and V - 2) H - 3) T -To be used with the key-word: STOP IF A STEADY STATE IS REACHED""", - ), - ), -# ----------------------------------- - CONTROL_OF_LIMITS = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Utiliser avec le mot-cle : valeurs limites, le programme -s''arrete si les limites sur u,v,h ou t sont depassees""", - ang = """Use with the key-word : limit values, -the program is stopped if -the limits on u,v,h, or t are trespassed""", - ), -# ----------------------------------- - b_CONTROL_OF_LIMITSG = BLOC(condition="CONTROL_OF_LIMITS == True", -# ----------------------------------- -# ----------------------------------- - LIMIT_VALUES = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min= 8, max= 8, - defaut = [-1000.,9000.,-1000.,1000.,-1000.,1000.,-1000.,1000.], - fr = """Utilise avec le mot-cle CONTROLE DES LIMITES - valeurs mini et maxi acceptables pour H,U,V et T dans l''ordre - suivant : min(H) max(H) min(U) max(U) - min(V) max(V) min(T) max(T)""", - ang = """To be used with the key-word CONTROL OF LIMITS - min and max acceptable values for H,U,V et T in the following - order : min(H) max(H) min(U) max(U) - min(V) max(V) min(T) max(T)""", - ), - ), -# ----------------------------------- - VARIABLE_TIME_STEP = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """ Pas de temps variable pour avoir un nombre de courant souhaite""", - ang = """ Variable time-step to get a given Courant number""", - ), -# ----------------------------------- - b_VARIABLE_TIME_STEPG = BLOC(condition="VARIABLE_TIME_STEP == True", -# ----------------------------------- -# ----------------------------------- - DESIRED_COURANT_NUMBER = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1., - fr = """Nombre de Courant souhaite en cas de pas de temps variable""", - ang = """Desired Courant number when VARIABLE TIME-STEP is set to YES""", - ), - ), - ), -# ----------------------------------- - LOCATION = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - ORIGIN_COORDINATES = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', min= 2, max= 2, - defaut = [0,0], - fr = """Valeur en metres, utilise -pour eviter les trops grands nombres, transmis -dans le format Selafin mais pas d''autre traitement pour l''instant""", - ang = """Value in metres, used to avoid large real numbers, -added in Selafin format, but so far no other treatment""", - ), -# ----------------------------------- - SPHERICAL_COORDINATES = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Choix des coordonnees spheriques pour la realisation du calcul -( pour les grands domaines de calcul). -Attention : cette option est etroitement liee au -maillage qui doit avoir -ete saisi sur une carte marine en projection de Mercator. -Il faut de plus relever sur la carte la LATITUDE DU POINT ORIGINE -(autre mot-cle) qui correspond dans le maillage a l''ordonnee y = 0.""", - ang = """Selection of spherical coordinates to perform the computation -(for large computation domains). -Warning: this option is closely related to the mesh that should have -been entered onto a nautical chart drawn as per Mercator projection -The LATITUDE OF ORIGIN POINT (another keyword), which corresponds to -ordinate y=0 in the mesh, must moreover be given.""", - ), -# ----------------------------------- - b_SPHERICAL_COORDINATESG = BLOC(condition="SPHERICAL_COORDINATES == True", -# ----------------------------------- -# ----------------------------------- - LATITUDE_OF_ORIGIN_POINT = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 48., - fr = """Determine l''origine utilisee pour le calcul de latitudes -lorsque l''on effectue un calcul en coordonnees spheriques.""", - ang = """Determines the origin used for computing latitudes when -a computation is made in spherical coordinates. -this latitude is in particular used to compute the Coriolis force. -In cartesian coordinates, Coriolis coefficient is considered constant.""", - ), - ), -# ----------------------------------- - LONGITUDE_OF_ORIGIN_POINT = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Fixe la valeur de la longitude du point origine du modele, -lors de l''utilisation de la force generatrice de la maree.""", - ang = """Give the value of the longitude of the origin point -of the model, when taking into account of the tide generator force.""", - ), -# ----------------------------------- - NORTH = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Direction du nord en degres, par rapport a l''axe des y -dans le sens trigonometrique. Notation decimale 10.5 signifie 10 degres - et trente minutes.""", - ang = """Angle of the North with the y axis, in degrees. 10.5 means -10 degrees and 30 minutes.""", - ), -# ----------------------------------- - SPATIAL_PROJECTION_TYPE = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["CARTESIAN, NOT GEOREFERENCED","MERCATOR","LATITUDE LONGITUDE"], - defaut = "CARTESIAN, NOT GEOREFERENCED", - fr = """Option 2 ou 3 obligatoire pour les coordonnees spheriques -Option 3 : latitude et longitude en degres !""", - ang = """Option 2 or 3 mandatory for spherical coordinates -Option 3: latitude and longitude in degrees!""", - ), - ), -) -# ----------------------------------------------------------------------- -NUMERICAL_PARAMETERS = PROC(nom= "NUMERICAL_PARAMETERS",op = None, -# ----------------------------------------------------------------------- - UIinfo = {"groupes": ("CACHE")}, -# ----------------------------------- - SOLVER_INFO = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - SOLVER = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["conjugate gradient on a normal equation","conjugate gradient","conjugate residual","minimum error","cgstab","gmres","direct"], - defaut = "conjugate gradient on a normal equation", - fr = """Permet de choisir le solveur utilise pour la resolution de -l''etape de propagation. Toutes les methodes proposees actuellement -s''apparentent au Gradient Conjugue. Ce sont : - 1 : gradient conjugue - 2 : residu conjugue - 3 : gradient conjugue sur equation normale - 4 : erreur minimale - 5 : gradient conjugue carre (non programme) - 6 : gradient conjugue carre stabilise (cgstab) - 7 : gmres (voir aussi option du solveur) - 8 : direct""", - ang = """Makes it possible to select the solver used for solving the -propagation step. All the currently available methods are variations -of the Conjugate Gradient method. They are as follows: -1: conjugate gradient -2: conjugate residual -3: conjugate gradient on a normal equation -4: minimum error -5: conjugate gradient squared (not implemented) -6: conjugate gradient squared stabilised (cgstab) -7: gmres (see option for solver) -8: direct""", - ), -# ----------------------------------- - b_SOLVERG = BLOC(condition="SOLVER == 'gmres'", -# ----------------------------------- -# ----------------------------------- - SOLVER_OPTION = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 2, - fr = """si le solveur est GMRES (7) le mot cle est la dimension de -l''espace de KRYLOV (valeurs conseillees entre 2 et 15)""", - ang = """WHEN GMRES (7) IS CHOSEN, DIMENSION OF THE KRYLOV SPACE -TRY VALUES BETWEEN 2 AND 15""", - ), - ), -# ----------------------------------- - SOLVER_ACCURACY = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1.E-4, - fr = """Precision demandee pour la resolution de l''etape de propagation - (cf. Note de principe).""", - ang = """Required accuracy for solving the propagation step -(refer to Principle note).""", - ), -# ----------------------------------- - MAXIMUM_NUMBER_OF_ITERATIONS_FOR_SOLVER = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 100, - fr = """Les algorithmes utilises pour la resolution de l''etape de -propagation etant iteratifs; il est necessaire de limiter le nombre -d''iterations autorisees. -Remarque : un maximum de 40 iterations par pas de temps semble -raisonnable.""", - ang = """Since the algorithms used for solving the propagation step are -iterative, the allowed number of iterations should be limited. -NOTE: a maximum number of 40 iterations per time step seems to be -reasonable.""", - ), -# ----------------------------------- - CONTINUITY_CORRECTION = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Corrige les vitesses sur les points avec hauteur imposee ou -l''equation de continuite n''a pas ete resolue""", - ang = """Correction of the velocities on points with a prescribed -elevation, where the continuity equation has not been solved""", - ), -# ----------------------------------- - PRECONDITIONING = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["diagonal","no preconditioning","block-diagonal (4-9 matrices)","absolute value of diagonal","crout","gauss-seidel","diagonal and crout"], - defaut = "diagonal", - fr = """Permet de preconditionner le systeme de l''etape de propagation -afin d''accelerer la convergence lors de sa resolution. - - 0 : pas de preconditionnement; - - 2 : preconditionnement diagonal. - - 3 : preconditionnement diagonal-bloc - - 7 : preconditionnement de Crout par element ou segment - -11 : preconditionnement de Gauss-Seidel par element ou segment -Certains preconditionnements sont cumulables -(les diagonaux 2 ou 3 avec les autres) -Pour cette raison on ne retient que les nombres premiers pour -designer les preconditionnements. Si l''on souhaite en cumuler -plusieurs on formera le produit des options correspondantes.""", - ang = """Choice of the preconditioning in the propagation step linear -system that the convergence is speeded up when it is being solved. - 0: no preconditioning - 2: diagonal preconditioning - 3: block-diagonal preconditioning (systemes a 4 ou 9 matrices) - 7: Crout''s preconditioning per element or segment -11: Gauss-Seidel''s preconditioning per element or segment -Some operations (either 2 or 3 diagonal preconditioning) can be -performed concurrently with the others. -Only prime numbers are therefore kept to denote the preconditioning -operations. When several of them are to be performed concurrently, -the product of relevant options shall be made.""", - ), -# ----------------------------------- - C_U_PRECONDITIONING = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Changement de variable de H en C dans le systeme lineaire final""", - ang = """Change of variable from H to C in the final linear system""", - ), - ), -# ----------------------------------- - DISCRETISATIONS_IMPLICITATION = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - IMPLICITATION_FOR_DEPTH = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.55, - fr = """Fixe la valeur du coefficient d''implicitation sur C dans l''etape de -propagation (cf. Note de principe). Les valeurs inferieures a 0.5 -donnent un schema instable.""", - ang = """Sets the value of the implicitation coefficient for C (the celerity of -waves) in the propagation step (refer to principle note). Values below -0.5 result in an unstable scheme.""", - ), -# ----------------------------------- - IMPLICITATION_FOR_VELOCITY = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.55, - fr = """Fixe la valeur du coefficient d''implicitation sur la vitesse dans -l''etape de propagation (cf. Note de principe). Les valeurs inferieures -a 0.5 donnent un schema instable.""", - ang = """Sets the value of the implicitation coefficient for velocity in the -propagation step (refer to principle note). Values below 0.5 result in -an unstable condition.""", - ), -# ----------------------------------- - DISCRETIZATIONS_IN_SPACE = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', max='**', - into = ["linear","quasi-bubble","quadratic"], - defaut = ["linear","linear","linear","linear"], - fr = """ Choix de la discretisation pour chaque variable ces coefficients sont -respectivement appliques a 1) U et V 2) H 3) T 4) K ET EPSILON (NON -PROGRAMME) 11 : lineaire 12 : quasi-bulle 13 : quadratique""", - ang = """ Choice of space discretisation for every variable These coefficients -are applied respectively to 1) U and V 2) H 3) T 4) K and EPSILON (NOT -IMPLEMENTED) 11: linear 12: quasi-bubble 13: quadratic""", - ), -# ----------------------------------- - b_DISCRETIZATIONS_IN_SPACEG = BLOC(condition="DISCRETIZATIONS_IN_SPACE != None", -# ----------------------------------- -# ----------------------------------- - Consigne = SIMP(statut ="o", homo="information", typ="TXM", -# ----------------------------------- - defaut = "Choice of space discretisation for every variable. These coefficients are applied respectively to 1) U and V 2) H 3) T 4) K and EPSILON"), - ), - ), -# ----------------------------------- - PROPAGATION_INFO = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - PROPAGATION = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Prise en compte ou non de la propagation de la vitesse et de la -hauteur d''eau. -La diffusion etant contenue dans cette etape sera supprimee aussi.""", - ang = """Determines whether the propagation step is taken into account -or not. -The diffusion being included in that step will be deleted as well.""", - ), -# ----------------------------------- - b_PROPAGATIONG = BLOC(condition="PROPAGATION == True", -# ----------------------------------- -# ----------------------------------- - MEAN_DEPTH_FOR_LINEARIZATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Fixe la hauteur d''eau autour de laquelle s''effectue la -linearisation lorsque l''option PROPAGATION LINEARISEE est choisie.""", - ang = """Sets the water depth about which the linearization is made -when the LINEARIZED PROPAGATION OPTION is selected.""", - ), -# ----------------------------------- - INITIAL_GUESS_FOR_U = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["zero","previous","extrapolation"], - defaut = "previous", - fr = """Tir initial du solveur de l''etape de propagation. -Offre la possibilite de modifier la valeur initiale de U, a chaque -iteration, dans l''etape de propagation en utilisant les valeurs -finales de cette variable aux pas de temps precedents. Ceci peut -permettre d''accelerer la vitesse de convergence lors de la resolution -du systeme. Trois possibilites sont offertes : - 0 : U = 0 - 1 : U = U(n) - 2 : U = 2 U(n)- U(n-1) (extrapolation)""", - ang = """Initial guess for the solver in the propagation step. -Makes it possible to modify the initial value of U, upon each -iteration in the propagation step, by using the ultimate values this -variable had in the earlier time steps. Thus, the convergence can be -speeded up when the system is being solved. 3 options are available: - 0 : U = 0 - 1 : U = U(n) - 2 : U = 2 U(n)- U(n-1) (extrapolation)""", - ), - ), -# ----------------------------------- - INITIAL_GUESS_FOR_H = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["previous","zero","extrapolation"], - defaut = "previous", - fr = """ Tir initial du solveur de l''etape de propagation. Offre la -possibilite de modifier la valeur initiale de DH, accroissement de H, a -chaque iteration, dans l''etape de propagation en utilisant les valeurs -finales de cette variable aux pas de temps precedents. Ceci peut -permettre d''accelerer la vitesse de convergence lors de la resolution -du systeme. Trois possibilites sont offertes : - 0 : DH = 0. - 1 : DH = DHn (valeur finale de DH au pas de temps precedent), - 2 : DH = 2DHn - DHn-1 (extrapolation).""", - ang = """Initial guess for the solver in the propagation step. -Makes it possible to modify the initial value of C, upon each -iteration in the propagation step, by using the ultimate values this -variable had in the earlier time steps. Thus, the convergence can be -speeded up when the system is being solved. 3 options are available: - 0: DH = 0 - 1: DH = DHn (ultimate DH value in the next previous time step) - 2: DH = 2DHn - DHn-1 (extrapolation)""", - ), -# ----------------------------------- - LINEARIZED_PROPAGATION = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Permet de lineariser l''etape de propagation; -par exemple lors de la realisation de cas tests -pour lesquels on dispose -d''une solution analytique dans le cas linearise.""", - ang = """Provided for linearizing the propagation step, e.g. when -performing test-cases for which an analytical -solution in the linearized -case is available.""", - ), - ), -# ----------------------------------- - ADVECTION_INFO = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - ADVECTION = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Prise en compte ou non des termes de convection. -En cas de reponse positive; -on peut encore supprimer certains termes de convection avec -les mots-cles CONVECTION DE ...""", - ang = """Are the advection terms taken into account or not? -If YES, some advection terms can still be deleted using the keywords --ADVECTION OF ..-""", - ), -# ----------------------------------- - ADVECTION_OF_H = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Prise en compte ou non de la convection de H. -Il s''agit en fait dans la version 2.0 de la convection de C""", - ang = """The advection of H is taken into account or ignored. -Actually, in version 2.0, the matter is about C advection.""", - ), -# ----------------------------------- - ADVECTION_OF_U_AND_V = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Prise en compte ou non de la convection de U et V.""", - ang = """The advection of U and V is taken into account or ignored.""", - ), -# ----------------------------------- - b_ADVECTION_OF_U_AND_VG = BLOC(condition="ADVECTION_OF_U_AND_V == True", -# ----------------------------------- -# ----------------------------------- - SCHEME_FOR_ADVECTION_OF_VELOCITIES = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["NO ADVECTION","CHARACTERISTICS","EXPLICIT + SUPG","EXPLICIT LEO POSTMA","EXPLICIT + MURD SCHEME N","EXPLICIT + MURD SCHEME PSI","N-SCHEME FOR TIDAL FLATS","N-SCHEME FOR TIDAL FLATS","ERIA SCHEME"], - defaut = "CHARACTERISTICS", - fr = """Choix du schema de convection pour les vitesses, -remplace FORME DE LA CONVECTION""", - ang = """Choice of the advection scheme for the velocities, -replaces TYPE OF ADVECTION""", - ), - ), -# ----------------------------------- - TYPE_OF_ADVECTION = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', max='**', - into = ["CHARACTERISTICS","SUPG","CONSERVATIVE N-SCHEME LP","CONSERVATIVE N-SCHEME","CONSERVATIVE PSI-SCHEME","EDGE-BASED N-SCHEME LP","EDGE-BASED N-SCHEME","ERIA SCHEME"], - defaut = ["CHARACTERISTICS","CONSERVATIVE PSI-SCHEME","CHARACTERISTICS","CHARACTERISTICS"], - fr = """Choix du schema de convection pour chaque variable -ces coefficients sont respectivement appliques a -1) U et V 2) H 3) T 4) K ET EPSILON -1 : caracteristiques sur h -2 : SUPG -3 : Schema N conservatif -4 : Schema N conservatif -5 : Schema PSI conservatif -13 : Schema N par segment -14 : Schema N par segment -15 : Schema ERIA -Second integer must be 5""", - ang = """Choice of advection schemes for every variable -These coefficients are applied respectively to -1) U et V 2) H 3) T 4) K and EPSILON -1: characteristics -2: SUPG -3: Conservative N-scheme -4: Conservative N-scheme -5: Conservative PSI-scheme -13 : Edge-based N-scheme -14 : Edge-based N-scheme -15 : ERIA scheme -Second integer must be 5""", - ), -# ----------------------------------- - b_TYPE_OF_ADVECTIONG = BLOC(condition="TYPE_OF_ADVECTION != None", -# ----------------------------------- -# ----------------------------------- - Consigne = SIMP(statut ="o", homo="information", typ="TXM", -# ----------------------------------- - defaut = "Choice of space discretisation for every variable. These coefficients are applied respectively to 1) U and V 2) H 3) T 4) K and EPSILON"), - ), -# ----------------------------------- - OPTION_FOR_CHARACTERISTICS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["strong","weak"], - defaut = "strong", - fr = """1: forme forte 2: forme faible""", - ang = """1: strong form 2: weak form""", - ), -# ----------------------------------- - SUPG_OPTION = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', min=0, max='**', - defaut = [2,2,2,2], - fr = """0:pas de decentrement SUPG 1:SUPG classique 2:SUPG modifiee -ces coefficients sont respectivement appliques a -1) U et V 2) H 3) T 4) K ET EPSILON""", - ang = """0:no upwinding 1: classical SUPG 2:modified SUPG -These coefficients are applied respectively to -1) U et V 2) H 3) T 4) K and EPSILON""", - ), -# ----------------------------------- - NUMBER_OF_GAUSS_POINTS_FOR_WEAK_CHARACTERISTICS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 3, - fr = """Voir les release notes 6.3""", - ang = """See release notes 6.3""", - ), -# ----------------------------------- - MASS_LUMPING_FOR_WEAK_CHARACTERISTICS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Applique a la matrice de masse""", - ang = """To be applied to the mass matrix""", - ), -# ----------------------------------- - b_MAXIMUM_NUMBER_OF_ITERATIONS_FOR_ADVECTION_SCHEMESF = BLOC(condition="(ADVECTION_OF_TRACERS == True and SCHEME_FOR_ADVECTION_OF_TRACERS == 'EDGE-BASED N-SCHEME') or (ADVECTION_OF_K_AND_EPSILON == True and SCHEME_FOR_ADVECTION_OF_K_EPSILON == 'EDGE-BASED N-SCHEME') or (ADVECTION_OF_U_AND_V == True and SCHEME_FOR_ADVECTION_OF_VELOCITIES == 'EDGE-BASED N-SCHEME')", -# ----------------------------------- - ), -# ----------------------------------- - MAXIMUM_NUMBER_OF_ITERATIONS_FOR_ADVECTION_SCHEMES = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 10, - fr = """Seulement pour schemes 13 et 14""", - ang = """Only for schemes 13 and 14""", - ), -# ----------------------------------- - UPWIND_COEFFICIENTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min= 4, max= 4, - defaut = [1.,1.,1.,1], - fr = """Coefficients utilises par la methode S.U.P.G. -ces coefficients sont respectivement appliques a - 1) U et V - 2) H ou C - 3) T - 4) K ET EPSILON""", - ang = """Upwind coefficients used by the S.U.P.G. method -These coefficients are applied respectively to - 1) U and V - 2) H or C - 3) T - 4) K and epsilon""", - ), -# ----------------------------------- - MASS_LUMPING_ON_H = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """TELEMAC offre la possibilite d''effectuer du mass-lumping -sur H ou U. -Ceci revient a ramener tout ou partie (suivant la valeur de ce -coefficient) des matrices AM1 (h) ou AM2 (U) et AM3 (V) sur -leur diagonale. -Cette technique permet d''accelerer le code dans des proportions tres -importantes et de le rendre egalement beaucoup plus stable. Cependant -les solutions obtenues se trouvent lissees. -Ce parametre fixe le taux de mass-lumping effectue sur h.""", - ang = """TELEMAC provides an opportunity to carry out mass-lumping -either on C,H or on the velocity. -This is equivalent to bringing the matrices AM1 (h) or AM2 (U) and -AM3 (V) wholly or partly, back onto their diagonal. -Thanks to that technique, the code can be speeded up to a quite -significant extent and it can also be made much more stable. The -resulting solutions, however, become artificially smoothed. -This parameter sets the extent of mass-lumping that is performed on h.""", - ), -# ----------------------------------- - MASS_LUMPING_ON_VELOCITY = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Fixe le taux de mass-lumping effectue sur la vitesse.""", - ang = """Sets the amount of mass-lumping that is performed on the velocity.""", - ), -# ----------------------------------- - SCHEME_OPTION_FOR_ADVECTION_OF_VELOCITIES = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Si present remplace et a priorite sur : -OPTION POUR LES CARACTERISTIQUES -OPTION DE SUPG -Si schema PSI ou N : 1=explicite 2=predicteur-correcteur -3=predicteur-correcteur deuxieme ordre en temps -4=implicite""", - ang = """If present replaces and has priority over: -OPTION FOR CHARACTERISTICS -SUPG OPTION -if N or PSI SCHEME: 1=explicit 2=predictor-corrector -3= predictor-corrector second-order in time 4= implicit""", - ), -# ----------------------------------- - FREE_SURFACE_GRADIENT_COMPATIBILITY = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1., - fr = """Des valeurs inferieures a 1 suppriment les oscillations -parasites""", - ang = """Values less than 1 suppress spurious oscillations""", - ), -# ----------------------------------- - NUMBER_OF_SUB_ITERATIONS_FOR_NON_LINEARITIES = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Permet de reactualiser, pour un meme pas de temps, les champs -convecteur et propagateur au cours de plusieurs sous-iterations. A la -premiere sous-iteration, ces champs sont donnes par C et le champ de -vitesses au pas de temps precedent. Aux iterations suivantes, ils sont -pris egaux au champ de vitesse obtenu a la fin de la sous-iteration -precedente. Cette technique permet d''ameliorer la prise en compte des -non linearites.""", - ang = """Used for updating, within one time step, the advection and -propagation field. -upon the first sub-iteration, these fields are given by -C and the velocity field in the previous time step. At subsequent -iterations, the results of the previous sub-iteration is used to -update the advection and propagation field. -The non-linearities can be taken into account through this technique.""", - ), -# ----------------------------------- - b_TREATMENT_OF_FLUXES_AT_THE_BOUNDARIESF = BLOC(condition="(ADVECTION_OF_TRACERS == True and SCHEME_FOR_ADVECTION_OF_TRACERS in ['EDGE-BASED N-SCHEME','SUPG','CONSERVATIVE N-SCHEME','CONSERVATIVE PSI-SCHEME']) or (ADVECTION_OF_K_AND_EPSILON == True and SCHEME_FOR_ADVECTION_OF_K_EPSILON in ['EDGE-BASED N-SCHEME','SUPG','CONSERVATIVE N-SCHEME','CONSERVATIVE PSI-SCHEME']) or (ADVECTION_OF_U_AND_V == True and SCHEME_FOR_ADVECTION_OF_VELOCITIES in ['EDGE-BASED N-SCHEME','SUPG','CONSERVATIVE N-SCHEME','CONSERVATIVE PSI-SCHEME'])", -# ----------------------------------- - ), -# ----------------------------------- - TREATMENT_OF_FLUXES_AT_THE_BOUNDARIES = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - into = ["Priority to prescribed values","Priority to fluxes"], - defaut = ["Priority to prescribed values","Priority to prescribed values"], - fr = """Utilise pour les schemas SUPG, PSI et N, avec option 2, on ne retrouve -pas exactement les valeurs imposees des traceurs, mais le flux est -correct""", - ang = """Used so far only with the SUPG, PSI and N schemes. With option 2, -Dirichlet prescribed values are not obeyed, but the fluxes are correct""", - ), -# ----------------------------------- - NUMBER_OF_CORRECTIONS_OF_DISTRIBUTIVE_SCHEMES = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = [1], - fr = """Pour les options avec predicteur-correcteur""", - ang = """For predictor-corrector options""", - ), -# ----------------------------------- - NUMBER_OF_SUB_STEPS_OF_DISTRIBUTIVE_SCHEMES = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """ Pour les options predicteur-correcteur avec schema localement -implicite""", - ang = """ Only for implicit scheme with predictor-corrector""", - ), -# ----------------------------------- - PSI_SCHEME_OPTION = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ["explicit","predictor-corrector"], - defaut = "explicit", - fr = """ 1: explicite 2: predicteur-correcteur""", - ang = """ 1: explicit 2: predictor-corrector""", - ), - ), -# ----------------------------------- - DIFFUSION = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - DIFFUSION_OF_VELOCITY = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Permet de decider si l''on prend ou non en compte la diffusion -des vitesses.""", - ang = """Makes it possible to decide whether the diffusion of velocity -(i.e. viscosity) is taken into account or not.""", - ), -# ----------------------------------- - b_DIFFUSION_OF_VELOCITYG = BLOC(condition="DIFFUSION_OF_VELOCITY == True", -# ----------------------------------- -# ----------------------------------- - IMPLICITATION_FOR_DIFFUSION_OF_VELOCITY = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1., - fr = """Fixe la valeur du coefficient d''implicitation sur les termes de -diffusion des vitesses""", - ang = """Sets the value of the implicitation coefficient for the diffusion of -velocity""", - ), -# ----------------------------------- - OPTION_FOR_THE_DIFFUSION_OF_VELOCITIES = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["div( nu grad(U) )","1/h div ( h nu grad(U)"], - defaut = "div( nu grad(U) )", - fr = """1: Diffusion de la forme div( nu grad(U) ) -2: Diffusion de la forme 1/h div ( h nu grad(U) )""", - ang = """1: Diffusion in the form div( nu grad(U) ) -2: Diffusion in the form 1/h div ( h nu grad(U) )""", - ), - ), - ), -# ----------------------------------- - AUTOMATIC_DIFFERENTIATION = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - AD_NUMBER_OF_DERIVATIVES = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Definit le nombre de derivees utilisateurs, dans le cadre -de la differentiation algorithmique.""", - ang = """Defines the number of user derivatives, within the framework -of the algorithmic differentiation.""", - ), -# ----------------------------------- - AD_NAMES_OF_DERIVATIVES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min= 2, max= 2, - fr = """Noms des differentiateurs utilisateurs en 32 caracteres, - 16 pour le nom, 16 pour l''unite""", - ang = """Name of user differentiators in 32 characters, - 16 for the name, 16 for the unit.""", - ), - ), -# ----------------------------------- - ADVANCED = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - MATRIX_STORAGE = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["classical EBE","Edge-based storage"], - defaut = "Edge-based storage", - fr = """1 : EBE classique 3 : Stockage par segments""", - ang = """1 : classical EBE 3 : Edge-based storage""", - ), -# ----------------------------------- - MATRIX_VECTOR_PRODUCT = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """1 : classique 2 : frontal -attention, avec 2, il faut une numerotation speciale des points""", - ang = """1 : classic 2 : frontal -beware, with option 2, a special numbering of points is required""", - ), -# ----------------------------------- - NEWMARK_TIME_INTEGRATION_COEFFICIENT = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1., - fr = """1. : Euler explicite 0.5 : ordre 2 en temps""", - ang = """1. : Euler explicit 0.5 : order 2 in time""", - ), -# ----------------------------------- - ZERO = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', - defaut = 1.E-10, - fr = """Non active pour l''instant.""", - ang = """Not yet implemented""", - ), -# ----------------------------------- - PROPAGATION_OPTION = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 3, - fr = """Non active pour l''instant.""", - ang = """Not yet implemented.""", - ), -# ----------------------------------- - OPTION_OF_THE_HYDROSTATIC_RECONSTRUCTION = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """donne l option de la reconstruction hydrostatique -(option utile uniquement pour les volumes finis): -1: option d Audusse, 2: option de Noelle""", - ang = """gives the option for hydrostatic reconstruction -(used only for finite volumes): -1: option of Audusse, 2: option of Noelle""", - ), - ), -) -# ----------------------------------------------------------------------- -TURBULENCE = PROC(nom= "TURBULENCE",op = None, -# ----------------------------------------------------------------------- - UIinfo = {"groupes": ("CACHE")}, -# ----------------------------------- - VELOCITY_DIFFUSIVITY = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1.E-6, - fr = """Fixe de facon uniforme pour l''ensemble du domaine; -la valeur du coefficient de diffusion de viscosite globale (dynamique + -turbulente). Cette valeur peut avoir une influence non negligeable sur -la forme et la taille des recirculations.""", - ang = """Sets, in an even way for the whole domain, the value of the -coefficient of global (dynamic+turbulent) viscosity. this value may -have a significant effect both on the shapes and sizes of -recirculation zones.""", - ), -# ----------------------------------- - TURBULENCE_MODEL = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["CONSTANT VISCOSITY","ELDER","K-EPSILON MODEL","SMAGORINSKI","MIXING LENGTH","SPALART-ALLMARAS"], - defaut = "CONSTANT VISCOSITY", - fr = """3 choix sont possibles actuellement : viscosite constante (1) -modele de Elder (2) ou modele k-epsilon (3). -Attention : si on choisit l''option 1 -il ne faut pas oublier d''ajuster la valeur du mot-cle COEFFICIENT DE -DIFFUSION DES VITESSES. -si on choisit l''option 2 -il ne faut pas oublier d''ajuster les deux valeurs du mot-cle : -COEFFICIENTS ADIMENSIONNELS DE DISPERSION -Si on choisit l''option 3; -ce meme parametre doit retrouver sa vraie valeur physique car elle est -utilisee comme telle dans le modele de turbulence""", - ang = """The current alternatives are as follows: constant viscosity (1) -elder''s model (2) or k-epsilon model (3). -NOTE: when option 1 is chosen, it should be kept in mind that the -value of the keyword VELOCITY DIFFUSIVITY has to be ajusted. -When option 2 is chosen, the two values of key-word : -NON-DIMENSIONAL DISPERSION COEFFICIENTS are used -When option 3 is chosen, this parameter should recover its true -physical value, since it is used as such in the turbulence model.""", - ), -# ----------------------------------- - b_TURBULENCE_MODELG = BLOC(condition="TURBULENCE_MODEL == 'CONSTANT VISCOSITY'", -# ----------------------------------- - ), -# ----------------------------------- - b_TURBULENCE_MODELH = BLOC(condition="TURBULENCE_MODEL == 'Elder'", -# ----------------------------------- -# ----------------------------------- - NON_DIMENSIONAL_DISPERSION_COEFFICIENTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min= 2, max= 2, - defaut = [6.,0.6], - fr = """Coefficients longitudinal et transversal dans la formule de -Elder. Utilises uniquement avec le modele de turbulence 2""", - ang = """Longitudinal and transversal coefficients in elder s formula. - Used only with turbulence model number 2""", - ), - ), -# ----------------------------------- - SOLVER_INFO = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - SOLVER_FOR_K_EPSILON_MODEL = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["conjugate gradient","conjugate residuals","conjugate gradient on normal equation","minimum error","conjugate gradient squared","conjugate gradient squared stabilised (cgstab)","gmres (see option for the solver for k-epsilon model)","direct"], - defaut = "conjugate gradient", - fr = """Permet de choisir le solveur utilise pour la resolution -du systeme du modele k-epsilon : -1 : gradient conjugue -2 : residu conjugue -3 : gradient conjugue sur equation normale -4 : erreur minimale -5 : gradient conjugue carre -6 : gradient conjugue carre stabilise (cgstab) -7 : gmres (voir aussi option du solveur pour le modele k-epsilon) -8 : direct""", - ang = """Makes it possible to select the solver used for solving -the system of the k-epsilon model. -1: conjugate gradient -2: conjugate residuals -3: conjugate gradient on normal equation -4: minimum error -5: conjugate gradient squared -6: conjugate gradient squared stabilised (cgstab) -7: gmres (see option for the solver for k-epsilon model) -8: direct""", - ), -# ----------------------------------- - OPTION_FOR_THE_SOLVER_FOR_K_EPSILON_MODEL = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 2, - fr = """si le solveur est GMRES (7) le mot cle est la dimension de -l''espace de KRILOV (valeurs conseillees entre 2 et 15)""", - ang = """WHEN GMRES (7) IS CHOSEN, DIMENSION OF THE KRYLOV SPACE -TRY VALUES BETWEEN 2 AND 15""", - ), -# ----------------------------------- - PRECONDITIONING_FOR_K_EPSILON_MODEL = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["diagonal","no preconditioning","crout","diagonal and crout"], - defaut = "diagonal", - fr = """Permet de preconditionner le systeme relatif au -modele k-epsilon -0 : pas de preconditionnement; -2 : preconditionnement diagonal. -7 : preconditionnement de Crout par element.""", - ang = """Preconditioning of the linear system in the diffusion step of -the k-epsilon model. -0: no preconditioning -2: diagonal preconditioning -7: Crout''s preconditioning per element""", - ), - ), -# ----------------------------------- - ADVANCED = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - TURBULENCE_REGIME_FOR_SOLID_BOUNDARIES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ["smooth","rough"], - defaut = "rough", - fr = """ Permet de choisir le regime de turbulence aux parois 1 : regime -turbulent lisse. 2 : regime turbulent rugueux.""", - ang = """ Provided for selecting the type of friction on the walls 1: smooth 2: -rough""", - ), -# ----------------------------------- - INFORMATION_ABOUT_K_EPSILON_MODEL = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Donne le nombre d''iterations du solveur de l''etape de -diffusion et termes sources du modele k-epsilon.""", - ang = """Gives the number of iterations of the solver in the diffusion -and source terms step of the k-epsilon model.""", - ), -# ----------------------------------- - ADVECTION_OF_K_AND_EPSILON = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Prise en compte ou non de la convection de k et epsilon.""", - ang = """The k and epsilon advection is taken into account or ignored.""", - ), -# ----------------------------------- - b_ADVECTION_OF_K_AND_EPSILONG = BLOC(condition="ADVECTION_OF_K_AND_EPSILON == True", -# ----------------------------------- -# ----------------------------------- - SCHEME_FOR_ADVECTION_OF_K_EPSILON = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ["NO ADVECTION","CHARACTERISTICS","EXPLICIT + SUPG","EXPLICIT LEO POSTMA","EXPLICIT + MURD SCHEME N","EXPLICIT + MURD SCHEME PSI","LEO POSTMA FOR TIDAL FLATS","N-SCHEME FOR TIDAL FLATS","ERIA SCHEME FOR TIDAL FLATS"], - defaut = "CHARACTERISTICS", - fr = """Choix du schema de convection pour k et epsilon, -remplace FORME DE LA CONVECTION""", - ang = """Choice of the advection scheme for k and epsilon, -replaces TYPE OF ADVECTION""", - ), - ), -# ----------------------------------- - SCHEME_OPTION_FOR_ADVECTION_OF_K_EPSILON = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Si present remplace et a priorite sur : -OPTION POUR LES CARACTERISTIQUES -OPTION DE SUPG -Si schema PSI ou N : 1=explicite 2=predicteur-correcteur -3=predicteur-correcteur deuxieme ordre en temps -4=implicite""", - ang = """If present replaces and has priority over: -OPTION FOR CHARACTERISTICS -SUPG OPTION -if N or PSI SCHEME: 1=explicit 2=predictor-corrector -3= predictor-corrector second-order in time 4= implicit""", - ), -# ----------------------------------- - TIME_STEP_REDUCTION_FOR_K_EPSILON_MODEL = SIMP(statut ='f', -# ----------------------------------- - typ = 'R', - defaut = 1., - fr = """Coefficient reducteur du pas de temps pour le modele k-epsilon (qui -est normalement identique a celui du systeme hydrodynamique). -Utilisation deconseillee""", - ang = """Time step reduction coefficient for k-epsilon model (which is normally -same the same as that of the hydrodynamic system) Not recommended for -use.""", - ), - ), -# ----------------------------------- - ACCURACY = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - ACCURACY_OF_K = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1.E-9, - fr = """Fixe la precision demandee sur k pour le test d''arret dans -l''etape de diffusion et termes sources du modele k-epsilon.""", - ang = """Sets the required accuracy for computing k in the diffusion -and source terms step of the k-epsilon model.""", - ), -# ----------------------------------- - ACCURACY_OF_EPSILON = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1.E-9, - fr = """Fixe la precision demandee sur epsilon pour le test d''arret -dans l''etape de diffusion et termes sources de k et epsilon.""", - ang = """Sets the required accuracy for computing epsilon in -the diffusion and source-terms step of the k-epsilon model.""", - ), -# ----------------------------------- - MAXIMUM_NUMBER_OF_ITERATIONS_FOR_K_AND_EPSILON = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 50, - fr = """Fixe le nombre maximum d''iterations accepte lors de la -resolution du systeme diffusion-termes sources du modele k-epsilon.""", - ang = """Sets the maximum number of iterations that are acceptable when -solving the diffusion source-terms step of the k-epsilon model.""", - ), - ), -) -# ----------------------------------------------------------------------- -TIDAL_FLATS_INFO = PROC(nom= "TIDAL_FLATS_INFO",op = None, -# ----------------------------------------------------------------------- -# ----------------------------------- - TIDAL_FLATS = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """permet de supprimer les tests sur les bancs decouvrants, dans -les cas ou l''on est certain qu''il n''y en aura pas. -En cas de doute : oui""", - ang = """When no, the specific -treatments for tidal flats are by-passed. -This spares time, but of course you must be sure that you have no -tidal flats""", - ), -# ----------------------------------- - b_TIDAL_FLATSG = BLOC(condition="TIDAL_FLATS == True", -# ----------------------------------- -# ----------------------------------- - OPTION_FOR_THE_TREATMENT_OF_TIDAL_FLATS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["EQUATIONS SOLVED EVERYWHERE WITH CORRECTION ON TIDAL FLATS","DRY ELEMENTS FROZEN","LIKE 1 BUT WITH POROSITY (DEFINA METHOD)"], - defaut = "EQUATIONS SOLVED EVERYWHERE WITH CORRECTION ON TIDAL FLATS", - fr = """Utilise si BANCS DECOUVRANTS est vrai -1 : EQUATIONS RESOLUES PARTOUT AVEC -CORRECTION SUR LES BANCS DECOUVRANTS -2 : GEL DES ELEMENTS DECOUVRANTS -3 : COMME 1 MAIS AVEC POROSITE (METHODE DEFINA)""", - ang = """Used if TIDAL FLATS is true -1 : EQUATIONS SOLVED EVERYWHERE WITH CORRECTION ON TIDAL FLATS -2 : DRY ELEMENTS FROZEN -3 : LIKE 1 BUT WITH POROSITY (DEFINA METHOD)""", - ), -# ----------------------------------- - b_OPTION_FOR_THE_TREATMENT_OF_TIDAL_FLATSG = BLOC(condition="OPTION_FOR_THE_TREATMENT_OF_TIDAL_FLATS == 'EQUATIONS SOLVED EVERYWHERE WITH CORRECTION ON TIDAL FLATS'", -# ----------------------------------- -# ----------------------------------- - TREATMENT_OF_NEGATIVE_DEPTHS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["SMOOTHING","FLUX CONTROL","FLUX CONTROL (ERIA)"], - defaut = "SMOOTHING", - fr = """Seulement avec OPTION DE TRAITEMENT DES BANCS DECOUVRANTS = 1 - 0 : pas de traitement - 1 : lissage - 2 : limitation des flux, approche par segment - 3 : limitation des flux, approche par triangle""", - ang = """Only with OPTION FOR THE TREATMENT OF TIDAL FLATS=1 - 0:no treatment - 1:smoothing - 2:flux control, by segment - 3:flux control, by element""", - ), - ), -# ----------------------------------- - THRESHOLD_FOR_NEGATIVE_DEPTHS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """En dessous du seuil, les hauteurs negatives sont lissees""", - ang = """Below the threshold the negative depths are smoothed""", - ), -# ----------------------------------- - THRESHOLD_DEPTH_FOR_RECEDING_PROCEDURE = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Si > 0., declenche la procedure de ressuyage qui evite le -franchissement parasite des digues mal discretisees""", - ang = """If > 0., will trigger the receding procedure that avoids overwhelming -of dykes which are too loosely discretised""", - ), -# ----------------------------------- - H_CLIPPING = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Determine si l''on desire ou non limiter par valeur inferieure -la hauteur d''eau H (dans le cas des bancs decouvrants par exemple).""", - ang = """Determines whether limiting the water depth H by a lower value -desirable or not. (for instance in the case of tidal flats) -This key-word may have an influence on mass conservation since -the truncation of depth is equivalent to adding mass.""", - ), -# ----------------------------------- - b_H_CLIPPINGG = BLOC(condition="H_CLIPPING == True", -# ----------------------------------- -# ----------------------------------- - MINIMUM_VALUE_OF_DEPTH = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Fixe la valeur minimale de a lorsque l''option CLIPPING DE H est -activee.""", - ang = """Sets the minimum H value when option H CLIPPING is implemented. Not -fully implemented.""", - ), - ), - ), -) -# ----------------------------------------------------------------------- -TRACERS = PROC(nom= "TRACERS",op = None, -# ----------------------------------------------------------------------- -# ----------------------------------- - BOUNDARY_CONDITIONS_FOR_TRACERS = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - PRESCRIBED_TRACERS_VALUES = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', max='**', - fr = """Valeurs du traceur imposees aux frontieres liquides entrantes. -Lire la partie du mode d''emploi consacree aux conditions aux limites""", - ang = """Tracer values prescribed at the inflow boundaries. -Read the usermanual section dealing with the boundary conditions""", - ), - ), -# ----------------------------------- - SETTING = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - NUMBER_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Definit le nombre de traceurs.""", - ang = """Defines the number of tracers""", - ), -# ----------------------------------- - NAMES_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - fr = """Noms des traceurs en 32 caracteres, 16 pour le nom 16 pour l''unite""", - ang = """Name of tracers in 32 characters, 16 for the name, 16 for the unit.""", - ), -# ----------------------------------- - INITIAL_VALUES_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min=0, max='**', - defaut = [0.,0.], - fr = """Fixe la valeur initiale du traceur.""", - ang = """Sets the initial value of the tracer.""", - ), -# ----------------------------------- - DENSITY_EFFECTS = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """PRISE EN COMPTE DU GRADIENT HORIZONTAL DE DENSITE - LE TRACEUR EST ALORS LA SALINITE""", - ang = """THE HORIZONTAL GRADIENT OF DENSITY IS TAKEN INTO ACCOUNT - THE TRACER IS THEN THE SALINITY""", - ), -# ----------------------------------- - b_DENSITY_EFFECTSG = BLOC(condition="DENSITY_EFFECTS == True", -# ----------------------------------- -# ----------------------------------- - MEAN_TEMPERATURE = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 20., - fr = """TEMPERATURE DE REFERENCE POUR LE CALCUL DES EFFETS DE DENSITE -A UTILISER AVEC LE MOT-CLE EFFETS DE DENSITE""", - ang = """REFERENCE TEMPERATURE FOR DENSITY EFFECTS -TO BE USED WITH THE KEY-WORD DENSITY EFFECTS""", - ), - ), -# ----------------------------------- - b_DENSITY_EFFECTSH = BLOC(condition="DENSITY_EFFECTS == True", -# ----------------------------------- -# ----------------------------------- - Consigne = SIMP(statut ="o", homo="information", typ="TXM", -# ----------------------------------- - defaut = "The first tracer must be the salinity in kg/m3"), - ), - ), -# ----------------------------------- - SOLVER_TRA = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - SOLVER_FOR_DIFFUSION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - into = ["conjugate gradient","conjugate residual","conjugate gradient on a normal equation","minimum error","squared conjugate gradient","cgstab","gmres (see option for the solver for tracer diffusion)","direct"], - defaut = ["conjugate gradient","conjugate gradient"], - fr = """ 1 : gradient conjugue 2 : residu conjugue 3 : gradient conjugue sur -equation normale 4 : erreur minimale 5 : gradient conjugue carre""", - ang = """ 1 : conjugate gradient 2 : conjugate gradient 3 : conjugate gradient -on a normal equation 4 : minimum error 5 : squared conjugate gradient 6 -: cgstab 7 : gmres (see option for the solver for tracer diffusion) 8 : -direct""", - ), -# ----------------------------------- - SOLVER_OPTION_FOR_TRACERS_DIFFUSION = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', min=0, max='**', - defaut = [2], - fr = """si le solveur est GMRES (7) le mot cle est la dimension de -l''espace de KRILOV (valeurs conseillees entre 2 et 15)""", - ang = """WHEN GMRES (7) IS CHOSEN, DIMENSION OF THE KRYLOV SPACE -TRY VALUES BETWEEN 2 AND 15""", - ), -# ----------------------------------- - PRECONDITIONING_FOR_DIFFUSION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - into = ["no preconditioning ","diagonal","crout","diagonal and crout"], - defaut = ["diagonal"], - fr = """Permet de preconditionner le systeme relatif au traceur. -Memes definition et possibilites que pour le mot-cle -PRECONDITIONNEMENT. - 0 : pas de preconditionnement; - 2 : preconditionnement diagonal. - 7 : Crout par element""", - ang = """Preconditioning of the linear system in the tracer diffusion -step. -Same definition and possibilities as for the keyword PRECONDITIONING - 0: no preconditioning - 2: diagonal preconditioning - 7: Crout''s preconditioning per element.""", - ), - ), -# ----------------------------------- - ACCURACY_TRA = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - ACCURACY_FOR_DIFFUSION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1.E-6, - fr = """Fixe la precision demandee pour le calcul de la diffusion -du traceur.""", - ang = """Sets the required accuracy for computing the tracer -diffusion.""", - ), -# ----------------------------------- - MAXIMUM_NUMBER_OF_ITERATIONS_FOR_DIFFUSION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 60, - fr = """ Limite le nombre d''iterations du solveur a chaque pas de temps pour -le calcul de la diffusion du traceur.""", - ang = """Limits the number of solver iterations at each time step for -the diffusion of tracer.""", - ), - ), -# ----------------------------------- - SOURCES_TRA = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - VALUES_OF_THE_TRACERS_AT_THE_SOURCES = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """Valeurs des traceurs a chacune des sources""", - ang = """Values of the tracers at the sources""", - ), - ), -# ----------------------------------- - METEOROLOGY_TRA = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - VALUES_OF_TRACERS_IN_THE_RAIN = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """generalement ce traceur est la temperature, dans ce cas -cette valeur est a modifier, sinon la valeur 0 est raisonnable""", - ang = """most often, this tracer is temperature, in this case -this value should be modified, otherwise, default value of 0 seems -reasonable""", - ), - ), -# ----------------------------------- - NUMERICAL = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - ADVECTION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Prise en compte ou non de la convection du traceur passif.""", - ang = """The advection of the passive tracer is taken into account -or ignored.""", - ), -# ----------------------------------- - b_ADVECTION_OF_TRACERSG = BLOC(condition="ADVECTION_OF_TRACERS == True", -# ----------------------------------- -# ----------------------------------- - SCHEME_FOR_ADVECTION_OF_TRACERS = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - into = ["NO ADVECTION","CHARACTERISTICS","EXPLICIT + SUPG","EXPLICIT LEO POSTMA","EXPLICIT + MURD SCHEME N","EXPLICIT + MURD SCHEME PSI","LEO POSTMA FOR TIDAL FLATS","N-SCHEME FOR TIDAL FLATS","ERIA SCHEME FOR TIDAL FLATS"], - defaut = ["CHARACTERISTICS"], - fr = """Choix du schema de convection pour les traceurs, -remplace FORME DE LA CONVECTION""", - ang = """Choice of the advection scheme for the tracers, -replaces TYPE OF ADVECTION""", - ), - ), -# ----------------------------------- - IMPLICITATION_COEFFICIENT_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.6, - fr = """Fixe la valeur du coefficient d''implicitation du traceur""", - ang = """Sets the value of the implicitation coefficient -for the tracer""", - ), -# ----------------------------------- - DIFFUSION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = True, - fr = """Prise en compte ou non de la diffusion du traceur passif.""", - ang = """The diffusion of the passive tracer is taken into account -or ignored.""", - ), -# ----------------------------------- - b_DIFFUSION_OF_TRACERSG = BLOC(condition="DIFFUSION_OF_TRACERS == True", -# ----------------------------------- -# ----------------------------------- - COEFFICIENT_FOR_DIFFUSION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min=0, max='**', - defaut = [1.E-6], - fr = """Fixe la valeur du coefficient de diffusion du traceur. -L''influence de ce parametre sur l''evolution du traceur dans -le temps est importante.""", - ang = """Sets the value of the tracer diffusivity.""", - ), - ), -# ----------------------------------- - OPTION_FOR_THE_DIFFUSION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - into = ["div( nu grad(T) )","1/h div ( h nu grad(T)"], - defaut = ["div( nu grad(T) )"], - fr = """1: Diffusion de la forme div( nu grad(T) ) -2: Diffusion de la forme 1/h div ( h nu grad(T) )""", - ang = """1: Diffusion in the form div( nu grad(T) ) -2: Diffusion in the form 1/h div ( h nu grad(T) )""", - ), -# ----------------------------------- - SCHEME_OPTION_FOR_ADVECTION_OF_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', min=0, max='**', - defaut = [1], - fr = """Si present remplace et a priorite sur : -OPTION POUR LES CARACTERISTIQUES -OPTION DE SUPG -Si schema PSI ou N : 1=explicite 2=predicteur-correcteur -3=predicteur-correcteur deuxieme ordre en temps -4=implicite""", - ang = """If present replaces and has priority over: -OPTION FOR CHARACTERISTICS -SUPG OPTION -if N or PSI SCHEME: 1=explicit 2=predictor-corrector -3= predictor-corrector second-order in time 4= implicit""", - ), -# ----------------------------------- - MASS_LUMPING_ON_TRACERS = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Fixe le taux de mass-lumping effectue sur le traceur.""", - ang = """Sets the amount of mass-lumping that is performed on - the tracer.""", - ), - ), -# ----------------------------------- - DEGRADATION = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - LAW_OF_TRACERS_DEGRADATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', min=0, max='**', - into = ["NO DEGRADATION","F(T90) LAW"], - defaut = ["NO DEGRADATION","NO DEGRADATION"], - fr = """Prise en compte d''une loi de decroissance des traceurs""", - ang = """Take in account a law for tracers decrease""", - ), -# ----------------------------------- - b_LAW_OF_TRACERS_DEGRADATIONG = BLOC(condition="'F(T90) LAW' in LAW_OF_TRACERS_DEGRADATION", -# ----------------------------------- -# ----------------------------------- - COEFFICIENT_1_FOR_LAW_OF_TRACERS_DEGRADATION = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', min=0, max='**', - fr = """Coefficient 1 de la loi de decroissance des traceurs""", - ang = """Coefficient 1 of law for tracers decrease""", - ), - ), - ), -) -# ----------------------------------------------------------------------- -PARTICLE_TRANSPORT = PROC(nom= "PARTICLE_TRANSPORT",op = None, -# ----------------------------------------------------------------------- -# ----------------------------------- - DROGUES = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - NUMBER_OF_DROGUES = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Permet d''effectuer un suivi de flotteurs""", - ang = """Number of drogues in the computation. -The user must then fill the subroutine FLOT specifying -the coordinates of the starting points, their departure -and arrival times. -The trajectory of drogues is recorded in the BINARY RESULTS -FILE that must be given in the steering file""", - ), -# ----------------------------------- - b_NUMBER_OF_DROGUESG = BLOC(condition="NUMBER_OF_DROGUES != 0", -# ----------------------------------- -# ----------------------------------- - DROGUES_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultat avec les positions des flotteurs""", - ang = """Results file with positions of drogues""", - ), -# ----------------------------------- - PRINTOUT_PERIOD_FOR_DROGUES = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Nombre de pas de temps entre 2 sorties de positions de -flotteurs dans le fichier des resultats binaire supplementaire -N affecte pas la qualite du calcul de la trajectoire""", - ang = """Number of time steps between 2 outputs of drogues -positions in the binary file""", - ), - ), - ), -# ----------------------------------- - ALGAES = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - ALGAE_TRANSPORT_MODEL = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Si oui, les flotteurs seront des algues""", - ang = """If yes, the floats or particles will be algae""", - ), -# ----------------------------------- - b_ALGAE_TRANSPORT_MODELG = BLOC(condition="ALGAE_TRANSPORT_MODEL == True", -# ----------------------------------- -# ----------------------------------- - ALGAE_TYPE = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["SPHERE","IRIDAEA FLACCIDA (CLOSE TO ULVA)","PELVETIOPSIS LIMITATA","GIGARTINA LEPTORHYNCHOS"], - defaut = "SPHERE", - fr = """Type des algues. Pour le choix 1 les algues seront -modelisees comme des spheres, pour les autres choix voir Gaylord -et al. (1994).""", - ang = """Algae type. For choice 1 the algae particles will be -modeled as spheres, and for the other choices see Gaylord et -al. (1994)""", - ), -# ----------------------------------- - DIAMETRE_OF_ALGAE = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.1, - fr = """Diametre des algues en m""", - ang = """Diametre of algae in m""", - ), -# ----------------------------------- - DENSITY_OF_ALGAE = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1050., - fr = """Masse volumique des algues en kg/m3""", - ang = """Density of algae in kg/m3""", - ), -# ----------------------------------- - THICKNESS_OF_ALGAE = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0.01, - fr = """Epaisseur des algues en m""", - ang = """Thickness of algae in m""", - ), - ), - ), -# ----------------------------------- - OIL_SPILL = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - OIL_SPILL_MODEL = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """POUR DECLENCHER LE MODELE DE DERIVE DE NAPPES, DANS -CE CAS LE FICHIER DE COMMANDES MIGRHYCAR EST NECESSAIRE""", - ang = """WILL TRIGGER THE OIL SPILL MODEL, IN THIS CASE -THE MIGRHYCAR STEERING FILE IS NEEDED""", - ), -# ----------------------------------- - b_OIL_SPILL_MODELG = BLOC(condition="OIL_SPILL_MODEL == True", -# ----------------------------------- -# ----------------------------------- - OIL_SPILL_STEERING_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Contient les donnees pour le modele de derive de nappes""", - ang = """Contains data for the oil spill model""", - ), - ), - ), -# ----------------------------------- - BROWNIAN_MOTION = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - STOCHASTIC_DIFFUSION_MODEL = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["No model","brownian movement"], - defaut = "No model", - fr = """Pour les particules : flotteurs, hydrocarbures""", - ang = """Meant for particles: drogues, oil spills""", - ), - ), -# ----------------------------------- - LAGRANGIAN_DRIFTS = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - NUMBER_OF_LAGRANGIAN_DRIFTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Permet d''effectuer simultanement plusieurs calculs de derives -lagrangiennes initiees a des pas differents""", - ang = """Provided for performing several computations of lagrangian -drifts starting at different times. -Add A and G in the VARIABLES FOR GRAPHIC PRINTOUTS key-word""", - ), -# ----------------------------------- - b_NUMBER_OF_LAGRANGIAN_DRIFTSG = BLOC(condition="NUMBER_OF_LAGRANGIAN_DRIFS != 0", -# ----------------------------------- -# ----------------------------------- - Consigne = SIMP(statut ="o", homo="information", typ="TXM", -# ----------------------------------- - defaut = "Add 'drift along x (m)' and 'drift along y (m)' in VARIABLES FOR GRAPHIC PRINTOUTS"), - ), - ), -) -# ----------------------------------------------------------------------- -HYDRAULIC_STRUCTURES = PROC(nom= "HYDRAULIC_STRUCTURES",op = None, -# ----------------------------------------------------------------------- -# ----------------------------------- - WEIRS = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - NUMBER_OF_WEIRS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Nombre de seuils qui seront traites par des conditions aux -limites. Ces seuils doivent etre decrits comme des frontieres du -domaine de calcul, et leurs caracteristiques sont donnees dans le -fichier de donnees des seuils (voir la documentation ecrite)""", - ang = """Number of weirs that will be treated by boundary conditions. -They must be described as boundaries of the domain and their features -are given in the weir data file (see written documentation)""", - ), -# ----------------------------------- - b_NUMBER_OF_WEIRSG = BLOC(condition="NUMBER_OF_WEIRS != 0", -# ----------------------------------- -# ----------------------------------- - WEIRS_DATA_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de description des seuils presents dans le modele""", - ang = """Description of weirs existing in the model""", - ), -# ----------------------------------- - TYPE_OF_WEIRS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["HORIZONTAL WITH SAME NUMBER OF NODES UPSTREAM/DOWNSTREAM","GENERAL"], - defaut = "HORIZONTAL WITH SAME NUMBER OF NODES UPSTREAM/DOWNSTREAM", - fr = """Methode de traitement des seuils. Deux Solutions: -- HORIZONTAL AVEC MEME NOMBRE DE NOEUDS AMONT/AVAL (Solution historique - avec bord) -- GENERALE (Nouvelle solution avec pts sources)""", - ang = """Method for treatment of weirs. Two options: -- HORIZONTAL WITH SAME NUMBER OF NODES UPSTREAM/DOWNSTREAM (Historical - solution with bord) -- GENERAL (New solution with sources points""", - ), - ), - ), -# ----------------------------------- - SIPHONS = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - NUMBER_OF_SIPHONS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Nombre de siphons traites comme des termes sources ou -puits. Ces siphons doivent etre decrits comme des sources dans le -fichier cas. Leurs caracteristiques sont donnees dans le -fichier de donnees des siphons (voir la documentation ecrite)""", - ang = """Number of siphons treated as source terms. -They must be described as sources in the domain and their features -are given in the culvert data file (see written documentation)""", - ), -# ----------------------------------- - b_NUMBER_OF_SIPHONSG = BLOC(condition="NUMBER_OF_SIPHONS != 0", -# ----------------------------------- -# ----------------------------------- - SIPHONS_DATA_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de description des siphons presents dans le modele""", - ang = """Description of culvert existing in the model""", - ), - ), - ), -# ----------------------------------- - CULVERTS = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - NUMBER_OF_CULVERTS = SIMP(statut ='o', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Nombre de buses ou ponts traites comme des termes sources ou -puits. Ces buses doivent etre decrits comme des sources dans le -fichier cas. Leurs caracteristiques sont donnees dans le -fichier de donnees des buses (voir la documentation ecrite)""", - ang = """Number of culverts, tubes or bridges treated as source terms. -They must be described as sources in the domain and their features -are given in the culverts data file (see written documentation)""", - ), -# ----------------------------------- - b_NUMBER_OF_CULVERTSG = BLOC(condition="NUMBER_OF_CULVERTS != 0", -# ----------------------------------- -# ----------------------------------- - CULVERTS_DATA_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de description des buses/ponts presents dans le modele""", - ang = """Description of culverts/tubes/bridges existing in the model""", - ), - ), -# ----------------------------------- - OPTION_FOR_CULVERTS = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Option pour le traitement des buses. Il existe deux formulations -dans Telemac""", - ang = """Option for the treatment of culverts. There are two options in -Telemac""", - ), - ), -# ----------------------------------- - BREACHES = FACT(statut='f', -# ----------------------------------- -# ----------------------------------- - BREACH = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Prise en compte de breches dans le calcul par -modification altimetrique dans le maillage. La description -des breches se fait avec le fichier de donnees des breches.""", - ang = """Take in account some breaches during the computation -by modifying the bottom level of the mesh. Brech description -is done with the breaches data file.""", - ), -# ----------------------------------- - b_BREACHG = BLOC(condition="BREACH == True", -# ----------------------------------- -# ----------------------------------- - BREACHES_DATA_FILE = SIMP(statut ='o', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de description des breches""", - ang = """Description of breaches""", - ), - ), - ), -) -# ----------------------------------------------------------------------- -TIDES = PROC(nom= "TIDES",op = None, -# ----------------------------------------------------------------------- -# ----------------------------------- - BOUNDARY_CONDITIONS = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - TIDAL_DATA_BASE = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["NO DEFAULT VALUE","JMJ","TPXO","MISCELLANEOUS (LEGOS-NEA, FES20XX, PREVIMER...)"], - defaut = "NO DEFAULT VALUE", - fr = """Pour JMJ, renseigner la localisation du fichier bdd\_jmj et geofin -dans les mots-cles BASE DE DONNEES DE MAREE et FICHIER DU MODELE DE -MAREE. Pour TPXO, LEGOS-NEA, FES20XX et PREVIMER, l''utilisateur doit -telecharger les fichiers de constantes harmoniques sur internet""", - ang = """For JMJ, indicate the location of the files bdd\_jmj and geofin with -keywords TIDE DATA BASE and TIDAL MODEL FILE. For TPXO, LEGOS-NEA, -FES20XX and PREVIMER, the user has to download files of harmonic -constituents on the internet""", - ), -# ----------------------------------- - b_TIDAL_DATA_BASEG = BLOC(condition="TIDAL_DATA_BASE == 'TPXO'", -# ----------------------------------- -# ----------------------------------- - MINOR_CONSTITUENTS_INFERENCE = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Pour la base de donnees TPXO uniquement. -Interpolation de composantes harmoniques mineures -a partir de celles lues dans les fichiers d''entree -lies aux mots-cles BASE BINAIRE 1 DE DONNEES DE MAREE -et BASE BINAIRE 2 DE DONNEES DE MAREE""", - ang = """For TPXO tidal data base only. -Inference of minor constituents from the one read in input files -linked to keywords BINARY DATABASE 1 FOR TIDE -and BINARY DATABASE 2 FOR TIDE""", - ), -# ----------------------------------- - BINARY_DATABASE_1_FOR_TIDE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Base de donnees binaire 1 tiree du fichier du modele de maree. - Dans le cas des donnees satellitaires de TPXO, ce fichier correspond - aux donnees de niveau d''eau, par exemple h\_tpxo7.2""", - ang = """Binary database 1 extracted from the tidal model file. - In the case of the TPXO satellite altimetry model, this file should - be for free surface level, for instance h\_tpxo7.2""", - ), -# ----------------------------------- - BINARY_DATABASE_2_FOR_TIDE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Base de donnees binaire 2 tiree du fichier du modele de maree. - Dans le cas des donnees satellitaires de TPXO, ce fichier correspond - aux donnees de vitesse de marrees, par exemple u\_tpxo7.2""", - ang = """Binary database 2 extracted from the tidal model file. - In the case of the TPXO satellite altimetry model, this file should - be for tidal velocities, for instance u\_tpxo7.2""", - ), - ), -# ----------------------------------- - TIDAL_MODEL_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Fichier de geometrie du modele dont sont extraites -les constantes harmoniques""", - ang = """Geometry file of the model from which harmonic constituents -are extracted""", - ), -# ----------------------------------- - ASCII_DATABASE_FOR_TIDE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Base de donnees de constantes harmoniques -tirees du fichier du modele de maree. -Ancien nom en version 6.1 : BASE DE DONNEES DE MAREE""", - ang = """Tide data base of harmonic constituents -extracted from the tidal model file. -Old name in 6.1 version: TIDE DATA BASE""", - ), -# ----------------------------------- - HARMONIC_CONSTANTS_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Constantes harmoniques extraites du fichier du modele de maree""", - ang = """Harmonic constants extracted from the tidalmodel file""", - ), - ), -# ----------------------------------- - PHYSICAL_PARAMETERS = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - TIDE_GENERATING_FORCE = SIMP(statut ='o', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Active la prise en compte de la force generatrice de la maree""", - ang = """The tide generating force is taken into account.""", - ), -# ----------------------------------- - b_TIDE_GENERATING_FORCEG = BLOC(condition="TIDE_GENERATING_FORCE == True", -# ----------------------------------- - ), -# ----------------------------------- - OPTION_FOR_TIDAL_BOUNDARY_CONDITIONS = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', max='**', - into = ["No tide","Real tide (recommended methodology)","Astronomical tide","Mean spring tide","Mean tide","Mean neap tide","Astronomical neap tide","Real tide (methodology before 2010)"], - fr = """Option pour les conditions aux limites de maree. Pour des marees -reelles, l option 1 est recommandee. Depuis la version 7.1, ce mot-cle -est un tableau avec une valeur donnee par frontiere liquide, separee par -point-virgules. Ceci permet d''avoir des conditions de maree (ou pas) -calculees sur des frontieres liquides avec vitesses ou hauteur d eau -imposees. Ca evite un conflit lors de l utilisation de seuils dans le -domaine. 0 est le code pour des conditions autres que des conditions de -maree. ATTENTION depuis la version 7.1 ! Les anciens modeles doivent -etre changes si la frontiere de maree n a pas le numero 1. Dans ce cas, -le mot-cle doit etre change et plus de valeurs doivent etre donnees. -Calage possible par les mots-cles COEFFICIENT POUR CALAGE EN MARNAGE et -COEFFICIENT POUR CALAGE EN NIVEAU.""", - ang = """Option for tidal boundary conditions. For real tides, option 1 is -recommended. This keyword has been an array with a value given per -liquid boundary, separated by semicolons, since version 7.1. This -enables to have tidal conditions (or not) computed on liquid boundaries -with prescribed velocities or depths, avoiding a clash when using weirs -in the domain. 0 codes for conditions other than tidal. BEWARE since -version 7.1! Old models must be changed if their tidal boundary is not -number 1. In that case this keyword must be changed and more values -given. Possible calibration with the keywords COEFFICIENT TO ADJUST -TIDAL RANGE, COEFFICENT TO CALIBRATE TIDAL VELOCITIES, and COEFFICIENT -TO ADJUST SEA LEVEL.""", - ), - ), -# ----------------------------------- - CALIBRATION = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - GEOGRAPHIC_SYSTEM = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ["NO DEFAULT VALUE","DEFINED BY USER","WGS84 LONGITUDE/LATITUDE IN REAL DEGREES","WGS84 NORTHERN UTM","WGS84 SOUTHERN UTM","LAMBERT","MERCATOR FOR TELEMAC"], - defaut = "NO DEFAULT VALUE", - fr = """Systeme de coordonnees geographiques dans lequel est construit le -modele numerique. Indiquer la zone correspondante avec le mot-cle""", - ang = """Geographic coordinates system in which the numerical model is built. -Indicate the corresponding zone with the keyword""", - ), -# ----------------------------------- - b_GEOGRAPHIC_SYSTEMG = BLOC(condition="GEOGRAPHIC_SYSTEM in ['WGS84 NOTHERN UTM','WGS84 SOUTHERN UTM','LAMBERT']", -# ----------------------------------- -# ----------------------------------- - ZONE_NUMBER_IN_GEOGRAPHIC_SYSTEM = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ["NO DEFAULT VALUE","LAMBERT 1 NORTH","LAMBERT 2 CENTER","LAMBERT 3 SOUTH","LAMBERT 4 CORSICA","LAMBERT 2 EXTENDED","UTM ZONE, E.G."], - defaut = "NO DEFAULT VALUE", - fr = """Numero de zone (fuseau ou type de projection) lors de l''utilisation -d''une projection plane. Indiquer le systeme geographique dans lequel -est construit le modele numerique avec le mot-cle SYSTEME GEOGRAPHIQUE""", - ang = """Number of zone when using a plane projection. Indicate the geographic -system in which the numerical model is built with the keyword GEOGRAPHIC -SYSTEM""", - ), - ), -# ----------------------------------- - COEFFICIENT_TO_CALIBRATE_SEA_LEVEL = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 0., - fr = """Coefficient pour ajuster le niveau de mer""", - ang = """Coefficient to calibrate the sea level""", - ), -# ----------------------------------- - COEFFICIENT_TO_CALIBRATE_TIDAL_RANGE = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 1., - fr = """Coefficient pour ajuster le marnage de l''onde de maree -aux frontieres maritimes""", - ang = """Coefficient to calibrate the tidal range of tidal wave -at tidal open boundary conditions""", - ), -# ----------------------------------- - COEFFICIENT_TO_CALIBRATE_TIDAL_VELOCITIES = SIMP(statut ='o', -# ----------------------------------- - typ = 'R', - defaut = 999999., - fr = """Coefficient pour ajuster les composantes de vitesse -de l''onde de maree aux frontieres maritimes. -La valeur par defaut 999999. signifie que c''est la racine carree -du COEFFICIENT DE CALAGE DU MARNAGE qui est prise""", - ang = """Coefficient to calibrate the tidal velocities of tidal wave -at tidal open boundary conditions. -Default value 999999. means that the square root of -COEFFICIENT TO CALIBRATE TIDAL RANGE is taken""", - ), -# ----------------------------------- - LOCAL_NUMBER_OF_THE_POINT_TO_CALIBRATE_HIGH_WATER = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Numero local du point entre 1 et le nombre de points de frontiere -maritime (du FICHIER DES CONSTANTES HARMONIQUES) ou les conditions aux -limites de maree sont calculees avec les bases de donnees JMJ, NEA, FES, -PREVIMER (sauf les bases de type TPXO). Les ondes de maree sont -dephasees par rapport a ce point pour debuter le calcul par une pleine -mer (en marees schematiques seulement).""", - ang = """Local number between 1 and the number of tidal boundary points (of the -HARMONIC CONSTANTS FILE) where the tidal boundary conditions are -computed with JMJ, NEA, FES, PREVIMER databases (except TPXO-type -databases). The tidal constituents have their phase shifted with respect -to this point to start the simulation with a high water (for schematic -tides only).""", - ), -# ----------------------------------- - GLOBAL_NUMBER_OF_THE_POINT_TO_CALIBRATE_HIGH_WATER = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 0, - fr = """Numero global du point par rapport auquel les ondes de maree sont -dephasees pour debuter le calcul par une pleine mer (en marees -schematiques seulement). Ne concerne que les bases de constantes -harmoniques de type TPXO.""", - ang = """Global number of the point with respect to which the tidal -constituents have their phase shifted to start the calculation with a -high water (for schematic tides only). Only harmonic constants databases -like TPXO are concerned.""", - ), - ), -) -# ----------------------------------------------------------------------- -COUPLING = PROC(nom= "COUPLING",op = None, -# ----------------------------------------------------------------------- -# ----------------------------------- - COUPLING_WITH = SIMP(statut ='o', -# ----------------------------------- - typ = 'TXM', - into = ['SISYPHE','TOMAWAC','DELWAQ'], - defaut = '', - fr = """Liste des codes avec lesquels on couple Telemac-2D - SISYPHE : couplage interne avec Sisyphe - TOMAWAC : couplage interne avec Tomawac - DELWAQ : sortie de fichiers de resultats pour Delwaq""", - ang = """List of codes to be coupled with Telemac-2D - SISYPHE : internal coupling with Sisyphe - TOMAWAC : internal coupling with Tomawac - DELWAQ: will yield results file for Delwaq""", - ), -# ----------------------------------- - NAMES_OF_CLANDESTINE_VARIABLES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min= 2, max= 2, - fr = """Noms de variables qui ne sont pas utilisees par TELEMAC; -mais qui doivent etre conservees lors de son execution. -Ceci peut etre utilise entre autres lors du couplage de TELEMAC -avec un autre code. -Les variables clandestines sont alors des variables propres a l''autre -code et sont rendues dans le fichier de resultats.""", - ang = """Names of variables that are not used by TELEMAC, but should be -preserved when it is being run. This keyword may be used, for instance -when it if TELEMAC is coupled with another code. Thus, the clandestine -variables belong to the other code and are given back in the results -file.""", - ), -# ----------------------------------- - DELWAQ = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - COUPLING_DIRECTORY = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - defaut = '', - fr = """Nom complet du dossier d echange des fichiers - pour couplage de codes""", - ang = """Name with full path of the directory where the files will - be exchanged for coupling""", - ), -# ----------------------------------- - DELWAQ_PRINTOUT_PERIOD = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """Periode de sortie des resultats pour Delwaq""", - ang = """Printout period for Delwaq file""", - ), -# ----------------------------------- - VOLUMES_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - EXCHANGE_AREAS_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - VERTICAL_FLUXES_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - SALINITY_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - BOTTOM_SURFACES_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - EXCHANGES_BETWEEN_NODES_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - NODES_DISTANCES_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - TEMPERATURE_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - VELOCITY_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - DIFFUSIVITY_DELWAQ_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - DELWAQ_STEERING_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)','Sauvegarde'), - defaut = '', - fr = """Fichier de resultats pour le couplage avec Delwaq""", - ang = """Results file for coupling with Delwaq""", - ), -# ----------------------------------- - SALINITY_FOR_DELWAQ = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Decide de la sortie de la salinite pour Delwaq""", - ang = """Triggers output of salinity for Delwaq""", - ), -# ----------------------------------- - TEMPERATURE_FOR_DELWAQ = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Decide de la sortie de la temperature pour Delwaq""", - ang = """Triggers output of temperature for Delwaq""", - ), -# ----------------------------------- - VELOCITY_FOR_DELWAQ = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Decide de la sortie de la vitesse pour Delwaq""", - ang = """Triggers output of velocity for Delwaq""", - ), -# ----------------------------------- - DIFFUSIVITY_FOR_DELWAQ = SIMP(statut ='f', -# ----------------------------------- - typ = bool, - defaut = False, - fr = """Decide de la sortie du coefficient de diffusion pour Delwaq""", - ang = """Triggers output of diffusion for Delwaq""", - ), - ), -# ----------------------------------- - SISYPHE = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - SISYPHE_STEERING_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - defaut = '', - fr = """Fichier des parametres de Sisyphe en cas de couplage interne""", - ang = """Sisyphe parameter file in case of internal coupling""", - ), -# ----------------------------------- - COUPLING_PERIOD_FOR_SISYPHE = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """pour eviter de faire le couplage a chaque pas de temps""", - ang = """to avoid coupling at every time-step""", - ), - ), -# ----------------------------------- - TOMAWAC = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - TOMAWAC_STEERING_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - defaut = '', - fr = """Fichier des parametres de Tomawac en cas de couplage interne""", - ang = """Tomawac parameter file in case of internal coupling""", - ), -# ----------------------------------- - COUPLING_PERIOD_FOR_TOMAWAC = SIMP(statut ='f', -# ----------------------------------- - typ = 'I', - defaut = 1, - fr = """pour eviter de faire le couplage a chaque pas de temps""", - ang = """to avoid coupling at every time-step""", - ), - ), -# ----------------------------------- - WAQTEL = FACT(statut='o', -# ----------------------------------- -# ----------------------------------- - WAQTEL_STEERING_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - defaut = '', - fr = """fichier des parametres physiques pour les processus de qualite d eau -(internes non ceux de DELWAQ)""", - ang = """file for physical parameters of waq processes (local ones of -Telemac-tracer not those of DELWAQ)""", - ), - ), -) -# ----------------------------------------------------------------------- -INTERNAL = PROC(nom= "INTERNAL",op = None, -# ----------------------------------------------------------------------- -# ----------------------------------- - LANGUAGE = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ["FRANCAIS","ANGLAIS"], - defaut = "ANGLAIS", - fr = """1 : FRANCAIS 2 : ANGLAIS""", - ang = """1: FRENCH 2: ENGLISH""", - ), -# ----------------------------------- - STEERING_FILE = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = '', - fr = """Nom du fichier contenant les parametres du calcul a realiser.""", - ang = """Name of the file containing the parameters of the computation -Written by the user.""", - ), -# ----------------------------------- - DICTIONARY = SIMP(statut ='f', -# ----------------------------------- - typ = ('Fichier','All Files (*)'), - defaut = 'telemac2d.dico', - fr = """Dictionnaire des mots cles.""", - ang = """Key word dictionary.""", - ), -# ----------------------------------- - PARTITIONING_TOOL = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - into = ['METIS','SCOTCH','PARMETIS','PTSCOTCH'], - defaut = 'METIS', - fr = """CHOIX DU PARTITIONNEUR -1 : METIS -2 : SCOTCH -3 : PARMETIS -4 : PTSCOTCH -etc...""", - ang = """PARTITIONING TOOL SELECTION -1 : METIS -2 : SCOTCH -3 : PARMETIS -4 : PTSCOTCH -etc...""", - ), -# ----------------------------------- - RELEASE = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - defaut = 'TRUNK', - fr = """Numero de version des bibliotheques utilisees par TELEMAC. -SUR UNE STATION DE TRAVAIL -5 versions sont donnees correspondant a : -TELEMAC,DAMO,UTILE,BIEF,HP""", - ang = """version number of the libraries used by TELEMAC. -ON A WORKSTATION -5 numbers are given, corresponding to the libraries called: -TELEMAC,DAMO,UTILE,BIEF,HP""", - ), -# ----------------------------------- - LIST_OF_FILES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min=47, max=47, - defaut = 'STEERING FILE;DICTIONARY;FORTRAN FILE;GEOMETRY FILE;BOUNDARY CONDITIONS FILE;RESULTS FILE;PREVIOUS COMPUTATION FILE;BOTTOM TOPOGRAPHY FILE;BINARY DATA FILE 1;BINARY DATA FILE 2;FORMATTED DATA FILE 1;FORMATTED DATA FILE 2;BINARY RESULTS FILE;FORMATTED RESULTS FILE;REFERENCE FILE;LIQUID BOUNDARIES FILE;FRICTION DATA FILE;VOLUMES DELWAQ FILE;EXCHANGE AREAS DELWAQ FILE;VERTICAL FLUXES DELWAQ FILE;SALINITY DELWAQ FILE;VELOCITY DELWAQ FILE;DIFFUSIVITY DELWAQ FILE;BOTTOM SURFACES DELWAQ FILE;EXCHANGES BETWEEN NODES DELWAQ FILE;NODES DISTANCES DELWAQ FILE;TEMPERATURE DELWAQ FILE;DELWAQ STEERING FILE;STAGE-DISCHARGE CURVES FILE;SOURCES FILE;SECTIONS INPUT FILE;SECTIONS OUTPUT FILE;OIL SPILL STEERING FILE;HARMONIC CONSTANTS FILE;TIDAL MODEL FILE;ASCII DATABASE FOR TIDE;BINARY DATABASE 1 FOR TIDE;BINARY DATABASE 2 FOR TIDE;WEIRS DATA FILE;SIPHONS DATA FILE;CULVERTS DATA FILE;BREACHES DATA FILE;DROGUES FILE;ZONES FILE;FLUXLINE INPUT FILE;ASCII ATMOSPHERIC DATA FILE;BINARY ATMOSPHERIC DATA FILE', - fr = """Noms des fichiers exploites par le code""", - ang = """File names of the used files""", - ), -# ----------------------------------- - DESCRIPTION_OF_LIBRARIES = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', min=11, max=11, - defaut = 'builds|PPP|lib|telemac2dMMMVVV.LLL;builds|PPP|lib|sisypheMMMVVV.LLL;builds|PPP|lib|tomawacMMMVVV.LLL;builds|PPP|lib|nestorMMMVVV.LLL;builds|PPP|lib|waqtelMMMVVV.LLL;builds|PPP|lib|stbtelMMMVVV.LLL;builds|PPP|lib|biefMMMVVV.LLL;builds|PPP|lib|hermesMMMVVV.LLL;builds|PPP|lib|damoMMMVVV.LLL;builds|PPP|lib|parallelMMMVVV.LLL;builds|PPP|lib|specialMMMVVV.LLL', - fr = """Description des librairies de T2D""", - ang = """LIBRARIES description""", - ), -# ----------------------------------- - DEFAULT_EXECUTABLE = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - defaut = 'builds|PPP|bin|telemac2dMMMVVV.exe', - fr = """Executable par defaut de T2D""", - ang = """Default executable for T2D""", - ), -# ----------------------------------- - DEFAULT_PARALLEL_EXECUTABLE = SIMP(statut ='f', -# ----------------------------------- - typ = 'TXM', - defaut = 'builds|PPP|bin|telemac2dMMMVVV.exe', - fr = """Executable parallele par defaut de T2D""", - ang = """Default parallel executable for T2D""", - ), -) -Ordre_Des_Commandes = ( -'COMPUTATION_ENVIRONMENT', -'HYDRO', -'GENERAL_PARAMETERS', -'NUMERICAL_PARAMETERS', -'TURBULENCE', -'TIDAL_FLATS_INFO', -'TRACERS', -'PARTICLE_TRANSPORT', -'HYDRAULIC_STRUCTURES', -'TIDES', -'COUPLING', -'INTERNAL') -Classement_Commandes_Ds_Arbre = ( -'COMPUTATION_ENVIRONMENT', -'HYDRO', -'GENERAL_PARAMETERS', -'NUMERICAL_PARAMETERS', -'TURBULENCE', -'TIDAL_FLATS_INFO', -'TRACERS', -'PARTICLE_TRANSPORT', -'HYDRAULIC_STRUCTURES', -'TIDES', -'COUPLING', -'INTERNAL') diff --git a/Traducteur/log.py b/Traducteur/log.py index 385becf8..1fabade5 100644 --- a/Traducteur/log.py +++ b/Traducteur/log.py @@ -24,7 +24,7 @@ logger=logging.getLogger() def initialise(flog=None): if flog == None : - MonHome=os.environ['HOME'] + MonHome=os.path.expanduser("~") MaDir=MonHome+"/Eficas_install" try : os.mkdir(MaDir) diff --git a/UiQT5/desWidgetPlusieursBase.ui b/UiQT5/desWidgetPlusieursBase.ui index d47cef89..660efa2a 100644 --- a/UiQT5/desWidgetPlusieursBase.ui +++ b/UiQT5/desWidgetPlusieursBase.ui @@ -482,8 +482,7 @@ ... - - .. + @@ -520,8 +519,7 @@ ... - - .. + @@ -558,8 +556,7 @@ ... - - .. +