From: Jean-Philippe ARGAUD Date: Wed, 8 Apr 2015 06:06:57 +0000 (+0200) Subject: Updating copyright information and version change X-Git-Tag: V7_6_0~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=75dbb877850ea5a5d53149552dbde50753edad43;p=modules%2Fadao.git Updating copyright information and version change --- diff --git a/Makefile.am b/Makefile.am index a334318..eb430d8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2011 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/adm_local/check_eficas.m4 b/adm_local/check_eficas.m4 index 8c4b6ce..b0b5be9 100644 --- a/adm_local/check_eficas.m4 +++ b/adm_local/check_eficas.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2010-2011 EDF R&D +dnl Copyright (C) 2008-2015 EDF R&D dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/check_module_eficas.m4 b/adm_local/check_module_eficas.m4 index edecf0a..af0f03d 100644 --- a/adm_local/check_module_eficas.m4 +++ b/adm_local/check_module_eficas.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2010-2011 EDF R&D +dnl Copyright (C) 2008-2015 EDF R&D dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/check_scipy.m4 b/adm_local/check_scipy.m4 index cd29e08..794fc8c 100644 --- a/adm_local/check_scipy.m4 +++ b/adm_local/check_scipy.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2010-2011 EDF R&D +dnl Copyright (C) 2008-2015 EDF R&D dnl dnl This library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Lesser General Public diff --git a/adm_local/make_common_starter.am b/adm_local/make_common_starter.am index 01ac3a3..3d42fe0 100644 --- a/adm_local/make_common_starter.am +++ b/adm_local/make_common_starter.am @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2011 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/autogen.sh b/autogen.sh index 160acd0..93dc9a2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2010-2011 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/doc/en/advanced.rst b/doc/en/advanced.rst index 0cac3d1..2d5c2ab 100644 --- a/doc/en/advanced.rst +++ b/doc/en/advanced.rst @@ -266,6 +266,14 @@ is not guaranteed for all the commands or keywords. In general also, an ADAO case file for one version can not be read by a previous minor or major version of the ADAO module. +Switching from 7.5 to 7.6 ++++++++++++++++++++++++++ + +There is no known incompatibility for the ADAO case files. The upgrade procedure +is to read the old ADAO case file with the new SALOME/ADAO module, and save it +with a new name. This procedure proceed automatically to the required +modifications of the storage tree of the ADAO case file. + Switching from 7.4 to 7.5 +++++++++++++++++++++++++ diff --git a/doc/fr/advanced.rst b/doc/fr/advanced.rst index ec94024..85c900c 100644 --- a/doc/fr/advanced.rst +++ b/doc/fr/advanced.rst @@ -282,6 +282,15 @@ commandes ou tous les mots-cl version ne peut pas être lu par une précédente version mineure ou majeure du module ADAO. +Passer de la version 7.5 à la 7.6 ++++++++++++++++++++++++++++++++++ + +Il n'y a pas d'incompatibilité connue pour les fichiers de cas ADAO. La +procédure de montée en version consiste à lire l'ancien fichier de cas ADAO avec +le nouveau module SALOME/ADAO, et à l'enregistrer avec un nouveau nom. Cette +procédure effectue automatiquement les modifications requises dans +l'arborescence de stockage du fichier de cas ADAO. + Passer de la version 7.4 à la 7.5 +++++++++++++++++++++++++++++++++ diff --git a/examples/Makefile.am b/examples/Makefile.am index c9ed720..7e0d966 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/Makefile.am b/examples/daSalome/Makefile.am index 65d2a5e..066036d 100644 --- a/examples/daSalome/Makefile.am +++ b/examples/daSalome/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/test003_ADAO_scripts_for_JDC.py b/examples/daSalome/test003_ADAO_scripts_for_JDC.py index fca7d61..9aa54be 100644 --- a/examples/daSalome/test003_ADAO_scripts_for_JDC.py +++ b/examples/daSalome/test003_ADAO_scripts_for_JDC.py @@ -1,5 +1,5 @@ #-*-coding:iso-8859-1-*- -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/test003_bis_ADAO_scripts_for_JDC.py b/examples/daSalome/test003_bis_ADAO_scripts_for_JDC.py index da5ddb1..286f798 100644 --- a/examples/daSalome/test003_bis_ADAO_scripts_for_JDC.py +++ b/examples/daSalome/test003_bis_ADAO_scripts_for_JDC.py @@ -1,5 +1,5 @@ #-*-coding:iso-8859-1-*- -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/test003_bis_ADAO_user_data_init.py b/examples/daSalome/test003_bis_ADAO_user_data_init.py index 217efc7..e803bb5 100644 --- a/examples/daSalome/test003_bis_ADAO_user_data_init.py +++ b/examples/daSalome/test003_bis_ADAO_user_data_init.py @@ -1,5 +1,5 @@ #-*-coding:iso-8859-1-*- -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/test004_ADAO_scripts_for_JDC.py b/examples/daSalome/test004_ADAO_scripts_for_JDC.py index eaac275..c8173f6 100644 --- a/examples/daSalome/test004_ADAO_scripts_for_JDC.py +++ b/examples/daSalome/test004_ADAO_scripts_for_JDC.py @@ -1,5 +1,5 @@ #-*-coding:iso-8859-1-*- -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/test005_ADAO_scripts_for_JDC.py b/examples/daSalome/test005_ADAO_scripts_for_JDC.py index 7a88050..4d06006 100644 --- a/examples/daSalome/test005_ADAO_scripts_for_JDC.py +++ b/examples/daSalome/test005_ADAO_scripts_for_JDC.py @@ -1,5 +1,5 @@ #-*-coding:iso-8859-1-*- -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/test006_Observers_Observation_Operator.py b/examples/daSalome/test006_Observers_Observation_Operator.py index 27fd985..3c1689a 100644 --- a/examples/daSalome/test006_Observers_Observation_Operator.py +++ b/examples/daSalome/test006_Observers_Observation_Operator.py @@ -1,5 +1,5 @@ #-*-coding:iso-8859-1-*- -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/test006_Observers_init.py b/examples/daSalome/test006_Observers_init.py index 419c3ad..10bb4a9 100644 --- a/examples/daSalome/test006_Observers_init.py +++ b/examples/daSalome/test006_Observers_init.py @@ -1,5 +1,5 @@ #-*-coding:iso-8859-1-*- -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSalome/test006_Observers_var.py b/examples/daSalome/test006_Observers_var.py index a7ef03e..390045f 100644 --- a/examples/daSalome/test006_Observers_var.py +++ b/examples/daSalome/test006_Observers_var.py @@ -1,5 +1,5 @@ #-*-coding:iso-8859-1-*- -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Makefile.am b/examples/daSkeletons/External_data_definition_by_scripts/Makefile.am index 6c314f1..1755130 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Makefile.am +++ b/examples/daSkeletons/External_data_definition_by_scripts/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Physical_data_and_covariance_matrices.py b/examples/daSkeletons/External_data_definition_by_scripts/Physical_data_and_covariance_matrices.py index d328777..e461d41 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Physical_data_and_covariance_matrices.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Physical_data_and_covariance_matrices.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py b/examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py index 91e4e2f..29c40cc 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Physical_simulation_functions.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Script_AlgorithmParameters.py b/examples/daSkeletons/External_data_definition_by_scripts/Script_AlgorithmParameters.py index 9524602..68c7a93 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Script_AlgorithmParameters.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Script_AlgorithmParameters.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Script_BackgroundError_B.py b/examples/daSkeletons/External_data_definition_by_scripts/Script_BackgroundError_B.py index d27c967..8fed22f 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Script_BackgroundError_B.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Script_BackgroundError_B.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Script_Background_xb.py b/examples/daSkeletons/External_data_definition_by_scripts/Script_Background_xb.py index c664b5a..dd93495 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Script_Background_xb.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Script_Background_xb.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationError_R.py b/examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationError_R.py index 5cf2967..d92be4d 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationError_R.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationError_R.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationOperator_H.py b/examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationOperator_H.py index e5586e0..e631d2a 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationOperator_H.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Script_ObservationOperator_H.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Script_Observation_yo.py b/examples/daSkeletons/External_data_definition_by_scripts/Script_Observation_yo.py index 22245da..cebe2ec 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Script_Observation_yo.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Script_Observation_yo.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/External_data_definition_by_scripts/Script_UserPostAnalysis.py b/examples/daSkeletons/External_data_definition_by_scripts/Script_UserPostAnalysis.py index b810ca0..8863005 100644 --- a/examples/daSkeletons/External_data_definition_by_scripts/Script_UserPostAnalysis.py +++ b/examples/daSkeletons/External_data_definition_by_scripts/Script_UserPostAnalysis.py @@ -1,6 +1,6 @@ #-*-coding:iso-8859-1-*- # -# Copyright (C) 2008-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/examples/daSkeletons/Makefile.am b/examples/daSkeletons/Makefile.am index e1f99bb..a200655 100644 --- a/examples/daSkeletons/Makefile.am +++ b/examples/daSkeletons/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2014 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/idl/ADAO_COMPONENT.idl b/idl/ADAO_COMPONENT.idl index 2df2213..c7de796 100644 --- a/idl/ADAO_COMPONENT.idl +++ b/idl/ADAO_COMPONENT.idl @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2011 EDF R&D +// Copyright (C) 2008-2015 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 diff --git a/idl/Makefile.am b/idl/Makefile.am index 7410b1b..76ca19e 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2011 EDF R&D +# Copyright (C) 2008-2015 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 diff --git a/src/daComposant/daAlgorithms/4DVAR.py b/src/daComposant/daAlgorithms/4DVAR.py new file mode 100644 index 0000000..12bc9ac --- /dev/null +++ b/src/daComposant/daAlgorithms/4DVAR.py @@ -0,0 +1,329 @@ +#-*-coding:iso-8859-1-*- +# +# Copyright (C) 2008-2015 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 +# +# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D + +import logging +from daCore import BasicObjects +import numpy, scipy.optimize + +# ============================================================================== +class ElementaryAlgorithm(BasicObjects.Algorithm): + def __init__(self): + BasicObjects.Algorithm.__init__(self, "4DVAR") + self.defineRequiredParameter( + name = "ConstrainedBy", + default = "EstimateProjection", + typecast = str, + message = "Prise en compte des contraintes", + listval = ["EstimateProjection"], + ) + self.defineRequiredParameter( + name = "EstimationOf", + default = "State", + typecast = str, + message = "Estimation d'etat ou de parametres", + listval = ["State", "Parameters"], + ) + self.defineRequiredParameter( + name = "Minimizer", + default = "LBFGSB", + typecast = str, + message = "Minimiseur utilisé", + listval = ["LBFGSB","TNC", "CG", "NCG", "BFGS"], + ) + self.defineRequiredParameter( + name = "MaximumNumberOfSteps", + default = 15000, + typecast = int, + message = "Nombre maximal de pas d'optimisation", + minval = -1, + ) + self.defineRequiredParameter( + name = "CostDecrementTolerance", + default = 1.e-7, + typecast = float, + message = "Diminution relative minimale du cout lors de l'arrêt", + ) + self.defineRequiredParameter( + name = "ProjectedGradientTolerance", + default = -1, + typecast = float, + message = "Maximum des composantes du gradient projeté lors de l'arrêt", + minval = -1, + ) + self.defineRequiredParameter( + name = "GradientNormTolerance", + default = 1.e-05, + typecast = float, + message = "Maximum des composantes du gradient lors de l'arrêt", + ) + self.defineRequiredParameter( + name = "StoreInternalVariables", + default = False, + typecast = bool, + message = "Stockage des variables internes ou intermédiaires du calcul", + ) + self.defineRequiredParameter( + name = "StoreSupplementaryCalculations", + default = [], + typecast = tuple, + message = "Liste de calculs supplémentaires à stocker et/ou effectuer", + listval = ["BMA", "CurrentState", "CostFunctionJ"] + ) + self.defineRequiredParameter( # Pas de type + name = "Bounds", + message = "Liste des valeurs de bornes", + ) + + def run(self, Xb=None, Y=None, U=None, HO=None, EM=None, CM=None, R=None, B=None, Q=None, Parameters=None): + self._pre_run() + if logging.getLogger().level < logging.WARNING: + self.__iprint, self.__disp = 1, 1 + self.__message = scipy.optimize.tnc.MSG_ALL + else: + self.__iprint, self.__disp = -1, 0 + self.__message = scipy.optimize.tnc.MSG_NONE + # + # Paramètres de pilotage + # ---------------------- + self.setParameters(Parameters) + # + if self._parameters.has_key("Bounds") and (type(self._parameters["Bounds"]) is type([]) or type(self._parameters["Bounds"]) is type(())) and (len(self._parameters["Bounds"]) > 0): + Bounds = self._parameters["Bounds"] + logging.debug("%s Prise en compte des bornes effectuee"%(self._name,)) + else: + Bounds = None + # + # Correction pour pallier a un bug de TNC sur le retour du Minimum + if self._parameters.has_key("Minimizer") == "TNC": + self.setParameterValue("StoreInternalVariables",True) + # + # Opérateurs + # ---------- + Hm = HO["Direct"].appliedControledFormTo + # + Mm = EM["Direct"].appliedControledFormTo + # + if CM is not None and CM.has_key("Tangent") and U is not None: + Cm = CM["Tangent"].asMatrix(Xb) + else: + Cm = None + # + def Un(_step): + if U is not None: + if hasattr(U,"store") and 1<=_step