Salome HOME
Documentation minor corrections and improvements
[modules/adao.git] / doc / en / ref_options_AlgorithmParameters.rst
1 ..
2    Copyright (C) 2008-2014 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: AlgorithmParameters
25 .. _section_ref_options_AlgorithmParameters:
26
27 Description of options of an algorithm by "*AlgorithmParameters*"
28 -----------------------------------------------------------------
29
30 Each algorithm can be controlled using some specific options, given through the
31 "*AlgorithmParameters*" optional command.
32
33 There are 2 practical methods for the user to provide these options. The
34 method is chosen by the keyword "*FROM*", included in the entry
35 "*AlgorithmParameters*" in EFICAS.
36
37 If an option is specified by the user for an algorithm that doesn't support it,
38 the option is simply left unused and don't stop the treatment. The meaning of
39 the acronyms or particular names can be found in the :ref:`genindex` or the
40 :ref:`section_glossary`.
41
42 First method : using a string in EFICAS
43 +++++++++++++++++++++++++++++++++++++++
44
45 To give the values for the command "*AlgorithmParameters*" as a string, directly
46 in the EFICAS graphical interface, the user selects this type in the keyword
47 "*FROM*", as shown in the following figure:
48
49   .. :adao_algopar_string
50   .. image:: images/adao_algopar_string.png
51     :align: center
52     :width: 100%
53   .. centered::
54     **Using a string for algorithmic parameters**
55
56 In the entry, one must enclose a standard dictionary definition between simple
57 quotes, as for example::
58
59     '{"StoreInternalVariables":True,"MaximumNumberOfSteps":25}'
60
61 It is the recommended way to define algorithmic parameters.
62
63 Second method : using an external Python script file
64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
65
66 To give the values for the command "*AlgorithmParameters*" in an external Python
67 script file, the user selects in EFICAS this type in the keyword "*FROM*", as
68 shown in the following figure:
69
70   .. :adao_algopar_script
71   .. image:: images/adao_algopar_script.png
72     :align: center
73     :width: 100%
74   .. centered::
75     **Using an external file for algorithmic parameters**
76
77 This external Python script file has then to define a variable with the required
78 name "*AlgorithmParameters*", as in the following example::
79
80     AlgorithmParameters = {
81         "StoreInternalVariables" : True,
82         "MaximumNumberOfSteps" : 25,
83         "StoreSupplementaryCalculations" : ["APosterioriCovariance","OMA"],
84         }
85
86 The file can also contain other Python commands.