Salome HOME
Documentation and code update for EOSG
authorJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 20 Jan 2023 19:11:57 +0000 (20:11 +0100)
committerJean-Philippe ARGAUD <jean-philippe.argaud@edf.fr>
Fri, 20 Jan 2023 19:11:57 +0000 (20:11 +0100)
13 files changed:
doc/en/ref_algorithm_EnsembleOfSimulationGenerationTask.rst [new file with mode: 0644]
doc/en/ref_algorithm_FunctionTest.rst
doc/en/ref_algorithm_MeasurementsOptimalPositioningTask.rst
doc/en/ref_algorithm_ParallelFunctionTest.rst
doc/en/ref_algorithm_SamplingTest.rst
doc/en/reference.rst
doc/fr/ref_algorithm_EnsembleOfSimulationGenerationTask.rst [new file with mode: 0644]
doc/fr/ref_algorithm_FunctionTest.rst
doc/fr/ref_algorithm_MeasurementsOptimalPositioningTask.rst
doc/fr/ref_algorithm_ParallelFunctionTest.rst
doc/fr/ref_algorithm_SamplingTest.rst
doc/fr/reference.rst
src/daComposant/daAlgorithms/EnsembleOfSimulationGenerationTask.py [new file with mode: 0644]

diff --git a/doc/en/ref_algorithm_EnsembleOfSimulationGenerationTask.rst b/doc/en/ref_algorithm_EnsembleOfSimulationGenerationTask.rst
new file mode 100644 (file)
index 0000000..1624c1f
--- /dev/null
@@ -0,0 +1,132 @@
+..
+   Copyright (C) 2008-2023 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: EnsembleOfSimulationGenerationTask
+.. index:: single: Génération d'ensemble de simulations
+.. index:: single: Ensemble of simulations
+.. index:: single: Ensemble of snapshots
+.. index:: single: Simulations (Ensemble)
+.. index:: single: Snapshots (Ensemble)
+.. _section_ref_algorithm_EnsembleOfSimulationGenerationTask:
+
+Task algorithm "*EnsembleOfSimulationGenerationTask*"
+-----------------------------------------------------
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo00.rst
+
+.. warning::
+
+  This algorithm is only available in textual user interface (TUI) and not in
+  graphical user interface (GUI).
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo01.rst
+
+This algorithm allows to generate a set of results, of simulation or
+observation type, using the :math:`H` operator for a design of experiment of
+the :math:`\mathbf{x}` parametric state space. The result of this algorithm is
+a homogeneous collection of simulated vectors (available using the storable
+variable "*EnsembleOfSimulations*") corresponding directly to the chosen
+homogeneous collection of state vectors (available using the storable variable
+"*EnsembleOfStates*").
+
+The sampling of the states :math:`\mathbf{x}` can be given explicitly or under
+form of hyper-cubes, explicit or sampled according to classic distributions.
+Beware of the size of the hyper-cube (and then to the number of computations)
+that can be reached, it can grow quickly to be quite large.
+
+To be visible by the user while reducing the risk of storage difficulties, the
+results of sampling or simulations has to be **explicitly** asked for. One use
+for that, on the desired variable, the final saving through
+"*UserPostAnalysis*" or the treatment during the calculation by "*observer*".
+
+The results obtained with this algorithm can be used to feed an
+:ref:`section_ref_algorithm_MeasurementsOptimalPositioningTask`. In a
+complementary way, and if the goal is to evaluate the calculation-measurement
+error, an :ref:`section_ref_algorithm_SamplingTest` uses the same sampling
+commands to establish a set of error functional values :math:`J` from
+observations :math:`\mathbf{y}^o`.
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo02.rst
+
+.. include:: snippets/CheckingPoint.rst
+
+.. include:: snippets/ObservationOperator.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo03Task.rst
+
+.. include:: snippets/SampleAsExplicitHyperCube.rst
+
+.. include:: snippets/SampleAsIndependantRandomVariables.rst
+
+.. include:: snippets/SampleAsMinMaxStepHyperCube.rst
+
+.. include:: snippets/SampleAsnUplet.rst
+
+.. include:: snippets/SetDebug.rst
+
+.. include:: snippets/SetSeed.rst
+
+StoreSupplementaryCalculations
+  .. index:: single: StoreSupplementaryCalculations
+
+  *List of names*. This list indicates the names of the supplementary
+  variables, that can be available during or at the end of the algorithm, if
+  they are initially required by the user. Their avalability involves,
+  potentially, costly calculations or memory consumptions. The default is then
+  a void list, none of these variables being calculated and stored by default
+  (excepted the unconditionnal variables). The possible names are in the
+  following list (the detailed description of each named variable is given in
+  the following part of this specific algorithmic documentation, in the
+  sub-section "*Information and variables available at the end of the
+  algorithm*"): [
+  "EnsembleOfSimulations",
+  "EnsembleOfStates",
+  ].
+
+  Example :
+  ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo04.rst
+
+.. include:: snippets/EnsembleOfSimulations.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo05.rst
+
+.. include:: snippets/EnsembleOfSimulations.rst
+
+.. include:: snippets/EnsembleOfStates.rst
+
+.. ------------------------------------ ..
+.. _section_ref_algorithm_EnsembleOfSimulationGenerationTask_examples:
+.. include:: snippets/Header2Algo06.rst
+
+- :ref:`section_ref_algorithm_FunctionTest`
+- :ref:`section_ref_algorithm_ParallelFunctionTest`
+- :ref:`section_ref_algorithm_MeasurementsOptimalPositioningTask`
+
index 9fe8beaefda505c47b865219f8966b92de301267..dee296928c03ed9f3d7b8aa7339bf9ae59bee876 100644 (file)
@@ -122,3 +122,4 @@ StoreSupplementaryCalculations
 - :ref:`section_ref_algorithm_InputValuesTest`
 - :ref:`section_ref_algorithm_LinearityTest`
 - :ref:`section_ref_algorithm_ParallelFunctionTest`
