Salome HOME
Documentation corrections and update
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 24 May 2024 18:58:10 +0000 (20:58 +0200)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 24 May 2024 18:58:10 +0000 (20:58 +0200)
26 files changed:
doc/en/examples.rst
doc/en/ref_algorithm_InterpolationByReducedModelTest.rst [new file with mode: 0644]
doc/en/ref_algorithm_ReducedModelingTest.rst
doc/en/reference.rst
doc/en/scripts/simple_ReducedModelingTest1.png [new file with mode: 0644]
doc/en/scripts/simple_ReducedModelingTest1.py [new file with mode: 0644]
doc/en/scripts/simple_ReducedModelingTest1.res [new file with mode: 0644]
doc/en/scripts/simple_ReducedModelingTest1.rst [new file with mode: 0644]
doc/en/snippets/MeasurementLocations.rst [new file with mode: 0644]
doc/en/snippets/ModuleValidation.rst
doc/en/snippets/NoConditionalOutput.rst [new file with mode: 0644]
doc/fr/examples.rst
doc/fr/ref_algorithm_InterpolationByReducedModelTest.rst [new file with mode: 0644]
doc/fr/ref_algorithm_ReducedModelingTest.rst
doc/fr/reference.rst
doc/fr/scripts/simple_ReducedModelingTest1.png [new file with mode: 0644]
doc/fr/scripts/simple_ReducedModelingTest1.py [new file with mode: 0644]
doc/fr/scripts/simple_ReducedModelingTest1.res [new file with mode: 0644]
doc/fr/scripts/simple_ReducedModelingTest1.rst [new file with mode: 0644]
doc/fr/snippets/MeasurementLocations.rst [new file with mode: 0644]
doc/fr/snippets/ModuleValidation.rst
doc/fr/snippets/NoConditionalOutput.rst [new file with mode: 0644]
src/daComposant/daAlgorithms/Atoms/ecw2ukf.py
src/daComposant/daAlgorithms/Atoms/ecwukf.py
src/daComposant/daAlgorithms/ReducedModelingTest.py
src/daComposant/daCore/NumericObjects.py

index 196d7d5fba872fcd00973989f2f0acd11ad2365a..6cd8b443eb61b64cfbb4b03554282d14eedef24a 100644 (file)
@@ -60,6 +60,7 @@ Checking algorithms uses
 #. :ref:`Examples with the "FunctionTest" check<section_ref_algorithm_FunctionTest_examples>`
 #. :ref:`Examples with the "ObservationSimulationComparisonTest" check<section_ref_algorithm_ObservationSimulationComparisonTest_examples>`
 #. :ref:`Examples with the "ParallelFunctionTest" check<section_ref_algorithm_ParallelFunctionTest_examples>`
+#. :ref:`Examples with the "ReducedModelingTest" check<section_ref_algorithm_ReducedModelingTest_examples>`
 
 Dedicated tasks or study oriented cases uses
 --------------------------------------------
diff --git a/doc/en/ref_algorithm_InterpolationByReducedModelTest.rst b/doc/en/ref_algorithm_InterpolationByReducedModelTest.rst
new file mode 100644 (file)
index 0000000..f6c55eb
--- /dev/null
@@ -0,0 +1,89 @@
+..
+   Copyright (C) 2008-2024 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, or (at your option) any later version.
+
+   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
+
+.. index:: single: InterpolationByReducedModelTest
+.. _section_ref_algorithm_InterpolationByReducedModelTest:
+
+Checking algorithm "*InterpolationByReducedModelTest*"
+------------------------------------------------------
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo01.rst
+
+This algorithm provides a simple way of analyzing the quality of the empirical
+state interpolation obtained using a reduced basis, using measurements at
+specific points.
+
+The results displayed by default are simple statistics related to the
+normalized errors of interpolation with a reduced basis. The test uses a
+reduced base and a set of optimal measurement positions, and uses
+pseudo-measurements from each complete state (“*snapshot*”) included in the
+given test set.
+
+Please note: to be consistent, this test must use the same mathematical norm as
+that used to construct the reduced basis. As the norm is chosen by the user
+when defining the test, the norm used to construct the reduced basis must be
+verified.
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo12.rst
+
+.. include:: snippets/FeaturePropDerivativeFree.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo02.rst
+
+.. include:: snippets/EnsembleOfSnapshots.rst
+
+.. include:: snippets/MeasurementLocations.rst
+
+.. include:: snippets/ReducedBasis.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo03Chck.rst
+
+.. include:: snippets/ErrorNorm.rst
+
+.. include:: snippets/NumberOfPrintedDigits.rst
+
+.. include:: snippets/ShowElementarySummary.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo04.rst
+
+.. include:: snippets/NoUnconditionalOutput.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo05.rst
+
+.. include:: snippets/NoConditionalOutput.rst
+
+.. ------------------------------------ ..
+.. _section_ref_algorithm_InterpolationByReducedModelTest_examples:
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo06.rst
+
+- :ref:`section_ref_algorithm_InterpolationByReducedModelTask`
+- :ref:`section_ref_algorithm_MeasurementsOptimalPositioningTask`
+- :ref:`section_ref_algorithm_ReducedModelingTest`
index a5099345b86c87c5677ecc65ba2edd51c96b499e..6fcce11c9cfebf6012b79745089c742aa79d3525 100644 (file)
@@ -126,6 +126,26 @@ StoreSupplementaryCalculations
 .. ------------------------------------ ..
 .. _section_ref_algorithm_ReducedModelingTest_examples:
 
