Line | |
---|
1 | from XDR import * |
---|
2 | |
---|
3 | ########################### |
---|
4 | # INITIALIZATION |
---|
5 | |
---|
6 | init() |
---|
7 | |
---|
8 | ## |
---|
9 | # |
---|
10 | model_names_list = [] |
---|
11 | after_model_names_list = [] |
---|
12 | |
---|
13 | # Create the list with the names of the models |
---|
14 | # Verify that either all the maximum fortran are given for all the models |
---|
15 | # either none fortran units are given |
---|
16 | nb_models = 0 |
---|
17 | nb_units = 0 |
---|
18 | for model_id in getChildrenName("models"): |
---|
19 | model_name = getValue(model_id) |
---|
20 | model_names_list.append(model_name) |
---|
21 | nb_models += 1 |
---|
22 | if model_name == "no label": |
---|
23 | error("You must give a name to your model or delete it") |
---|
24 | if getValue("maxunits",model_id) == "units_on" : |
---|
25 | nb_units += 1 |
---|
26 | |
---|
27 | if nb_models != nb_units and nb_units != 0 : |
---|
28 | error("The maximum fortan units must be given for none or for all the models") |
---|
29 | |
---|
30 | |
---|
31 | #print model_names_list |
---|
32 | setValue(model_names_list, "model_names_list") |
---|
33 | |
---|
34 | finish() |
---|
35 | |
---|
36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.