+- :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`
index fce8a72fd5dfcb6b275f463f3e418b0cc8c9ea70..a944d833bc98b3d0f478abd73c9229948357715f 100644 (file)
@@ -50,22 +50,24 @@ This algorithm provides optimal positioning of measurement points by an EIM
 iterative greedy way, from a pre-existing set of state vectors (usually called
 "snapshots" in reduced basis methodology) or obtained by a direct simulation
 during the algorithm. Each of these state vectors are usually (but not
-necessarily) the result :math:`\mathbf{y}` of a simulation :math:`H` for a
-given set of parameters :math:`\mathbf{x}`.
+necessarily) the result :math:`\mathbf{y}` of a simulation or an observation
+using the operator :math:`H` for a given set of parameters :math:`\mathbf{x}`.
 
 There are two ways to use this algorithm:
 
 #. In its simplest use, if the set of state vectors is pre-existing, it is only
-   necessary to provide it by the algorithm option "*EnsembleOfSnapshots*".
+   necessary to provide it by the algorithm option "*EnsembleOfSnapshots*". It
+   is for example the case when set of states has been generated by an
+   :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`.
 #. If the set of state vectors is to be obtained by simulations during the
-   course of the algorithm, then one must provide the :math:`H` simulation
-   operator and the parametric :math:`\mathbf{x}` state space design of
-   experiments.
+   course of the algorithm, then one must provide the :math:`H` simulation or
+   observation operator and the parametric :math:`\mathbf{x}` state space
+   design of experiments.
 