+.. include:: snippets/Header2Algo09.rst
+
+.. --------- ..
+.. include:: scripts/simple_ReducedModelingTest1.rst
+
+.. literalinclude:: scripts/simple_ReducedModelingTest1.py
+
+.. include:: snippets/Header2Algo10.rst
+
+.. literalinclude:: scripts/simple_ReducedModelingTest1.res
+    :language: none
+
+.. include:: snippets/Header2Algo11.rst
+
+.. _simple_ReducedModelingTest1:
+.. image:: scripts/simple_ReducedModelingTest1.png
+  :align: center
+  :width: 90%
+
+.. ------------------------------------ ..
 .. include:: snippets/Header2Algo06.rst
 
 - :ref:`section_ref_algorithm_FunctionTest`
index 6b7b673e11d91f9cf77d719971444132c8dbfa9a..d0be7a1a003d4bc0cb5d8af5eacbdfe259a2271c 100644 (file)
@@ -142,6 +142,7 @@ providing :ref:`section_theory`.
    ref_algorithm_FunctionTest
    ref_algorithm_GradientTest
    ref_algorithm_InputValuesTest
+   ref_algorithm_InterpolationByReducedModelTest
    ref_algorithm_LinearityTest
    ref_algorithm_LocalSensitivityTest
    ref_algorithm_ObservationSimulationComparisonTest
