]> SALOME platform Git repositories - modules/adao.git/blob - src/tests/daSalome/test000_Blue_AnalysisCode.py
Salome HOME
Adding UnscentedKalmanFilter algorithm
[modules/adao.git] / src / tests / daSalome / test000_Blue_AnalysisCode.py
1 #-*-coding:iso-8859-1-*-
2 # Copyright (C) 2010-2013 EDF R&D
3 #
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.
8 #
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.
13 #
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
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
21
22 import numpy
23 precision = 1.e-13
24
25 Xa = ADD.get("Analysis")
26 print
27 print "    Nombre d'analyses  :",Xa.stepnumber()
28 print "    Analyse résultante :",Xa[0]
29 #
30 # Vérification du résultat
31 # ------------------------
32 if max(numpy.array(Xa[0])-numpy.array([0.25, 1.25, 2.25])) > precision:
33   raise ValueError("Résultat du test erroné")
34 else:
35   print "    Test correct, erreur maximale inférieure à %s"%precision
36   print
37