-The sample of states :math:`\mathbf{x}` can be provided explicitly or in the
-form of hyper-cubes, explicit or sampled according to standard laws. Beware of
-the size of the hyper-cube (and thus the number of computations) that can be
-reached, it can quickly become important.
+The sampling of the states :math:`\mathbf{x}` can be given explicitly or under
+form of hyper-cubes, explicit or sampled according to classic distributions.
+Beware of the size of the hyper-cube (and then to the number of computations)
+that can be reached, it can grow quickly to be quite large.
 
 It is possible to exclude a priori potential positions for optimal measurement
 points, using the analysis variant "*lcEIM*" for a constrained positioning
@@ -146,6 +148,13 @@ StoreSupplementaryCalculations
 
 .. ------------------------------------ ..
 .. _section_ref_algorithm_MeasurementsOptimalPositioningTask_examples:
+.. include:: snippets/Header2Algo06.rst
+
+- :ref:`section_ref_algorithm_FunctionTest`
+- :ref:`section_ref_algorithm_ParallelFunctionTest`
+- :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`
+
+.. ------------------------------------ ..
 .. include:: snippets/Header2Algo07.rst
 
 - [Barrault04]_
index 53b81f1c4a2ad1de30bd3b472bd621ed5b053b77..d14f81f974e44f6608c0117e0128c7630ead498b 100644 (file)
@@ -112,3 +112,4 @@ StoreSupplementaryCalculations
 - :ref:`section_ref_algorithm_FunctionTest`
 - :ref:`section_ref_algorithm_InputValuesTest`
 - :ref:`section_ref_algorithm_LinearityTest`
+- :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`
index f067bb42e63675cebba4d785d3216cc8cccb2f78..f924c87a349145a4d95a5e45928c940f41949a50 100644 (file)
@@ -31,22 +31,24 @@ Checking algorithm "*SamplingTest*"
 .. include:: snippets/Header2Algo01.rst
 
 This algorithm allows to calculate the values, linked to a :math:`\mathbf{x}`
-state, of a general error function :math:`J` of type :math:`L^1`, :math:`L^2` or
-:math:`L^{\infty}`, with or without weights, and of the observation operator,
-for an priori given states sample. The default error function is the augmented
-weighted least squares function, classically used in data assimilation.
+state, of a general error function :math:`J` of type :math:`L^1`, :math:`L^2`
+or :math:`L^{\infty}`, with or without weights, and of the observation
+operator, for an priori given :math:`\mathbf{x}` states sample. The default
+error function is the augmented weighted least squares function, classically
+used in data assimilation, using observation :math:`\mathbf{y}^o`.
 
 It is useful to test the sensitivity, of the error function :math:`J`, in
 particular, to the state :math:`\mathbf{x}` variations. When a state is not
 observable, a *"NaN"* value is returned.
 
 The sampling of the states :math:`\mathbf{x}` can be given explicitly or under
-the form of hyper-cubes, explicit or sampled using classic distributions. Be
-careful to the size of the hyper-cube (and then to the number of calculations)
-that can be reached, it can be big very quickly.
+form of hyper-cubes, explicit or sampled according to classic distributions.
+Beware of the size of the hyper-cube (and then to the number of computations)
+that can be reached, it can grow quickly to be quite large.
 
-To be visible by the user, the results of sampling has to be explicitly asked
-for. One use for that, on the desired variable, the final saving through
+To be visible by the user while reducing the risk of storage difficulties, the
+results of sampling or simulations has to be **explicitly** asked for. One use
+for that, on the desired variable, the final saving through
 "*UserPostAnalysis*" or the treatment during the calculation by "*observer*".
 
 To perform distributed or more complex sampling, see OPENTURNS module available
index 9aef3a1a655aa58474b523f5d7e6f0701dee0a5b..7b294d4f41957c3e0b09a4f818b203ad5b3f7555 100644 (file)
@@ -163,5 +163,6 @@ algorithmic details.
 .. toctree::
    :maxdepth: 1
 
+   ref_algorithm_EnsembleOfSimulationGenerationTask
    ref_algorithm_MeasurementsOptimalPositioningTask
    ref_task_keywords