diff --git a/doc/en/scripts/simple_ReducedModelingTest1.png b/doc/en/scripts/simple_ReducedModelingTest1.png
new file mode 100644 (file)
index 0000000..03662e7
Binary files /dev/null and b/doc/en/scripts/simple_ReducedModelingTest1.png differ
diff --git a/doc/en/scripts/simple_ReducedModelingTest1.py b/doc/en/scripts/simple_ReducedModelingTest1.py
new file mode 100644 (file)
index 0000000..a8f9bda
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+#
+import numpy
+from adao import adaoBuilder
+numpy.random.seed(123456789)
+#
+dimension = 100
+nbsnapshots = 15
+Ensemble = numpy.empty((dimension,2*nbsnapshots))
+for i in range(nbsnapshots):
+    Ensemble[:,i] = numpy.sin((i+1)*numpy.arange(dimension))
+Ensemble[:,nbsnapshots:2*nbsnapshots] = Ensemble[:,:nbsnapshots]
+#
+case = adaoBuilder.New()
+case.setAlgorithmParameters(
+    Algorithm = 'ReducedModelingTest',
+    Parameters = {
+        "EnsembleOfSnapshots":Ensemble,
+        "StoreSupplementaryCalculations":["Residus","SingularValues"],
+        "PlotAndSave":True,
+        "ResultFile":"simple_ReducedModelingTest1.png",
+        }
+    )
+case.execute()
diff --git a/doc/en/scripts/simple_ReducedModelingTest1.res b/doc/en/scripts/simple_ReducedModelingTest1.res
new file mode 100644 (file)
index 0000000..119f6a7
--- /dev/null
@@ -0,0 +1,86 @@
+
+     REDUCEDMODELINGTEST
+     ===================
+
+     This test allows to analyze the characteristics of the collection of
+     states from a reduction point of view. Using an SVD, it measures how
+     the information decreases with the number of singular values, either
+     as values or, with a statistical point of view, as remaining variance.
+
+===> Information before launching:
+     -----------------------------
+
+     Characteristics of input data:
+       State dimension................: 100
+       Number of snapshots to test....: 30
+
+===> Summary of the 5 first singular values:
+     ---------------------------------------
+
+     Singular values σ:
+       σ[1] = 1.03513e+01
+       σ[2] = 1.03509e+01
+       σ[3] = 1.03258e+01
+       σ[4] = 1.02436e+01
+       σ[5] = 1.02386e+01
+
+     Singular values σ divided by the first one σ[1]:
+       σ[1] / σ[1] = 1.00000e+00
+       σ[2] / σ[1] = 9.99962e-01
+       σ[3] / σ[1] = 9.97533e-01
+       σ[4] / σ[1] = 9.89589e-01
+       σ[5] / σ[1] = 9.89104e-01
+
+===> Ordered singular values and remaining variance:
+     -----------------------------------------------
+
+     -------------------------------------------------------------------------
+        i  | Singular value σ |        σ[i]/σ[1] | Variance: part, remaining
+     -------------------------------------------------------------------------
+       00  |      1.03513e+01 |      1.00000e+00 |            7% ,    92.8%
+       01  |      1.03509e+01 |      9.99962e-01 |            7% ,    85.6%
+       02  |      1.03258e+01 |      9.97533e-01 |            7% ,    78.5%
+       03  |      1.02436e+01 |      9.89589e-01 |            7% ,    71.5%
+       04  |      1.02386e+01 |      9.89104e-01 |            7% ,    64.4%
+       05  |      1.01050e+01 |      9.76200e-01 |            6% ,    57.6%
+       06  |      9.99948e+00 |      9.66009e-01 |            6% ,    50.9%
+       07  |      9.99643e+00 |      9.65714e-01 |            6% ,    44.2%
+       08  |      9.98375e+00 |      9.64489e-01 |            6% ,    37.5%
+       09  |      9.90828e+00 |      9.57198e-01 |            6% ,    31.0%
+       10  |      9.90691e+00 |      9.57066e-01 |            6% ,    24.4%
+       11  |      9.64803e+00 |      9.32056e-01 |            6% ,    18.1%
+       12  |      9.62587e+00 |      9.29916e-01 |            6% ,    11.9%
+       13  |      9.62344e+00 |      9.29681e-01 |            6% ,     5.7%
+       14  |      9.25446e+00 |      8.94035e-01 |            5% ,     0.0%
+       15  |      2.41400e-15 |      2.33206e-16 |            0% ,     0.0%
+       16  |      1.94612e-15 |      1.88006e-16 |            0% ,     0.0%
+       17  |      1.61527e-15 |      1.56044e-16 |            0% ,     0.0%
+       18  |      1.54864e-15 |      1.49608e-16 |            0% ,     0.0%
+       19  |      1.35243e-15 |      1.30653e-16 |            0% ,     0.0%
+       20  |      1.11119e-15 |      1.07347e-16 |            0% ,     0.0%
+       21  |      1.05852e-15 |      1.02260e-16 |            0% ,     0.0%
+       22  |      9.68764e-16 |      9.35883e-17 |            0% ,     0.0%
+       23  |      8.82878e-16 |      8.52912e-17 |            0% ,     0.0%
+       24  |      6.53296e-16 |      6.31122e-17 |            0% ,     0.0%
+       25  |      5.21872e-16 |      5.04159e-17 |            0% ,     0.0%
+       26  |      4.98146e-16 |      4.81238e-17 |            0% ,     0.0%
+       27  |      3.74898e-16 |      3.62173e-17 |            0% ,     0.0%
+       28  |      2.79953e-16 |      2.70452e-17 |            0% ,     0.0%
+       29  |      1.99083e-16 |      1.92326e-17 |            0% ,     0.0%
+     -------------------------------------------------------------------------
+
+===> Summary of variance cut-off:
+     ----------------------------
+     Representing more than 90%    of variance requires at least 14 mode(s).
+     Representing more than 99%    of variance requires at least 15 mode(s).
+     Representing more than 99.9%  of variance requires at least 15 mode(s).
+     Representing more than 99.99% of variance requires at least 15 mode(s).
+
+     Plot and save results in a file named "simple_ReducedModelingTest1.png"
+
+     ---------------------------------------------------------------------------
+
+     End of the "REDUCEDMODELINGTEST" verification
+
+     ---------------------------------------------------------------------------
+
diff --git a/doc/en/scripts/simple_ReducedModelingTest1.rst b/doc/en/scripts/simple_ReducedModelingTest1.rst
new file mode 100644 (file)
index 0000000..0f4ebfb
--- /dev/null
@@ -0,0 +1,13 @@
+.. index:: single: ReducedModelingTest (exemple)
+
+First example
+.............
+
+This example describes the reducibility characteristics of the set of states
+(“*snapshots*”) under study. The set considered is first composed of 15 sine
+calculations on a sequence of integers (so the space generated by the snapshots
+is linearly non-decomposable) and these 15 snapshots are then duplicated once
+to obtain a reduced space of size exactly 15 (since the last 15 are identical
+to the first 15). All the variance is thus explained by the first 15 modes,
+numbered from 0 to 14, and the following singular values are close to numerical
+zero.
diff --git a/doc/en/snippets/MeasurementLocations.rst b/doc/en/snippets/MeasurementLocations.rst
new file mode 100644 (file)
index 0000000..0fb520f
--- /dev/null
@@ -0,0 +1,13 @@
+.. index:: single: MeasurementLocations
+
+MeasurementLocations
+  *Integer series*. This series contains the indices of the positions at which
+  a measurement is required to support a reduced basis interpolation, according
+  to the order of the variables of a state vector arbitrarily considered in
+  one-dimensional form, and in the same order as the information contained in
+  the vectors of the reduced basis.
+
+  This is similar to the set of optimal positions or points resulting from a
+  :ref:`section_ref_algorithm_MeasurementsOptimalPositioningTask`, or the set
+  of positions required to run a
+  :ref:`section_ref_algorithm_InterpolationByReducedModelTask`.
index be792219623b5e908e93465a07cb9e91942b4f05..4ef9258b4b0b71ab51b704fa61618d4ced9074c4 100644 (file)
@@ -13,7 +13,7 @@ purposes only, knowing that, in case of doubt, the SALOME version sheet
    EFICAS,     |release|
    SALOME,     |release|
    Python,     3.9.2
