1 // Copyright (C) 2005 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __CALCULATOR_GEN__
20 #define __CALCULATOR_GEN__
22 \defgroup EXAMPLES SALOME EXAMPLES components
25 #include "SALOME_Component.idl"
26 #include "SALOME_Exception.idl"
32 This package contains the interface CALCULATOR_ORB used
33 for %CALCULATOR component as an example in %SALOME application.
37 /*! \brief Interface of the %CALCULATOR component
39 interface CALCULATOR_Gen : Engines::Component
42 Calculate the maximum relative difference of field with the previous one.
43 At first call, store passed field and return 1.
45 double convergenceCriteria(in SALOME_MED::FIELDDOUBLE field);
47 Apply to each (scalar) field component the linear function x -> ax+b.
48 Release field1 after use.
50 SALOME_MED::FIELDDOUBLE applyLin(in SALOME_MED::FIELDDOUBLE field1, in double a1, in double a2);
54 Return exception if fields are not compatible.
55 Release field1 and field2 after use.
57 SALOME_MED::FIELDDOUBLE add(in SALOME_MED::FIELDDOUBLE field1, in SALOME_MED::FIELDDOUBLE field2)
58 raises (SALOME::SALOME_Exception);
61 return euclidian norm of field
62 Release field after use.
64 double norm2(in SALOME_MED::FIELDDOUBLE field);
67 return L2 norm of field
68 Release field after use.
70 double normL2(in SALOME_MED::FIELDDOUBLE field);
73 return L1 norm of field
74 Release field after use.
76 double normL1(in SALOME_MED::FIELDDOUBLE field);
79 return max norm of field
80 Release field after use.
82 double normMax(in SALOME_MED::FIELDDOUBLE field);
85 This utility method print in standard output the coordinates & field values
86 Release field after use.
88 void printField(in SALOME_MED::FIELDDOUBLE field);
91 This method clones field in four examples.
92 Release field after use.
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 );