diff --git a/doc/fr/ref_algorithm_EnsembleOfSimulationGenerationTask.rst b/doc/fr/ref_algorithm_EnsembleOfSimulationGenerationTask.rst
new file mode 100644 (file)
index 0000000..5dc663d
--- /dev/null
@@ -0,0 +1,134 @@
+..
+   Copyright (C) 2008-2023 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: EnsembleOfSimulationGenerationTask
+.. index:: single: Génération d'ensemble de simulations
+.. index:: single: Ensemble de simulations
+.. index:: single: Ensemble de snapshots
+.. index:: single: Simulations (Ensemble)
+.. index:: single: Snapshots (Ensemble)
+.. _section_ref_algorithm_EnsembleOfSimulationGenerationTask:
+
+Algorithme de tâche "*EnsembleOfSimulationGenerationTask*"
+----------------------------------------------------------
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo00.rst
+
+.. warning::
+
+  Cet algorithme n'est utilisable qu'en interface textuelle (TUI) et pas en
+  interface graphique (GUI).
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo01.rst
+
+Cet algorithme permet de générer un ensemble de résultats, de type simulation
+ou observation, à l'aide de l'opérateur :math:`H` pour un plan d'expérience de
+l'espace des états :math:`\mathbf{x}` paramétriques. Le résultat de cet
+algorithme est une collection homogène des vecteurs simulés (disponible à
+l'aide de la variable stockable "*EnsembleOfSimulations*") correspondants directement à
+la collection homogène choisie de vecteurs d'états (disponible à l'aide de la
+variable stockable "*EnsembleOfStates*").
+
+L'échantillonnage des états :math:`\mathbf{x}` peut être fourni explicitement
+ou sous la forme d'hyper-cubes, explicites ou échantillonnés selon des
+distributions courantes. Attention à la taille de l'hyper-cube (et donc au
+nombre de calculs) qu'il est possible d'atteindre, elle peut rapidement devenir
+importante.
+
+Pour apparaître pour l'utilisateur tout en réduisant les difficultés de
+stockage, les résultats de l'échantillonnage ou des simulations doivent être
+demandés **explicitement**. On utilise pour cela, sur la variable désirée, la
+sauvegarde finale à l'aide du mot-clé "*UserPostAnalysis*" ou le traitement en
+cours de calcul à l'aide des "*observer*" adaptés.
+
+Les résultats obtenus avec cet algorithme peuvent être utilisés pour alimenter
+un :ref:`section_ref_algorithm_MeasurementsOptimalPositioningTask`. De manière
+complémentaire, et si le but est d'évaluer l'erreur calcul-mesure, un
+:ref:`section_ref_algorithm_SamplingTest` utilise les mêmes commandes
+d'échantillonnage pour établir un ensemble de valeurs de fonctionnelle d'erreur
+:math:`J` à partir d'observations :math:`\mathbf{y}^o`.
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo02.rst
+
+.. include:: snippets/CheckingPoint.rst
+
+.. include:: snippets/ObservationOperator.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo03Task.rst
+
+.. include:: snippets/SampleAsExplicitHyperCube.rst
+
+.. include:: snippets/SampleAsIndependantRandomVariables.rst
+
+.. include:: snippets/SampleAsMinMaxStepHyperCube.rst
+
+.. include:: snippets/SampleAsnUplet.rst
+
+.. include:: snippets/SetDebug.rst
+
+.. include:: snippets/SetSeed.rst
+
+StoreSupplementaryCalculations
+  .. index:: single: StoreSupplementaryCalculations
+
+  *Liste de noms*. Cette liste indique les noms des variables supplémentaires,
+  qui peuvent être disponibles au cours du déroulement ou à la fin de
+  l'algorithme, si elles sont initialement demandées par l'utilisateur. Leur
+  disponibilité implique, potentiellement, des calculs ou du stockage coûteux.
+  La valeur par défaut est donc une liste vide, aucune de ces variables n'étant
+  calculée et stockée par défaut (sauf les variables inconditionnelles). Les
+  noms possibles pour les variables supplémentaires sont dans la liste suivante
+  (la description détaillée de chaque variable nommée est donnée dans la suite
+  de cette documentation par algorithme spécifique, dans la sous-partie
+  "*Informations et variables disponibles à la fin de l'algorithme*") : [
+  "EnsembleOfSimulations",
+  "EnsembleOfStates",
+  ].
+
+  Exemple :
+  ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo04.rst
+
+.. include:: snippets/EnsembleOfSimulations.rst
+
+.. ------------------------------------ ..
+.. include:: snippets/Header2Algo05.rst
+
+.. include:: snippets/EnsembleOfSimulations.rst
+
+.. include:: snippets/EnsembleOfStates.rst
+
+.. ------------------------------------ ..
+.. _section_ref_algorithm_EnsembleOfSimulationGenerationTask_examples:
+.. include:: snippets/Header2Algo06.rst
+
+- :ref:`section_ref_algorithm_FunctionTest`
+- :ref:`section_ref_algorithm_ParallelFunctionTest`
+- :ref:`section_ref_algorithm_MeasurementsOptimalPositioningTask`
+
index 7c58c0a59c2e06436b653b1d0e9749c05c479652..24ed26dd6c6dd16b8fadbaa66660c43a096fcae3 100644 (file)
@@ -123,3 +123,4 @@ StoreSupplementaryCalculations
 - :ref:`section_ref_algorithm_InputValuesTest`
 - :ref:`section_ref_algorithm_LinearityTest`
 - :ref:`section_ref_algorithm_ParallelFunctionTest`