-   Numpy,      1.19.5
+   Numpy,      1.20.3
    Scipy,      1.6.0
    MatplotLib, 3.3.4
    Gnuplot,    1.8
diff --git a/doc/en/snippets/NoConditionalOutput.rst b/doc/en/snippets/NoConditionalOutput.rst
new file mode 100644 (file)
index 0000000..6bd824c
--- /dev/null
@@ -0,0 +1 @@
+    *None*
index f12f2afed4cc50219813fa7849ee72668ea21b18..076f5f3dca8d0bd592e36fb657f084c2d76363ee 100644 (file)
@@ -60,6 +60,7 @@ Utilisations d'algorithmes de vérification
 #. :ref:`Exemples de vérification avec "FunctionTest"<section_ref_algorithm_FunctionTest_examples>`
 #. :ref:`Exemples de vérification avec "ObservationSimulationComparisonTest"<section_ref_algorithm_ObservationSimulationComparisonTest_examples>`
 #. :ref:`Exemples de vérification avec "ParallelFunctionTest"<section_ref_algorithm_ParallelFunctionTest_examples>`
+#. :ref:`Exemples de vérification avec "ReducedModelingTest"<section_ref_algorithm_ReducedModelingTest_examples>`
 
 Utilisations d'algorithmes orientés tâches ou études dédiées
 ------------------------------------------------------------
diff --git a/doc/fr/ref_algorithm_InterpolationByReducedModelTest.rst b/doc/fr/ref_algorithm_InterpolationByReducedModelTest.rst
new file mode 100644 (file)
index 0000000..1b4831e
--- /dev/null
@@ -0,0 +1,89 @@
+..
+   Copyright (C) 2008-2024 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, or (at your option) any later version.
+
+   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
+
+.. index:: single: InterpolationByReducedModelTest
+.. _section_ref_algorithm_InterpolationByReducedModelTest:
+
+Algorithme de vérification "*InterpolationByReducedModelTest*"
+--------------------------------------------------------------
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo01.rst
+
+Cet algorithme permet d'analyser de manière simple la qualité de
+l'interpolation empirique des états obtenue par une base réduite, en utilisant
+des mesures en des points précis.
+
+Les résultats affichés par défaut sont des statistiques simples liées aux
+erreurs normalisées de l'interpolation avec une base réduite. Le test utilise
+une base réduite et un ensemble de positions de mesures optimales, et utilise
+des pseudo-mesures provenant de chaque état complet ("*snapshot*") inclus dans
+l'ensemble de test donné.
+
+Attention : pour être cohérent, ce test doit utiliser la même norme
+mathématique que celle utilisée pour construire la base réduite. La norme étant
+choisie par l'utilisateur lors de la définition du test, il faut vérifier la
+norme de construction de la base réduite.
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo12.rst
+
+.. include:: snippets/FeaturePropDerivativeFree.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo02.rst
+
+.. include:: snippets/EnsembleOfSnapshots.rst
+
+.. include:: snippets/MeasurementLocations.rst
+
+.. include:: snippets/ReducedBasis.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo03Chck.rst
+
+.. include:: snippets/ErrorNorm.rst
+
+.. include:: snippets/NumberOfPrintedDigits.rst
+
+.. include:: snippets/ShowElementarySummary.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo04.rst
+
+.. include:: snippets/NoUnconditionalOutput.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo05.rst
+
+.. include:: snippets/NoConditionalOutput.rst
+
+.. ------------------------------------ ..
+.. _section_ref_algorithm_InterpolationByReducedModelTest_examples:
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo06.rst
+
+- :ref:`section_ref_algorithm_InterpolationByReducedModelTask`
+- :ref:`section_ref_algorithm_MeasurementsOptimalPositioningTask`
+- :ref:`section_ref_algorithm_ReducedModelingTest`
index de02d1841be4430f6c8917a6cc7c2f8154581e9d..431e5b19cb55ad41edc66ae61e19bd6895a4e32a 100644 (file)
@@ -128,6 +128,26 @@ StoreSupplementaryCalculations
 .. ------------------------------------ ..
 .. _section_ref_algorithm_ReducedModelingTest_examples:
 
