Salome HOME
Code and documentation update for ControledFunctionTest
[modules/adao.git] / test / test6704 / Doc_TUI_Exemple_03_en_multifonction.py
index 184a7b76810c6664b0f04f78a328cfcfbc7fb342..c492d51b5698f1ddf9a3fb0f115d2d5a8b84d686 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2008-2022 EDF R&D
+# Copyright (C) 2008-2023 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
@@ -40,7 +40,7 @@ def simulation(x):
     "Fonction de simulation H pour effectuer Y=H(X)"
     import numpy
     __x = numpy.ravel(x)
-    __H = numpy.diag([1.,2.,3.])
+    __H = numpy.array([[1,0,0],[0,2,0],[0,0,3],[1,2,3]])
     return __H @ __x
 #
 def multisimulation( xserie ):
@@ -82,7 +82,7 @@ class Test_Adao(unittest.TestCase):
             Algorithm = '3DVAR',
             Parameters = {
                 "Bounds":Bounds,
-                "MaximumNumberOfSteps":100,
+                "MaximumNumberOfIterations":100,
                 "StoreSupplementaryCalculations":[
                     "CostFunctionJ",
                     "CurrentState",
@@ -123,8 +123,6 @@ class Test_Adao(unittest.TestCase):
         print("  L'écart absolu maximal obtenu lors du test est de %.2e."%ecart)
         print("  Les résultats obtenus sont corrects.")
         print("")
-        #
-        return xa
 
 # ==============================================================================
 def assertAlmostEqualArrays(first, second, places=7, msg=None, delta=None):