2 Copyright (C) 2008-2017 EDF R&D
4 This file is part of SALOME ADAO module.
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.
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.
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
20 See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
24 .. _section_ref_entry_types:
26 List of possible input types
27 ----------------------------
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:
34 .. index:: single: 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.
42 .. index:: single: 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
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
53 .. index:: single: Dict
56 This indicates a variable that has to be filled by a Python dictionary
57 ``{"key":"value...}``.
59 .. index:: single: 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`.
66 .. index:: single: Matrix
69 This indicates a variable that has to be filled by a matrix.
71 .. index:: single: ScalarSparseMatrix
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).
77 .. index:: single: DiagonalSparseMatrix
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).
83 .. index:: single: Vector
86 This indicates a variable that has to be filled by a vector.
88 .. index:: single: VectorSerie
91 This indicates a variable that has to be filled by a list of vectors.
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::
104 Its import allows the creation of the variable "*Background*". The dots "..."
105 symbolize any code around this particular beginning of the line.