+.. include:: snippets/Header2Algo09.rst
+
+.. --------- ..
+.. include:: scripts/simple_ReducedModelingTest1.rst
+
+.. literalinclude:: scripts/simple_ReducedModelingTest1.py
+
+.. include:: snippets/Header2Algo10.rst
+
+.. literalinclude:: scripts/simple_ReducedModelingTest1.res
+    :language: none
+
+.. include:: snippets/Header2Algo11.rst
+
+.. _simple_ReducedModelingTest1:
+.. image:: scripts/simple_ReducedModelingTest1.png
+  :align: center
+  :width: 90%
+
+.. ------------------------------------ ..
 .. include:: snippets/Header2Algo06.rst
 
 - :ref:`section_ref_algorithm_FunctionTest`
index a703cfbc86998baca73ac7762ea1b7663b53542f..45640144ae9d01f65a92dfce99966a63598241c2 100644 (file)
@@ -144,6 +144,7 @@ section générale donnant :ref:`section_theory`.
    ref_algorithm_FunctionTest
    ref_algorithm_GradientTest
    ref_algorithm_InputValuesTest
+   ref_algorithm_InterpolationByReducedModelTest
    ref_algorithm_LinearityTest
    ref_algorithm_LocalSensitivityTest
    ref_algorithm_ObservationSimulationComparisonTest
