Salome HOME
c3f514d915761f43945f4b6d1e68b79f15e9c1e9
[modules/adao.git] / doc / en / ref_entry_types.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 .. _section_ref_entry_types:
25
26 List of possible input types
27 ----------------------------
28
29 Each ADAO variable has a pseudo-type to help filling it and validation. These
30 pseudo-types explicitly represent some simple computing or mathematical types.
31 Two pseudo-types, purely computing ones, allows to designate how the input
32 variables are provided:
33
34 .. index:: single: Script
35
36 **Script**
37     This indicates a script given as an external file. It can be described by a
38     full absolute path name or only by the file name without path. If the file
39     is given only by a file name without path, and if a study directory is also
40     indicated, the file is searched in the given study directory.
41
42 .. index:: single: String
43
44 **String**
45     This indicates a string giving a literal representation of a matrix, a
46     vector or a vector series, such as "1 2 ; 3 4" or "[[1,2],[3,4]]" for a
47     square 2x2 matrix.
48
49 The various other pseudo-types are as follows. The variables they apply
50 themselves may be either a data string (a "*String*"), or a script file (a
51 "*Script*"):
52
53 .. index:: single: Dict
54
55 **Dict**
56     This indicates a variable that has to be filled by a Python dictionary
57     ``{"key":"value...}``.
58
59 .. index:: single: Function
60
61 **Function**
62     This indicates a variable that has to be filled by a Python function. The
63     functions are special entries described by the
64     :ref:`section_ref_operator_requirements`.
65
66 .. index:: single: Matrix
67
68 **Matrix**
69     This indicates a variable that has to be filled by a matrix.
70
71 .. index:: single: ScalarSparseMatrix
72
73 **ScalarSparseMatrix**
74     This indicates a variable that has to be filled by a unique number (which
75     will be used to multiply an identity matrix).
76
77 .. index:: single: DiagonalSparseMatrix
78
79 **DiagonalSparseMatrix**
80     This indicates a variable that has to be filled by a vector (which will be
81     used as the diagonal of a square matrix).
82
83 .. index:: single: Vector
84
85 **Vector**
86     This indicates a variable that has to be filled by a vector.
87
88 .. index:: single: VectorSerie
89
90 **VectorSerie**
91     This indicates a variable that has to be filled by a list of vectors.
92
93 When a command or keyword can be filled by a script file name, specified by the
94 pseudo-type "*Script*", the script has to contain a variable or a method that
95 has the same name as the one to be filled. In other words, when importing the
96 script in a YACS Python node, it must create a variable of the good name in the
97 current name space of the node. For example, a Python script making available
98 the background variable, named "*Background*", must have the following form::
99
100     ...
101     Background =...
102     ...
103
104 Its import allows the creation of the variable "*Background*". The dots "..."
105 symbolize any code around this particular beginning of the line.