Salome HOME
Documentation update with features and review corrections
[modules/adao.git] / doc / fr / ref_algorithm_AdjointTest.rst
1 ..
2    Copyright (C) 2008-2024 EDF R&D
3
4    This file is part of SALOME ADAO module.
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public
17    License along with this library; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
20    See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22    Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
23
24 .. index:: single: AdjointTest
25 .. _section_ref_algorithm_AdjointTest:
26
27 Algorithme de vérification "*AdjointTest*"
28 ------------------------------------------
29
30 .. ------------------------------------ ..
31 .. include:: snippets/Header2Algo01.rst
32
33 Cet algorithme permet de vérifier la qualité de l'adjoint d'un opérateur
34 :math:`F`, en calculant un résidu dont les propriétés théoriques sont connues.
35 Le test est applicable à un opérateur quelconque, d'évolution
36 :math:`\mathcal{D}` comme d'observation :math:`\mathcal{H}`.
37
38 Pour toutes les formules, avec :math:`\mathbf{x}` le point courant de
39 vérification, on prend :math:`\mathbf{dx}_0=Normal(0,\mathbf{x})` et
40 :math:`\mathbf{dx}=\alpha_0*\mathbf{dx}_0` avec :math:`\alpha_0` un paramètre
41 utilisateur de mise à l'échelle, par défaut à 1. :math:`F` est l'opérateur ou
42 le code de calcul (qui est ici défini par la commande d'opérateur d'observation
43 "*ObservationOperator*").
44
45 On observe le résidu suivant, qui est la différence de deux produits scalaires :
46
47 .. math:: R(\alpha) = | < TangentF_x(\mathbf{dx}) , \mathbf{y} > - < \mathbf{dx} , AdjointF_x(\mathbf{y}) > |
48
49 dans lequel la quantité optionnelle :math:`\mathbf{y}` doit être dans l'image
50 de :math:`F`. Si elle n'est pas donnée, on prend son évaluation par défaut
51 :math:`\mathbf{y} = F(\mathbf{x})`.
52
53 Ce résidu doit rester constamment égal à zéro à la précision du calcul.
54
55 .. ------------------------------------ ..
56 .. include:: snippets/Header2Algo12.rst
57
58 .. include:: snippets/FeaturePropDerivativeNeeded.rst
59
60 .. include:: snippets/FeaturePropParallelDerivativesOnly.rst
61
62 .. ------------------------------------ ..
63 .. include:: snippets/Header2Algo02.rst
64
65 .. include:: snippets/CheckingPoint.rst
66
67 .. include:: snippets/Observation.rst
68
69 .. include:: snippets/ObservationOperator.rst
70
71 .. ------------------------------------ ..
72 .. include:: snippets/Header2Algo03Chck.rst
73
74 .. include:: snippets/AmplitudeOfInitialDirection.rst
75
76 .. include:: snippets/EpsilonMinimumExponent.rst
77
78 .. include:: snippets/InitialDirection.rst
79
80 .. include:: snippets/NumberOfPrintedDigits.rst
81
82 .. include:: snippets/SetSeed.rst
83
84 StoreSupplementaryCalculations
85   .. index:: single: StoreSupplementaryCalculations
86
87   *Liste de noms*. Cette liste indique les noms des variables supplémentaires,
88   qui peuvent être disponibles au cours du déroulement ou à la fin de
89   l'algorithme, si elles sont initialement demandées par l'utilisateur. Leur
90   disponibilité implique, potentiellement, des calculs ou du stockage coûteux.
91   La valeur par défaut est donc une liste vide, aucune de ces variables n'étant
92   calculée et stockée par défaut (sauf les variables inconditionnelles). Les
93   noms possibles pour les variables supplémentaires sont dans la liste suivante
94   (la description détaillée de chaque variable nommée est donnée dans la suite
95   de cette documentation par algorithme spécifique, dans la sous-partie
96   "*Informations et variables disponibles à la fin de l'algorithme*") : [
97   "CurrentState",
98   "Residu",
99   "SimulatedObservationAtCurrentState",
100   ].
101
102   Exemple :
103   ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
104
105 .. ------------------------------------ ..
106 .. include:: snippets/Header2Algo04.rst
107
108 .. include:: snippets/Residu.rst
109
110 .. ------------------------------------ ..
111 .. include:: snippets/Header2Algo05.rst
112
113 .. include:: snippets/CurrentState.rst
114
115 .. include:: snippets/Residu.rst
116
117 .. include:: snippets/SimulatedObservationAtCurrentState.rst
118
119 .. ------------------------------------ ..
120 .. _section_ref_algorithm_AdjointTest_examples:
121
122 .. include:: snippets/Header2Algo09.rst
123
124 .. include:: scripts/simple_AdjointTest.rst
125
126 .. literalinclude:: scripts/simple_AdjointTest.py
127
128 .. include:: snippets/Header2Algo10.rst
129
130 .. literalinclude:: scripts/simple_AdjointTest.res
131     :language: none
132
133 .. ------------------------------------ ..
134 .. include:: snippets/Header2Algo06.rst
135
136 - :ref:`section_ref_algorithm_FunctionTest`
137 - :ref:`section_ref_algorithm_LinearityTest`
138 - :ref:`section_ref_algorithm_TangentTest`
139 - :ref:`section_ref_algorithm_GradientTest`
140 - :ref:`section_ref_algorithm_LocalSensitivityTest`