diff --git a/doc/fr/scripts/simple_ReducedModelingTest1.png b/doc/fr/scripts/simple_ReducedModelingTest1.png
new file mode 100644 (file)
index 0000000..03662e7
Binary files /dev/null and b/doc/fr/scripts/simple_ReducedModelingTest1.png differ
diff --git a/doc/fr/scripts/simple_ReducedModelingTest1.py b/doc/fr/scripts/simple_ReducedModelingTest1.py
new file mode 100644 (file)
index 0000000..a8f9bda
--- /dev/null
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+#
+import numpy
+from adao import adaoBuilder
+numpy.random.seed(123456789)
+#
+dimension = 100
+nbsnapshots = 15
+Ensemble = numpy.empty((dimension,2*nbsnapshots))
+for i in range(nbsnapshots):
+    Ensemble[:,i] = numpy.sin((i+1)*numpy.arange(dimension))
+Ensemble[:,nbsnapshots:2*nbsnapshots] = Ensemble[:,:nbsnapshots]
+#
+case = adaoBuilder.New()
+case.setAlgorithmParameters(
+    Algorithm = 'ReducedModelingTest',
+    Parameters = {
+        "EnsembleOfSnapshots":Ensemble,
+        "StoreSupplementaryCalculations":["Residus","SingularValues"],
+        "PlotAndSave":True,
+        "ResultFile":"simple_ReducedModelingTest1.png",
+        }
+    )
+case.execute()
diff --git a/doc/fr/scripts/simple_ReducedModelingTest1.res b/doc/fr/scripts/simple_ReducedModelingTest1.res
new file mode 100644 (file)
index 0000000..119f6a7
--- /dev/null
@@ -0,0 +1,86 @@
+
+     REDUCEDMODELINGTEST
+     ===================
+
+     This test allows to analyze the characteristics of the collection of
+     states from a reduction point of view. Using an SVD, it measures how
+     the information decreases with the number of singular values, either
+     as values or, with a statistical point of view, as remaining variance.
+
+===> Information before launching:
+     -----------------------------
+
+     Characteristics of input data:
+       State dimension................: 100
+       Number of snapshots to test....: 30
+
+===> Summary of the 5 first singular values:
+     ---------------------------------------
+
+     Singular values σ:
+       σ[1] = 1.03513e+01
+       σ[2] = 1.03509e+01
+       σ[3] = 1.03258e+01
+       σ[4] = 1.02436e+01
+       σ[5] = 1.02386e+01
+
+     Singular values σ divided by the first one σ[1]:
+       σ[1] / σ[1] = 1.00000e+00
+       σ[2] / σ[1] = 9.99962e-01
+       σ[3] / σ[1] = 9.97533e-01
+       σ[4] / σ[1] = 9.89589e-01
+       σ[5] / σ[1] = 9.89104e-01
+
+===> Ordered singular values and remaining variance:
+     -----------------------------------------------
+
+     -------------------------------------------------------------------------
+        i  | Singular value σ |        σ[i]/σ[1] | Variance: part, remaining
+     -------------------------------------------------------------------------
+       00  |      1.03513e+01 |      1.00000e+00 |            7% ,    92.8%
+       01  |      1.03509e+01 |      9.99962e-01 |            7% ,    85.6%
+       02  |      1.03258e+01 |      9.97533e-01 |            7% ,    78.5%
+       03  |      1.02436e+01 |      9.89589e-01 |            7% ,    71.5%
+       04  |      1.02386e+01 |      9.89104e-01 |            7% ,    64.4%
+       05  |      1.01050e+01 |      9.76200e-01 |            6% ,    57.6%
+       06  |      9.99948e+00 |      9.66009e-01 |            6% ,    50.9%
+       07  |      9.99643e+00 |      9.65714e-01 |            6% ,    44.2%
+       08  |      9.98375e+00 |      9.64489e-01 |            6% ,    37.5%
+       09  |      9.90828e+00 |      9.57198e-01 |            6% ,    31.0%
+       10  |      9.90691e+00 |      9.57066e-01 |            6% ,    24.4%
+       11  |      9.64803e+00 |      9.32056e-01 |            6% ,    18.1%
+       12  |      9.62587e+00 |      9.29916e-01 |            6% ,    11.9%
+       13  |      9.62344e+00 |      9.29681e-01 |            6% ,     5.7%
+       14  |      9.25446e+00 |      8.94035e-01 |            5% ,     0.0%
+       15  |      2.41400e-15 |      2.33206e-16 |            0% ,     0.0%
+       16  |      1.94612e-15 |      1.88006e-16 |            0% ,     0.0%
+       17  |      1.61527e-15 |      1.56044e-16 |            0% ,     0.0%
+       18  |      1.54864e-15 |      1.49608e-16 |            0% ,     0.0%
+       19  |      1.35243e-15 |      1.30653e-16 |            0% ,     0.0%
+       20  |      1.11119e-15 |      1.07347e-16 |            0% ,     0.0%
+       21  |      1.05852e-15 |      1.02260e-16 |            0% ,     0.0%
+       22  |      9.68764e-16 |      9.35883e-17 |            0% ,     0.0%
+       23  |      8.82878e-16 |      8.52912e-17 |            0% ,     0.0%
+       24  |      6.53296e-16 |      6.31122e-17 |            0% ,     0.0%
+       25  |      5.21872e-16 |      5.04159e-17 |            0% ,     0.0%
+       26  |      4.98146e-16 |      4.81238e-17 |            0% ,     0.0%
+       27  |      3.74898e-16 |      3.62173e-17 |            0% ,     0.0%
+       28  |      2.79953e-16 |      2.70452e-17 |            0% ,     0.0%
+       29  |      1.99083e-16 |      1.92326e-17 |            0% ,     0.0%
+     -------------------------------------------------------------------------
+
+===> Summary of variance cut-off:
+     ----------------------------
+     Representing more than 90%    of variance requires at least 14 mode(s).
+     Representing more than 99%    of variance requires at least 15 mode(s).
+     Representing more than 99.9%  of variance requires at least 15 mode(s).
+     Representing more than 99.99% of variance requires at least 15 mode(s).
+
+     Plot and save results in a file named "simple_ReducedModelingTest1.png"
+
+     ---------------------------------------------------------------------------
+
+     End of the "REDUCEDMODELINGTEST" verification
+
+     ---------------------------------------------------------------------------
+
diff --git a/doc/fr/scripts/simple_ReducedModelingTest1.rst b/doc/fr/scripts/simple_ReducedModelingTest1.rst
new file mode 100644 (file)
index 0000000..f07c4eb
--- /dev/null
@@ -0,0 +1,13 @@
+.. index:: single: ReducedModelingTest (exemple)
+
+Premier exemple
+...............
+
+Cet exemple décrit les caractéristiques de réductibilité de l'ensemble d'états
+("*snapshots*") étudié. Cet ensemble considéré est d'abord composé de 15
+calculs de sinus sur un suite d'entiers (donc l'espace engendré par les
+snapshots est non décomposable linéairement) et ces 15 snapshots sont ensuite
+dupliqués une fois pour avoir un espace réduit de taille exactement 15 (puisque
+les 15 derniers sont identiques aux 15 premiers). La totalité de la variance
+est ainsi expliquée par les 15 premiers modes, numérotés de 0 à 14, et les
+valeurs singulières suivantes sont proches du zéro numérique.
diff --git a/doc/fr/snippets/MeasurementLocations.rst b/doc/fr/snippets/MeasurementLocations.rst
new file mode 100644 (file)
index 0000000..8e97457
--- /dev/null
@@ -0,0 +1,13 @@
+.. index:: single: MeasurementLocations
+
+MeasurementLocations
+  *Série d'entiers*. Cette série contient les indices des positions auxquelles
+  une mesure est requise pour accompagner une interpolation par base réduite,
+  selon l'ordre des variables d'un vecteur d'état considéré arbitrairement sous
+  forme unidimensionnelle, et dans le même ordre que les informations contenues
+  dans les vecteurs de la base réduite.
+
+  Elle est semblable à la série de positions ou points optimaux issue d'un
+  :ref:`section_ref_algorithm_MeasurementsOptimalPositioningTask`, ou la série
+  de positions nécessaires à exécuter un
+  :ref:`section_ref_algorithm_InterpolationByReducedModelTask`.
index d4dcb083b53ab461bd1b80b62fbf138c0ea7f686..55e2e0283adf0c6d08408464f0e096a27b41056e 100644 (file)
@@ -13,7 +13,7 @@ uniquement sachant que, en cas de doute, c'est la fiche de version de SALOME
    EFICAS,     |release|
    SALOME,     |release|
    Python,     3.9.2
