Salome HOME
Documentation and source minor corrections for observers
[modules/adao.git] / doc / en / ref_algorithm_FunctionTest.rst
1 ..
2    Copyright (C) 2008-2015 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 Description
31 +++++++++++
32
33 This algorithm allows to verify that the observation operator is working
34 correctly and that its call is compatible with its usage in ADAO algorithms. In
35 practice, it allows to call one or several times the operator, activating or not
36 the "debug" mode during execution.
37
38 Statistics on input and output vectors for each execution of operator are given,
39 and an another global statistic is given at the end of the checking algorithm.
40 The precision of printed outputs can be controlled to facilitate automatic tests
41 of operator.
42
43 Optional and required commands
44 ++++++++++++++++++++++++++++++
45
46 .. index:: single: AlgorithmParameters
47 .. index:: single: CheckingPoint
48 .. index:: single: ObservationOperator
49 .. index:: single: NumberOfPrintedDigits
50 .. index:: single: NumberOfRepetition
51 .. index:: single: SetDebug
52 .. index:: single: StoreSupplementaryCalculations
53
54 The general required commands, available in the editing user interface, are the
55 following:
56
57   CheckingPoint
58     *Required command*. This indicates the vector used as the state around which
59     to perform the required check, noted :math:`\mathbf{x}` and similar to the
60     background :math:`\mathbf{x}^b`. It is defined as a "*Vector*" type object.
61
62   ObservationOperator
63     *Required command*. This indicates the observation operator, previously
64     noted :math:`H`, which transforms the input parameters :math:`\mathbf{x}` to
65     results :math:`\mathbf{y}` to be compared to observations
66     :math:`\mathbf{y}^o`. Its value is defined as a "*Function*" type object or
67     a "*Matrix*" type one. In the case of "*Function*" type, different
68     functional forms can be used, as described in the section
69     :ref:`section_ref_operator_requirements`. If there is some control :math:`U`
70     included in the observation, the operator has to be applied to a pair
71     :math:`(X,U)`.
72
73 The general optional commands, available in the editing user interface, are
74 indicated in :ref:`section_ref_assimilation_keywords`. Moreover, the parameters
75 of the command "*AlgorithmParameters*" allow to choose the specific options,
76 described hereafter, of the algorithm. See
77 :ref:`section_ref_options_Algorithm_Parameters` for the good use of this
78 command.
79
80 The options of the algorithm are the following:
81
82   NumberOfPrintedDigits
83     This key indicates the number of digits of precision for floating point
84     printed output. The default is 5, with a minimum of 0.
85
86     Example : ``{"NumberOfPrintedDigits":5}``
87
88   NumberOfRepetition
89     This key indicates the number of time to repeat the function evaluation. The
90     default is 1.
91
92     Example : ``{"NumberOfRepetition":3}``
93
94   SetDebug
95     This key requires the activation, or not, of the debug mode during the
96     function evaluation. The default is "False", the choices are "True" or
97     "False".
98
99     Example : ``{"SetDebug":False}``
100
101   StoreSupplementaryCalculations
102     This list indicates the names of the supplementary variables that can be
103     available at the end of the algorithm. It involves potentially costly
104     calculations or memory consumptions. The default is a void list, none of
105     these variables being calculated and stored by default. The possible names
106     are in the following list: ["CurrentState",
107     "SimulatedObservationAtCurrentState"].
108
109     Example : ``{"StoreSupplementaryCalculations":["CurrentState"]}``
110
111 Information and variables available at the end of the algorithm
112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
113
114 At the output, after executing the algorithm, there are variables and
115 information originating from the calculation. The description of
116 :ref:`section_ref_output_variables` show the way to obtain them by the method
117 named ``get`` of the variable "*ADD*" of the post-processing. The input
118 variables, available to the user at the output in order to facilitate the
119 writing of post-processing procedures, are described in the
120 :ref:`subsection_r_o_v_Inventaire`.
121
122 The conditional outputs of the algorithm are the following:
123
124   CurrentState
125     *List of vectors*. Each element is a usual state vector used during the
126     optimization algorithm procedure.
127
128     Example : ``Xs = ADD.get("CurrentState")[:]``
129
130   SimulatedObservationAtCurrentState
131     *List of vectors*. Each element is an observed vector at the current state,
132     that is, in the observation space.
133
134     Example : ``hxs = ADD.get("SimulatedObservationAtCurrentState")[-1]``
135
136 See also
137 ++++++++
138
139 References to other sections:
140   - :ref:`section_ref_algorithm_LinearityTest`