+- :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`
index e960a1170aa2a76c2090a96fbbea6657e6d48c5e..49383296f1624e206624d871a05a1e0e0cd6446e 100644 (file)
@@ -51,23 +51,25 @@ déterminées de manière itérative, à partir d'un ensemble de vecteurs d'éta
 pré-existants (usuellement appelés "*snapshots*" en méthodologie de bases
 réduites) ou obtenus par une simulation directe au cours de l'algorithme.
 Chacun de ces vecteurs d'état est habituellement (mais pas obligatoirement) le
-résultat :math:`\mathbf{y}` d'une simulation :math:`H` pour un jeu de
-paramètres donné :math:`\mathbf{x}`.
+résultat :math:`\mathbf{y}` d'une simulation ou d'une observation à l'aide de
+l'opérateur :math:`H` pour un jeu de paramètres donné :math:`\mathbf{x}`.
 
 Il y a deux manières d'utiliser cet algorithme:
 
 #. Dans son usage le plus simple, si l'ensemble des vecteurs d'état est
    pré-existant, il suffit de le fournir par l'option "*EnsembleOfSnapshots*"
-   d'algorithme.
+   d'algorithme. C'est par exemple le cas l'ensemble des états a été généré par
+   un :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`.
 #. Si l'ensemble des vecteurs d'état doit être obtenu par des simulations au
-   cours de l'algorithme, alors on doit fournir l'opérateur de simulation
-   :math:`H` et le plan d'expérience de l'espace des états :math:`\mathbf{x}`
-   paramétriques.
+   cours de l'algorithme, alors on doit fournir l'opérateur de simulation ou
+   d'observation :math:`H` et le plan d'expérience de l'espace des états
+   :math:`\mathbf{x}` paramétriques.
 
-L'échantillon des états :math:`\mathbf{x}` peut être fourni explicitement ou
-sous la forme d'hyper-cubes, explicites ou échantillonnés selon des lois
-courantes. Attention à la taille de l'hyper-cube (et donc au nombre de calculs)
-qu'il est possible d'atteindre, elle peut rapidement devenir importante.
+L'échantillonnage des états :math:`\mathbf{x}` peut être fourni explicitement
+ou sous la forme d'hyper-cubes, explicites ou échantillonnés selon des
+distributions courantes. Attention à la taille de l'hyper-cube (et donc au
+nombre de calculs) qu'il est possible d'atteindre, elle peut rapidement devenir
+importante.
 
 Il est possible d'exclure a priori des positions potentielles pour les points
 de mesures optimaux, en utilisant le variant "*lcEIM*" d'analyse pour une
