Salome HOME
update version
[modules/eficas.git] / doc / eficas_principles.rst
1 a new JDC step by step
2 ======================
3
4 In Eficas, many common commands can be invoked via menus, toolbar buttons as well as keyboard shortcuts.
5 As in many GUI, a menu widget can be either a pull-down menu or a standalone context menu. Pull-down menus are shown by the menu bar when the user clicks on the respective item or presses the specified shortcut key. Context menus are usually invoked by some special keyboard key or by right-clicking.
6 Eficas allows you to write (and reread) an unvalid file. At any time, user can save its works. 
7
8 Choose a Code
9 -------------
10
11 So try to build a new JDC.
12
13 Eficas will ask you to choose the code you want to work with, each time you click on "Nouveau" or "Open" in the "fichier" Menu, unless you have started Eficas for a specific code ( see how to launch Eficas in Salome) 
14
15 .. image:: images/choix_code.png
16    :align: center
17
18 Choose a version of the Code
19 ----------------------------
20
21 .. image:: images/choix_cata.png
22    :align: center
23
24 Enter commands
25 ---------------
26
27 Eficas main widget provided two distinct views: The left size always contains the JDC explorer as a tree view. The right widget contains all informations used by the user to constructs the JDC. It shows which commands are available and which :ref:`rules-label`  have to be followed. Commands are append after this selected in the JDC tree.
28
29 .. image:: images/command.png
30    :align: center
31
32
33 The user can use "Filtre", which is a filter widget to find a command position. The PushButton "suivant" shows the next matching command. 
34  
35
36
37
38
39 The user  also can choose the way the commands are sorted, either by alphabetical order, either by fonctionnalities.
40
41 .. image:: images/groupes.png
42    :align: center
43
44 Choosing command's keywords
45 ---------------------------
46
47 For each command, EFICAS shows which keywords  are available.
48
49 .. image:: images/motClef.png
50    :align: center
51
52
53 These keywords depend from the context, ie the value of one other 
54 keyword.
55
56 .. image:: images/motClef2.png
57    :align: center
58
59 or
60
61
62 .. image:: images/motClef3.png
63    :align: center
64
65 types of item in the JDC (Jeu De Commande)
66 ------------------------------------------
67
68 In JDC, you can have :
69
70 * PROC : this is a command with all its keywords. 
71
72   - example:
73          - DEBUT() is a proc.  
74          - for ASTER, it initializes memory and files.
75
76 * OPER : creates an object which has a type and a name
77
78   - example :
79     - MONMAIL=LIRE_MAILLAGE(UNITE=20);
80     - This line creates a new concept MONMAIL of type "maillage", which can be re-used
81
82 When an oper is valid, the user have to named it.
83
84 .. image:: images/nommerConcept.png
85    :align: center
86
87
88
89 * mot-clef facteur 
90
91    This is a list of keywords which jointly have a meaning for the code.
92    Some are mandatory, repeatable .
93    This list can depend on conditionnal rules.
94    
95
96 * mot-clef simple .
97
98    this is a simple keyword. it also can be mandatory or not...
99    
100
101 These items are associated according to rules or conditions. These items are
102 described in the catalog.
103
104
105 Attributes of a keyword
106 -----------------------
107
108 a parameter ("mot-clef simple") should have :
109
110 - a type : Real, string, complex, integer or a python class which is defined in the catalog. As we have already seen, LIRE_MAILLAGE produced a "maillage" concept and MODELE in AFFE_MODELE oper waits for a concept of type "maillage". Eficas will propose all the valid concepts of type "maillage". 
111  
112 .. image:: images/Affe.png
113    :align: center
114
115
116 - a File parameter should be : 
117
118         - an existing file (type='Fichier'), 
119         - a directory (type='Repertoire'), 
120
121         - an existing file with specific suffix (type='Fichier','JDC Files (*.comm);;All Files (*)') The contents of the directory are filtered before being shown in the dialog, using a semicolon-separated list of filters specified.
122
123         - a  non-allready existant (type=('Fichier',"",'Sauvegarde'),
124
125         - a simple string (type='FichierNoAbs').
126
127 This is the way the catalog should look like :
128
129 input_datafile=SIMP(typ='Fichier',fr='',ang='',statut='o',docu='',min=1,max=1,defaut=None),
130
131 input_commfile=SIMP(typ=('Fichier','JDC Files (*.comm);;''All Files (*)'),fr='',ang='',statut='o',docu='',min=1,max=1,defaut=None),
132
133 output_datafile=SIMP(typ=('Fichier','JDC Files (*.comm);;''All Files (*)','Sauvegarde'),fr='',ang='',statut='o',docu='',min=1,max=1,defaut=None),
134
135 datafile=SIMP(typ='FichierNoAbs',fr='',ang='',statut='o',docu='',min=1,max=1,defaut=None),
136
137 repetoire=SIMP(typ='Repertoire',fr='',ang='',statut='o',docu='',min=1,max=1,defaut=None),
138
139
140
141 - a default value (or not)
142
143 - a cardinality.
144
145 - a short documentation
146
147 - an interval of values or a set of discrete values
148
149
150 Input data panel depends on both these attributes. It forces the user to enter a list if needed, it verifies the input type...
151
152 - Example of input Data Pannel for complex valuesNew
153
154 .. image:: images/complex.png
155    :align: center
156
157
158 Color chart
159 -----------
160
161 a very simple colors chart helps the user to know if a item is valid or not :
162
163 * In the JDC tree view
164
165    - green square  : valid objects (JDC, Oper ...)
166    - red square    : unvalid objects 
167    - yellow square : valids OPER the user must name 
168    - green circle  : valid keywords
169    - red circle    : unvalid keywords 
170    - green rhomb   : condition. all the depending keywords are valid
171    - yellow rhomb  : condition. one of the depending keywords is unvalid
172
173 * In the rules part
174
175    - red is for unobserved rules
176    - black is for observed rules
177
178
179 Context Menus 
180 -------------
181 In the JDC tree, Context menus  (invoked by right-clicking) allow user to :
182
183 - create comments in the tree
184 - comment the command itself
185 - create parameter
186 - delete the node 
187
188 .. image:: images/menus.png
189    :align: center
190
191
192 Parameters 
193 ----------
194
195 The Users can define parameters. As parameters, Eficas accepts :
196
197 - Real
198 - String
199 - Integer
200 - List
201
202 A parameter's definition can use existing parameters such as :
203 eps=sqrt((((W / NX) ** 2) + ((H / NY) ** 2)))
204
205 Pushing on "Parametres" Pushbutton opens a dialog containing all correct parameters (depending of the attended value's type)
206
207 .. image:: images/parametres.png
208    :align: center
209
210
211 To select the value in the modal dialog widget, highligh the corresponding line and Push on "Valider".
212
213
214
215 Import data from file
216 ---------------------
217
218 The user also can import data from a ASCII text file by pushing button "Importer". He chooses to import part of  or the complete file.  
219
220 .. image:: images/import.png
221    :align: center
222
223
224 Reports
225 -------
226 You have acces to 
227
228 - Rapport de Validation (Jdc Menu) : It resumes JDC errors
229 - Fichier Source (JdC Menu) : It shows the text of the initial JDC (in the .comm file). 
230 - Fichier Resultat (JdC Menu) : It shows the text which will be stored at next 
231
232 .. image:: images/rapport.png
233    :align: center
234
235
236 Multiples files
237 ---------------
238
239 EFICAS allows you to open
240 simultaneously files with differents catalogs  : for example a file with Openturns Study catalog and a file for Openturns wrapper. The user also can easely swap from one file to another by clicking on its tab.
241
242
243
244 .. image:: images/multiples.png
245    :align: center
246
247
248 If the user want to open the same file  in two tabs, Eficas allows it, but corrections in one tabs are not reported in the other. 
249
250 .. image:: images/duplication.png
251    :align: center
252
253