1 #-*-coding:iso-8859-1-*-
2 # Copyright (C) 2010-2013 EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Author: André Ribes, andre.ribes@edf.fr, EDF R&D
23 study_config["Name"] = "test000_Blue"
24 study_config["Algorithm"] = "Blue"
26 Background_config = {}
27 Background_config["Data"] = "0,1,2"
28 Background_config["Type"] = "Vector"
29 Background_config["From"] = "String"
30 study_config["Background"] = Background_config
32 BackgroundError_config = {}
33 BackgroundError_config["Data"] = "1 0 0;0 1 0;0 0 1"
34 BackgroundError_config["Type"] = "Matrix"
35 BackgroundError_config["From"] = "String"
36 study_config["BackgroundError"] = BackgroundError_config
38 Observation_config = {}
39 Observation_config["Data"] = "0.5,1.5,2.5"
40 Observation_config["Type"] = "Vector"
41 Observation_config["From"] = "String"
42 study_config["Observation"] = Observation_config
44 ObservationError_config = {}
45 ObservationError_config["Data"] = "1 0 0;0 1 0;0 0 1"
46 ObservationError_config["Type"] = "Matrix"
47 ObservationError_config["From"] = "String"
48 study_config["ObservationError"] = ObservationError_config
50 ObservationOperator_config = {}
51 ObservationOperator_config["Data"] = "1 0 0;0 1 0;0 0 1"
52 ObservationOperator_config["Type"] = "Matrix"
53 ObservationOperator_config["From"] = "String"
54 study_config["ObservationOperator"] = ObservationOperator_config
57 Analysis_config["Data"] = """
61 Xa = ADD.get("Analysis")
63 print " Nombre d'analyses :",Xa.stepnumber()
64 print " Analyse résultante :",Xa[0]
66 # Vérification du résultat
67 # ------------------------
68 if max(numpy.array(Xa[0])-numpy.array([0.25, 1.25, 2.25])) > precision:
69 raise ValueError("Résultat du test erroné")
71 print " Test correct, erreur maximale inférieure à %s"%precision
74 Analysis_config["From"] = "String"
75 study_config["Analysis"] = Analysis_config