1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef __CALCULATOR_GEN__
24 #define __CALCULATOR_GEN__
26 \defgroup EXAMPLES SALOME EXAMPLES components
29 #include "SALOME_Component.idl"
30 #include "SALOME_Exception.idl"
31 #include "MEDCouplingCorbaServant.idl"
36 This package contains the interface CALCULATOR_ORB used
37 for %CALCULATOR component as an example in %SALOME application.
42 Enumeration ErrorCode contains a code of the error
44 typedef long ErrorCode;
45 const ErrorCode NO_ERROR = 0;
46 const ErrorCode NOT_COMPATIBLE = 1;
47 const ErrorCode EXCEPTION_RAISED = 2;
48 const ErrorCode INVALID_FIELD = 3;
51 /*! \brief Interface of the %CALCULATOR component
53 interface CALCULATOR_Gen : Engines::EngineComponent
56 Calculate the maximum relative difference of field with the previous one.
57 At first call, store passed field and return 1.
59 double convergenceCriteria(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
61 Apply to each (scalar) field component the linear function x -> ax+b.
62 Release field1 after use.
64 SALOME_MED::MEDCouplingFieldDoubleCorbaInterface applyLin(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field1, in double a1, in double a2);
68 Release field1 and field2 after use.
70 SALOME_MED::MEDCouplingFieldDoubleCorbaInterface add(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field1, in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field2);
73 return euclidian norm of field
74 Release field after use.
76 double norm2(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
79 return L2 norm of field
80 Release field after use.
82 double normL2(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
85 return L1 norm of field
86 Release field after use.
88 double normL1(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
91 return max norm of field
92 Release field after use.
94 double normMax(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
97 This utility method print in standard output the coordinates & field values
98 Release field after use.
100 void printField(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
103 This method clones field in four examples.
104 Release field after use.
106 void cloneField(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field, out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone1,
107 out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone2, out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone3,
108 out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone4 );
111 This method returns True if the operation succeded.
112 Otherwise returns False.
117 This method return an error code
119 ErrorCode getErrorCode();