Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[samples/calculator.git] / idl / CALCULATOR_Gen.idl
1 // Copyright (C) 2005  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/
18 //
19 #ifndef __CALCULATOR_GEN__
20 #define __CALCULATOR_GEN__
21 /*!
22  \defgroup EXAMPLES SALOME EXAMPLES components
23  */
24
25 #include "SALOME_Component.idl"
26 #include "SALOME_Exception.idl"
27 #include "MED.idl"
28
29
30 /*!  \ingroup EXAMPLES
31
32 This package contains the interface CALCULATOR_ORB used 
33 for  %CALCULATOR component as an example in %SALOME application.
34 */
35 module CALCULATOR_ORB
36 {
37   /*! \brief Interface of the %CALCULATOR component
38    */
39   interface CALCULATOR_Gen : Engines::Component
40   {
41      /*!
42          Calculate the maximum relative difference of field with the previous one.
43          At first call, store passed field and return 1.
44       */
45      double convergenceCriteria(in SALOME_MED::FIELDDOUBLE field);
46      /*!
47          Apply to each (scalar) field component the linear function x -> ax+b.
48          Release field1 after use.
49       */
50      SALOME_MED::FIELDDOUBLE applyLin(in SALOME_MED::FIELDDOUBLE field1, in double a1, in double a2);
51
52      /*!
53          Addition of fields. 
54          Return exception if fields are not compatible.
55          Release field1 and field2 after use.
56      */
57      SALOME_MED::FIELDDOUBLE add(in SALOME_MED::FIELDDOUBLE field1, in SALOME_MED::FIELDDOUBLE field2)
58          raises (SALOME::SALOME_Exception);
59
60      /*!
61          return euclidian norm of field
62          Release field after use.
63       */
64      double norm2(in SALOME_MED::FIELDDOUBLE field);
65
66      /*!
67          return L2 norm of field
68          Release field after use.
69       */
70      double normL2(in SALOME_MED::FIELDDOUBLE field);
71
72      /*!
73          return L1 norm of field
74          Release field after use.
75       */
76      double normL1(in SALOME_MED::FIELDDOUBLE field);
77
78      /*!
79          return max norm of field
80          Release field after use.
81       */
82      double normMax(in SALOME_MED::FIELDDOUBLE field);
83
84      /*!
85          This utility method print in standard output the coordinates & field values
86          Release field after use.
87       */
88      void printField(in SALOME_MED::FIELDDOUBLE field);
89
90      /*!
91          This method clones field in four examples.
92          Release field after use.
93       */
94      void cloneField(in SALOME_MED::FIELDDOUBLE field, out SALOME_MED::FIELDDOUBLE clone1, 
95                      out SALOME_MED::FIELDDOUBLE clone2, out SALOME_MED::FIELDDOUBLE clone3,
96                      out SALOME_MED::FIELDDOUBLE clone4 );
97   };
98 };
99
100 #endif
101