@@ -148,6 +150,13 @@ StoreSupplementaryCalculations
 
 .. ------------------------------------ ..
 .. _section_ref_algorithm_MeasurementsOptimalPositioningTask_examples:
+.. include:: snippets/Header2Algo06.rst
+
+- :ref:`section_ref_algorithm_FunctionTest`
+- :ref:`section_ref_algorithm_ParallelFunctionTest`
+- :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`
+
+.. ------------------------------------ ..
 .. include:: snippets/Header2Algo07.rst
 
 - [Barrault04]_
index 85e3d899d06b24d8c94ace85e4b3da6e573351c1..2f75a94de113476fcc7a457d3ddb1b958df6e5c5 100644 (file)
@@ -113,3 +113,4 @@ StoreSupplementaryCalculations
 - :ref:`section_ref_algorithm_FunctionTest`
 - :ref:`section_ref_algorithm_InputValuesTest`
 - :ref:`section_ref_algorithm_LinearityTest`
+- :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`
index 563d2dfcd9b84de32358ceb319c9b70538d7ecb8..42a295383c7c4af2df7a1a707fce11e1ec66a75e 100644 (file)
@@ -30,24 +30,27 @@ Algorithme de vérification "*SamplingTest*"
 .. ------------------------------------ ..
 .. include:: snippets/Header2Algo01.rst
 
-Cet algorithme permet d'établir les valeurs, liées à un état :math:`\mathbf{x}`,
-d'une fonctionnelle d'erreur :math:`J` quelconque de type :math:`L^1`,
-:math:`L^2` ou :math:`L^{\infty}`, avec ou sans pondérations, et de l'opérateur
-d'observation, pour un échantillon d'états donné a priori. La fonctionnelle
-d'erreur par défaut est celle de moindres carrés pondérés augmentés,
-classiquement utilisée en assimilation de données.
+Cet algorithme permet d'établir les valeurs, liées à un état
+:math:`\mathbf{x}`, d'une fonctionnelle d'erreur :math:`J` quelconque de type
+:math:`L^1`, :math:`L^2` ou :math:`L^{\infty}`, avec ou sans pondérations, et
+de l'opérateur d'observation, pour un échantillon d'états :math:`\mathbf{x}`
+donné a priori. La fonctionnelle d'erreur par défaut est celle de moindres
+carrés pondérés augmentés, classiquement utilisée en assimilation de données,
+utilisant des observations :math:`\mathbf{y}^o`.
 
 Il est utile pour tester la sensibilité, de la fonctionnelle :math:`J`, en
 particulier, aux variations de l'état :math:`\mathbf{x}`. Lorsque un état n'est
 pas observable, une valeur *"NaN"* est retournée.
 
-L'échantillon des états :math:`\mathbf{x}` peut être fourni explicitement ou
-sous la forme d'hyper-cubes, explicites ou échantillonnés selon des lois
-courantes. Attention à la taille de l'hyper-cube (et donc au nombre de calculs)
-qu'il est possible d'atteindre, elle peut rapidement devenir importante.
+L'échantillonnage des états :math:`\mathbf{x}` peut être fourni explicitement
+ou sous la forme d'hyper-cubes, explicites ou échantillonnés selon des
+distributions courantes. Attention à la taille de l'hyper-cube (et donc au
+nombre de calculs) qu'il est possible d'atteindre, elle peut rapidement devenir
+importante.
 
