1 // Copyright (C) 2007-2019 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, or (at your option) any later version.
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__
27 \defgroup EXAMPLES SALOME EXAMPLES components
30 #include "SALOME_Component.idl"
31 #include "SALOME_Exception.idl"
32 #include "MEDCouplingCorbaServant.idl"
36 This package contains the interface CALCULATOR_ORB used
37 for %CALCULATOR component as an example in %SALOME application.
43 \brief Enumeration ErrorCode contains a code of the error
45 typedef long ErrorCode;
46 const ErrorCode RES_OK = 0;
47 const ErrorCode NOT_COMPATIBLE = 1;
48 const ErrorCode EXCEPTION_RAISED = 2;
49 const ErrorCode INVALID_FIELD = 3;
52 \brief Interface of the %CALCULATOR component
54 interface CALCULATOR_Gen : Engines::EngineComponent
57 \brief Calculate maximum relative difference of field with the previous one.
58 At first call store passed field and return 1.
60 double convergenceCriteria(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
63 \brief Apply to each (scalar) field component the linear function x -> ax+b.
64 Release field1 after use.
66 SALOME_MED::MEDCouplingFieldDoubleCorbaInterface applyLin(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field,
67 in double a, in double b);
70 \brief Sum two fields.
71 Release field1 and field2 after use.
73 SALOME_MED::MEDCouplingFieldDoubleCorbaInterface add(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field1,
74 in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field2);
77 \brief Get Euclidian norm of field
78 Release field after use.
80 double norm2(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
83 \brief Get L2 norm of field
84 Release field after use.
86 double normL2(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
89 \brief Get L1 norm of field
90 Release field after use.
92 double normL1(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
95 \brief Get max norm of field
96 Release field after use.
98 double normMax(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
101 \brief Print out the coordinates and field values to standard output
102 Release field after use.
104 void printField(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
107 \brief Clone source field into four copies.
108 Release field after use.
110 void cloneField(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field,
111 out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone1,
112 out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone2,
113 out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone3,
114 out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone4);
117 \brief Get last operation status; returns \c True if last operation succeded,
118 otherwise returns \c False.
123 \brief Get last error code
125 ErrorCode getErrorCode();