Salome HOME
Preparation of 3.1.0a2: merge with BR_3_0_0_OCC
[samples/calculator.git] / idl / CALCULATOR_Gen.idl
1 #ifndef __CALCULATOR_GEN__
2 #define __CALCULATOR_GEN__
3 /*!
4  \defgroup EXAMPLES SALOME EXAMPLES components
5  */
6
7 #include "SALOME_Component.idl"
8 #include "SALOME_Exception.idl"
9 #include "MED.idl"
10
11
12 /*!  \ingroup EXAMPLES
13
14 This package contains the interface CALCULATOR_ORB used 
15 for  %CALCULATOR component as an example in %SALOME application.
16 */
17 module CALCULATOR_ORB
18 {
19   /*! \brief Interface of the %CALCULATOR component
20    */
21   interface CALCULATOR_Gen : Engines::Component
22   {
23      /*!
24          Calculate the maximum relative difference of field with the previous one.
25          At first call, store passed field and return 1.
26       */
27      double convergenceCriteria(in SALOME_MED::FIELDDOUBLE field);
28      /*!
29          Apply to each (scalar) field component the linear function x -> ax+b.
30          Release field1 after use.
31       */
32      SALOME_MED::FIELDDOUBLE applyLin(in SALOME_MED::FIELDDOUBLE field1, in double a1, in double a2);
33
34      /*!
35          Addition of fields. 
36          Return exception if fields are not compatible.
37          Release field1 and field2 after use.
38      */
39      SALOME_MED::FIELDDOUBLE add(in SALOME_MED::FIELDDOUBLE field1, in SALOME_MED::FIELDDOUBLE field2)
40          raises (SALOME::SALOME_Exception);
41
42      /*!
43          return euclidian norm of field
44          Release field after use.
45       */
46      double norm2(in SALOME_MED::FIELDDOUBLE field);
47
48      /*!
49          return L2 norm of field
50          Release field after use.
51       */
52      double normL2(in SALOME_MED::FIELDDOUBLE field);
53
54      /*!
55          return L1 norm of field
56          Release field after use.
57       */
58      double normL1(in SALOME_MED::FIELDDOUBLE field);
59
60      /*!
61          return max norm of field
62          Release field after use.
63       */
64      double normMax(in SALOME_MED::FIELDDOUBLE field);
65
66      /*!
67          This utility method print in standard output the coordinates & field values
68          Release field after use.
69       */
70      void printField(in SALOME_MED::FIELDDOUBLE field);
71
72      /*!
73          This method clones field in four examples.
74          Release field after use.
75       */
76      void cloneField(in SALOME_MED::FIELDDOUBLE field, out SALOME_MED::FIELDDOUBLE clone1, 
77                      out SALOME_MED::FIELDDOUBLE clone2, out SALOME_MED::FIELDDOUBLE clone3,
78                      out SALOME_MED::FIELDDOUBLE clone4 );
79   };
80 };
81
82 #endif
83