Salome HOME
Documentation and code minor corrections
[modules/adao.git] / src / daSalome / adaoBuilder.py
1 # -*- coding: utf-8 -*-
2 #
3 # Copyright (C) 2008-2018 EDF R&D
4 #
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
9 #
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18 #
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #
21 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
22
23 """
24     Normalized interface for ADAO scripting (full version API)
25
26     The main interface to use is an object "New" build from "adaoBuilder".
27
28     Usage by an example:
29
30         from numpy import array, matrix
31         from adao import adaoBuilder
32         case = adaoBuilder.New()
33         case.set( 'AlgorithmParameters', Algorithm='3DVAR' )
34         case.set( 'Background',          Vector=[0, 1, 2] )
35         case.set( 'BackgroundError',     ScalarSparseMatrix=1.0 )
36         case.set( 'Observation',         Vector=array([0.5, 1.5, 2.5]) )
37         case.set( 'ObservationError',    DiagonalSparseMatrix='1 1 1' )
38         case.set( 'ObservationOperator', Matrix='1 0 0;0 2 0;0 0 3' )
39         case.execute()
40         #
41         print(case.get("Analysis")[-1])
42
43     Documentation
44
45         See associated up-to-date documentation for details of commands.
46 """
47 __author__ = "Jean-Philippe ARGAUD"
48 __all__ = ["New"]
49
50 from daCore.Aidsm import Aidsm as _Aidsm
51 from daCore.version import name, version, year, date
52
53 # ==============================================================================
54 class New(_Aidsm):
55     """
56     Generic ADAO TUI builder
57     """
58     def __init__(self, name = ""):
59         _Aidsm.__init__(self, name)
60
61 # ==============================================================================
62 if __name__ == "__main__":
63     print('\n AUTODIAGNOSTIC \n')