-   Numpy,      1.19.5
+   Numpy,      1.20.3
    Scipy,      1.6.0
    MatplotLib, 3.3.4
    Gnuplot,    1.8
diff --git a/doc/fr/snippets/NoConditionalOutput.rst b/doc/fr/snippets/NoConditionalOutput.rst
new file mode 100644 (file)
index 0000000..7edf811
--- /dev/null
@@ -0,0 +1 @@
+    *Aucune*
index f935804c7e162d4720b7f2e6114365f9e7766199..e5ea58e12a738260122c46070a9135e4900e15e1 100644 (file)
@@ -101,9 +101,6 @@ def ecw2ukf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="UKF"):
         else:
             Un = None
         #
-        Hm = HO["Direct"].appliedControledFormTo
-        if selfA._parameters["EstimationOf"] == "State":
-            Mm = EM["Direct"].appliedControledFormTo
         if CM is not None and "Tangent" in CM and U is not None:
             Cm = CM["Tangent"].asMatrix(Xn)
         else:
@@ -118,6 +115,7 @@ def ecw2ukf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="UKF"):
                 Xnmu[:, point] = ApplyBounds( Xnmu[:, point], selfA._parameters["Bounds"] )
         #
         if selfA._parameters["EstimationOf"] == "State":
+            Mm = EM["Direct"].appliedControledFormTo
             XEnnmu = Mm( [(Xnmu[:, point].reshape((-1, 1)), Un) for point in range(nbSpts)],
                          argsAsSerie = True,
                          returnSerieAsArrayMatrix = True )
@@ -152,6 +150,7 @@ def ecw2ukf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="UKF"):
             for point in range(nbSpts):
                 Xnnmu[:, point] = ApplyBounds( Xnnmu[:, point], selfA._parameters["Bounds"] )
         #
+        Hm = HO["Direct"].appliedControledFormTo
         Ynnmu = Hm( [(Xnnmu[:, point], None) for point in range(nbSpts)],
                     argsAsSerie = True,
                     returnSerieAsArrayMatrix = True )
