Salome HOME
Minor documentation and code review corrections (40)
[modules/adao.git] / doc / en / ref_algorithm_FunctionTest.rst
1 ..
2    Copyright (C) 2008-2023 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: FunctionTest
25 .. _section_ref_algorithm_FunctionTest:
26
27 Checking algorithm "*FunctionTest*"
28 -----------------------------------
29
30 .. ------------------------------------ ..
31 .. include:: snippets/Header2Algo01.rst
32
33 This algorithm allows to verify that a given operator :math:`F`, in particular
34 the observation one, is working correctly and that its call is compatible with
35 its usage in ADAO algorithms. In practice, it allows to call one or several
36 times the operator, activating or not the "debug" mode during execution. The
37 :math:`F` operator is considered to depend on the vector variable
38 :math:`\mathbf{x}`.
39
40 Statistics on input and output vectors for each execution of operator are
41 given, and an another global statistic is given at the end of the checking
42 algorithm. The precision of printed outputs can be controlled to facilitate
43 automatic tests of operator. It may also be useful to check the entries
44 themselves beforehand with the intended test
45 :ref:`section_ref_algorithm_InputValuesTest`.
46
47 .. ------------------------------------ ..
48 .. include:: snippets/Header2Algo02.rst
49
50 .. include:: snippets/CheckingPoint.rst
51
52 .. include:: snippets/ObservationOperator.rst
53
54 .. ------------------------------------ ..
55 .. include:: snippets/Header2Algo03Chck.rst
56
57 .. include:: snippets/NumberOfPrintedDigits.rst
58
59 .. include:: snippets/NumberOfRepetition.rst
60
61 .. include:: snippets/SetDebug.rst
62
63 .. include:: snippets/ShowElementarySummary.rst
64
65 StoreSupplementaryCalculations
66   .. index:: single: StoreSupplementaryCalculations
67
68   *List of names*. This list indicates the names of the supplementary
69   variables, that can be available during or at the end of the algorithm, if
70   they are initially required by the user. Their avalability involves,
71   potentially, costly calculations or memory consumptions. The default is then
72   a void list, none of these variables being calculated and stored by default
73   (excepted the unconditionnal variables). The possible names are in the
74   following list (the detailed description of each named variable is given in
75   the following part of this specific algorithmic documentation, in the
76   sub-section "*Information and variables available at the end of the
77   algorithm*"): [
78   "CurrentState",
79   "SimulatedObservationAtCurrentState",
80   ].
81
82   Example :
83   ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
84
85 .. ------------------------------------ ..
86 .. include:: snippets/Header2Algo04.rst
87
88 .. include:: snippets/NoUnconditionalOutput.rst
89
90 .. ------------------------------------ ..
91 .. include:: snippets/Header2Algo05.rst
92
93 .. include:: snippets/CurrentState.rst
94
95 .. include:: snippets/SimulatedObservationAtCurrentState.rst
96
97 .. ------------------------------------ ..
98 .. _section_ref_algorithm_FunctionTest_examples:
99
100 .. include:: snippets/Header2Algo09.rst
101
102 .. --------- ..
103 .. include:: scripts/simple_FunctionTest1.rst
104
105 .. literalinclude:: scripts/simple_FunctionTest1.py
106
107 .. include:: snippets/Header2Algo10.rst
108
109 .. literalinclude:: scripts/simple_FunctionTest1.res
110     :language: none
111
112 .. --------- ..
113 .. include:: scripts/simple_FunctionTest2.rst
114
115 .. literalinclude:: scripts/simple_FunctionTest2.py
116
117 .. include:: snippets/Header2Algo10.rst
118
119 .. literalinclude:: scripts/simple_FunctionTest2.res
120     :language: none
121
122 .. ------------------------------------ ..
123 .. include:: snippets/Header2Algo06.rst
124
125 - :ref:`section_ref_algorithm_InputValuesTest`
126 - :ref:`section_ref_algorithm_LinearityTest`
127 - :ref:`section_ref_algorithm_ParallelFunctionTest`
128 - :ref:`section_ref_algorithm_EnsembleOfSimulationGenerationTask`