-Pour apparaître pour l'utilisateur, les résultats de l'échantillonnage doivent
-être demandés explicitement. On utilise pour cela, sur la variable désirée, la
+Pour apparaître pour l'utilisateur tout en réduisant les difficultés de
+stockage, les résultats de l'échantillonnage ou des simulations doivent être
+demandés **explicitement**. On utilise pour cela, sur la variable désirée, la
 sauvegarde finale à l'aide du mot-clé "*UserPostAnalysis*" ou le traitement en
 cours de calcul à l'aide des "*observer*" adaptés.
 
index b6e82107c68580ef7a53679752a905f2274a8947..bad2e78df84f556c2ec08a4f8eefc9451771d31e 100644 (file)
@@ -167,5 +167,6 @@ sous-jacents.
 .. toctree::
    :maxdepth: 1
 
+   ref_algorithm_EnsembleOfSimulationGenerationTask
    ref_algorithm_MeasurementsOptimalPositioningTask
    ref_task_keywords
diff --git a/src/daComposant/daAlgorithms/EnsembleOfSimulationGenerationTask.py b/src/daComposant/daAlgorithms/EnsembleOfSimulationGenerationTask.py
new file mode 100644 (file)
index 0000000..da04670
--- /dev/null
@@ -0,0 +1,97 @@
+# -*- coding: utf-8 -*-
+#
+# 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
+# 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 numpy
+from daCore import BasicObjects
+from daAlgorithms.Atoms import eosg
+
+# ==============================================================================
+class ElementaryAlgorithm(BasicObjects.Algorithm):
+    def __init__(self):
+        BasicObjects.Algorithm.__init__(self, "ENSEMBLEOFSIMULATIONGENERATION")
+        self.defineRequiredParameter(
+            name     = "SampleAsnUplet",
+            default  = [],
+            typecast = tuple,
+            message  = "Points de calcul définis par une liste de n-uplet",
+            )
+        self.defineRequiredParameter(
+            name     = "SampleAsExplicitHyperCube",
+            default  = [],
+            typecast = tuple,
+            message  = "Points de calcul définis par un hyper-cube dont on donne la liste des échantillonnages de chaque variable comme une liste",
+            )
+        self.defineRequiredParameter(
+            name     = "SampleAsMinMaxStepHyperCube",
+            default  = [],
+            typecast = tuple,
+            message  = "Points de calcul définis par un hyper-cube dont on donne la liste des échantillonnages de chaque variable par un triplet [min,max,step]",
+            )
+        self.defineRequiredParameter(
+            name     = "SampleAsIndependantRandomVariables",
+            default  = [],
+            typecast = tuple,
+            message  = "Points de calcul définis par un hyper-cube dont les points sur chaque axe proviennent de l'échantillonnage indépendant de la variable selon la spécification ['distribution',[parametres],nombre]",
+            )
+        self.defineRequiredParameter(
+            name     = "SetDebug",
+            default  = False,
+            typecast = bool,
+            message  = "Activation du mode debug lors de l'exécution",
+            )
+        self.defineRequiredParameter(
+            name     = "StoreSupplementaryCalculations",
+            default  = ["EnsembleOfSimulations",],
+            typecast = tuple,
+            message  = "Liste de calculs supplémentaires à stocker et/ou effectuer",
+            listval  = [
+                "EnsembleOfSimulations",
+                "EnsembleOfStates",
+                ]
+            )
+        self.defineRequiredParameter(
+            name     = "SetSeed",
+            typecast = numpy.random.seed,
+            message  = "Graine fixée pour le générateur aléatoire",
+            )
+        self.requireInputArguments(
+            mandatory= ("Xb", "HO"),
+            optional = (),
+            )
+        self.setAttributes(tags=(
+            "Reduction",
+            "Checking",
+            ))
+
+    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(Parameters, Xb, Y, U, HO, EM, CM, R, B, Q)
+        #
+        #--------------------------
+        eosg.eosg(self, Xb, HO)
+        #--------------------------
+        #
+        self._post_run(HO)
+        return 0
+
+# ==============================================================================
+if __name__ == "__main__":
+    print('\n AUTODIAGNOSTIC\n')