index 465168d076944f07e7505b78591e0970f5aaecb5..a100e8e3f98aa6cc00cb7875cb21ee9defde4ea2 100644 (file)
@@ -99,9 +99,6 @@ def ecwukf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="UKF"):
         else:
             Un = None
         #
-        Hm = HO["Direct"].appliedControledFormTo
-        if selfA._parameters["EstimationOf"] == "State":
-            Mm = EM["Direct"].appliedControledFormTo
         if CM is not None and "Tangent" in CM and U is not None:
             Cm = CM["Tangent"].asMatrix(Xn)
         else:
@@ -112,6 +109,7 @@ def ecwukf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="UKF"):
         nbSpts = SC.shape[1]
         #
         if selfA._parameters["EstimationOf"] == "State":
+            Mm = EM["Direct"].appliedControledFormTo
             XEnnmu = Mm( [(Xnmu[:, point].reshape((-1, 1)), Un) for point in range(nbSpts)],
                          argsAsSerie = True,
                          returnSerieAsArrayMatrix = True )
@@ -135,6 +133,7 @@ def ecwukf(selfA, Xb, Y, U, HO, EM, CM, R, B, Q, VariantM="UKF"):
         Pmndemi = numpy.real(scipy.linalg.sqrtm(Pmn))
         Xnnmu = Xhmn.reshape((-1, 1)) + Pmndemi @ SC
         #
+        Hm = HO["Direct"].appliedControledFormTo
         Ynnmu = Hm( [(Xnnmu[:, point], None) for point in range(nbSpts)],
                     argsAsSerie = True,
                     returnSerieAsArrayMatrix = True )
index 14536e03c5bffe13fa4a457f5a1ebd85f1813801..d94faf47357b1c75fa2f1de833f99e9c2ef0ef6c 100644 (file)
@@ -276,7 +276,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
             msgs += ("\n")
             msgs += (__flech + "Ordered singular values and remaining variance:\n")
             msgs += (__marge + "-----------------------------------------------\n")
-            __entete = ("  %" + str(__ordre) + "s  | %22s | %22s | Variance: part, remaining")%("i", "Singular value σ", "σ[i]/σ[1]")  # noqa: E501
+            __entete = ("  %" + str(__ordre) + "s  | %16s | %16s | Variance: part, remaining")%("i", "Singular value σ", "σ[i]/σ[1]")  # noqa: E501
             #
             __nbtirets = len(__entete) + 2
             msgs += "\n" + __marge + "-" * __nbtirets
@@ -291,7 +291,7 @@ class ElementaryAlgorithm(BasicObjects.Algorithm):
             vsinfo = 100 * __tisv[ns]
             rsinfo = max(100 * __qisv[ns], 0.)
             if __s:
-                msgs += (__marge + "  %0" + str(__ordre) + "i  | %22." + str(__p) + "e | %22." + str(__p) + "e |           %2i%s ,    %4.1f%s\n")%(ns, svalue, rvalue, vsinfo, "%", rsinfo, "%")  # noqa: E501
+                msgs += (__marge + "  %0" + str(__ordre) + "i  | %16." + str(__p) + "e | %16." + str(__p) + "e |           %2i%s ,    %4.1f%s\n")%(ns, svalue, rvalue, vsinfo, "%", rsinfo, "%")  # noqa: E501
             if rsinfo > 10:
                 cut1pd = ns + 2  # 10%
             if rsinfo > 1:
index cafe15d95abe94f76ee6fb794f8ad2c362717152..dc72f85503c6b3f5592fb7e5cc62f0cfb133df82 100644 (file)
@@ -1503,12 +1503,11 @@ def multiXOsteps(
             if __CovForecast:
                 Mt = EM["Tangent"].asMatrix(Xn)
                 Mt = Mt.reshape(Xn.size, Xn.size)  # ADAO & check shape
-            if __CovForecast:
                 Ma = EM["Adjoint"].asMatrix(Xn)
                 Ma = Ma.reshape(Xn.size, Xn.size)  # ADAO & check shape
                 Pn_predicted = Q + Mt @ (Pn @ Ma)
-            M  = EM["Direct"].appliedControledFormTo
-            Xn_predicted = M( (Xn, Un) ).reshape((-1, 1))
+            Mm = EM["Direct"].appliedControledFormTo
+            Xn_predicted = Mm( (Xn, Un) ).reshape((-1, 1))
             if CM is not None and "Tangent" in CM and Un is not None:  # Attention : si Cm est aussi dans M, doublon !
                 Cm = CM["Tangent"].asMatrix(Xn_predicted)
                 Cm = Cm.reshape(Xn.size, Un.size)  # ADAO & check shape