Salome HOME
Documentation examples corrections and update
[modules/adao.git] / doc / en / ref_algorithm_MeasurementsOptimalPositioningTask.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: MeasurementsOptimalPositioningTask
25 .. index:: single: Optimal positioning of measurements
26 .. index:: single: Measurement locations
27 .. index:: single: Measurements (Optimal positioning)
28 .. index:: single: Ensemble of simulations
29 .. index:: single: Ensemble of snapshots
30 .. index:: single: Simulations (Ensemble)
31 .. index:: single: Snapshots (Ensemble)
32 .. index:: single: Reduced Order Model
33 .. index:: single: ROM
34 .. _section_ref_algorithm_MeasurementsOptimalPositioningTask:
35
36 Task algorithm "*MeasurementsOptimalPositioningTask*"
37 -----------------------------------------------------
38
39 .. ------------------------------------ ..
40 .. include:: snippets/Header2Algo00.rst
41
42 .. ------------------------------------ ..
43 .. include:: snippets/Header2Algo01.rst
44
45 This algorithm provides optimal positioning of measurements of an
46 :math:`\mathbf{y}` physical field, in order to get the best possible
47 interpolation. These optimal measurement positions are determined in an
48 iterative greedy way, from a pre-existing set of state vectors
49 :math:`\mathbf{y}` (usually called "snapshots*" in reduced basis methodology)
50 or obtained by simulating the physical field(s) of interest during the course
51 of the algorithm. Each of these state vectors is usually (but not necessarily)
52 the result :math:`\mathbf{y}` of a simulation using the operator :math:`H` that
53 returns the complete field(s) for a given set of parameters :math:`\mathbf{x}`,
54 or of an explicit observation of the complete field(s) :math:`\mathbf{y}`.
55
56 To determine the optimum positioning of measurements, an Empirical
57 Interpolation Method (EIM [Barrault04]_) or Discrete Empirical Interpolation
58 Method (DEIM [Chaturantabut10]_) is used, which establishes a reduced model of
59 type Reduced Order Model (ROM), with (variant "*lcEIM*" or "*lcDEIM*") or
60 without (variant "*EIM*" or "*DEIM*") positioning constraints. For performance,
61 we recommend using the variant "*lcEIM*" or "*EIM*" when the dimension of the
62 full fields space is large.
63
64 There are two ways to use this algorithm:
65
66 #. In its simplest use, if the set of physical state :math:`\mathbf{y}` vectors
67    is pre-existing, it is only necessary to provide it as an ordered collection
68    by the algorithm option "*EnsembleOfSnapshots*". This is the default
69    situation, for example, if the set of states has been generated by an
70    :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`.
71 #. If the set of physical state :math:`\mathbf{y}` vectors is to be obtained by
72    explicit simulations during the course of the algorithm, then one must
73    provide both the simulation operator of the complete field, here identified
74    with the observation operator :math:`H` of the complete field, and the
75    design of experiment of the space of parametric states :math:`\mathbf{x}`.
76
77 If the design of experiments is supplied, the sampling of the states
78 :math:`\mathbf{x}` can be given as in the
79 :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`, explicitly or
80 under form of hypercubes, explicit or sampled according to classic
81 distributions, or using Latin hypercube sampling (LHS) or Sobol sequences. The
82 computations are optimized according to the computer resources available and
83 the options requested by the user. You can refer to the
84 :ref:`section_ref_sampling_requirements` for an illustration of sampling.
85 Beware of the size of the hypercube (and then to the number of computations)
86 that can be reached, it can grow quickly to be quite large. The memory required
87 is then the product of the size of an individual :math:`\mathbf{y}` state and
88 the size of the hypercube.
89
90   .. _mop_determination:
91   .. image:: images/mop_determination.png
92     :align: center
93     :width: 95%
94   .. centered::
95     **General scheme for using the algorithm**
96
97 It is possible to exclude a priori potential positions for measurement
98 positioning, using the analysis variant "*lcEIM*" or "*lcDEIM*" for a
99 constrained positioning search.
100
101 .. ------------------------------------ ..
102 .. include:: snippets/Header2Algo12.rst
103
104 .. include:: snippets/FeaturePropDerivativeFree.rst
105
106 .. include:: snippets/FeaturePropParallelAlgorithm.rst
107
108 .. ------------------------------------ ..
109 .. include:: snippets/Header2Algo02.rst
110
111 *None*
112
113 .. ------------------------------------ ..
114 .. include:: snippets/Header2Algo03Task.rst
115
116 .. include:: snippets/EnsembleOfSnapshots.rst
117
118 .. include:: snippets/ExcludeLocations.rst
119
120 .. include:: snippets/ErrorNorm.rst
121
122 .. include:: snippets/ErrorNormTolerance.rst
123
124 .. include:: snippets/MaximumNumberOfLocations.rst
125
126 .. include:: snippets/NameOfLocations.rst
127
128 .. include:: snippets/ReduceMemoryUse.rst
129
130 .. include:: snippets/SampleAsExplicitHyperCube.rst
131
132 .. include:: snippets/SampleAsIndependantRandomVariables.rst
133
134 .. include:: snippets/SampleAsMinMaxLatinHyperCube.rst
135
136 .. include:: snippets/SampleAsMinMaxSobolSequence.rst
137
138 .. include:: snippets/SampleAsMinMaxStepHyperCube.rst
139
140 .. include:: snippets/SampleAsnUplet.rst
141
142 .. include:: snippets/SetDebug.rst
143
144 .. include:: snippets/SetSeed.rst
145
146 StoreSupplementaryCalculations
147   .. index:: single: StoreSupplementaryCalculations
148
149   *List of names*. This list indicates the names of the supplementary
150   variables, that can be available during or at the end of the algorithm, if
151   they are initially required by the user. Their availability involves,
152   potentially, costly calculations or memory consumptions. The default is then
153   a void list, none of these variables being calculated and stored by default
154   (excepted the unconditional variables). The possible names are in the
155   following list (the detailed description of each named variable is given in
156   the following part of this specific algorithmic documentation, in the
157   sub-section "*Information and variables available at the end of the
158   algorithm*"): [
159   "EnsembleOfSimulations",
160   "EnsembleOfStates",
161   "ExcludedPoints",
162   "OptimalPoints",
163   "ReducedBasis",
164   "ReducedBasisMus",
165   "Residus",
166   "SingularValues",
167   ].
168
169   Example :
170   ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
171
172 .. include:: snippets/Variant_MOP.rst
173
174 .. ------------------------------------ ..
175 .. include:: snippets/Header2Algo04.rst
176
177 .. include:: snippets/OptimalPoints.rst
178
179 .. ------------------------------------ ..
180 .. include:: snippets/Header2Algo05.rst
181
182 .. include:: snippets/EnsembleOfSimulations.rst
183
184 .. include:: snippets/EnsembleOfStates.rst
185
186 .. include:: snippets/ExcludedPoints.rst
187
188 .. include:: snippets/OptimalPoints.rst
189
190 .. include:: snippets/ReducedBasis.rst
191
192 .. include:: snippets/ReducedBasisMus.rst
193
194 .. include:: snippets/Residus.rst
195
196 .. include:: snippets/SingularValues.rst
197
198 .. ------------------------------------ ..
199 .. _section_ref_algorithm_MeasurementsOptimalPositioningTask_examples:
200
201 .. include:: snippets/Header2Algo09.rst
202
203 .. --------- ..
204 .. include:: scripts/simple_MeasurementsOptimalPositioningTask1.rst
205
206 .. literalinclude:: scripts/simple_MeasurementsOptimalPositioningTask1.py
207
208 .. include:: snippets/Header2Algo10.rst
209
210 .. literalinclude:: scripts/simple_MeasurementsOptimalPositioningTask1.res
211     :language: none
212
213 .. --------- ..
214 .. include:: scripts/simple_MeasurementsOptimalPositioningTask2.rst
215
216 .. literalinclude:: scripts/simple_MeasurementsOptimalPositioningTask2.py
217
218 .. include:: snippets/Header2Algo10.rst
219
220 .. literalinclude:: scripts/simple_MeasurementsOptimalPositioningTask2.res
221     :language: none
222
223 .. --------- ..
224 .. include:: scripts/simple_MeasurementsOptimalPositioningTask3.rst
225
226 .. literalinclude:: scripts/simple_MeasurementsOptimalPositioningTask3.py
227
228 .. include:: snippets/Header2Algo10.rst
229
230 .. literalinclude:: scripts/simple_MeasurementsOptimalPositioningTask3.res
231     :language: none
232
233 .. include:: snippets/Header2Algo11.rst
234
235 .. _simple_MeasurementsOptimalPositioningTask31:
236 .. image:: scripts/simple_MeasurementsOptimalPositioningTask31.png
237   :align: center
238   :width: 60%
239
240 .. _simple_MeasurementsOptimalPositioningTask32:
241 .. image:: scripts/simple_MeasurementsOptimalPositioningTask32.png
242   :align: center
243   :width: 60%
244
245 .. _simple_MeasurementsOptimalPositioningTask33:
246 .. image:: scripts/simple_MeasurementsOptimalPositioningTask33.png
247   :align: center
248   :width: 60%
249
250 .. ------------------------------------ ..
251 .. include:: snippets/Header2Algo06.rst
252
253 - :ref:`section_ref_algorithm_FunctionTest`
254 - :ref:`section_ref_algorithm_ParallelFunctionTest`
255 - :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`
256
257 .. ------------------------------------ ..
258 .. include:: snippets/Header2Algo07.rst
259
260 - [Barrault04]_
261 - [Chaturantabut10]_
262 - [Gong18]_
263 - [Quarteroni16]_