1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : CalculatorEngine.cxx
23 // Author : Laurent DADA, CEA
24 // Module : CalculatorComponent
32 #include "CalculatorEngine.hxx"
33 #include "MEDMEM_Support_i.hxx"
35 #include "MEDMEM_define.hxx"
36 #include "MEDMEM_STRING.hxx"
37 #include "MEDMEM_Exception.hxx"
38 #include "MEDMEM_Unit.hxx"
42 #include "utilities.h"
44 using namespace MEDMEM;
47 //================================================================================
48 // static PrintFieldValues - shows field contents
49 //================================================================================
51 static void PrintFieldValues (FIELD<double> * field, int until_index)
53 const double * values = field -> getValue(MED_EN::MED_FULL_INTERLACE);
54 int nb_comp = field -> getNumberOfComponents();
55 MESSAGE( "Field : " << field -> getName() );
56 MESSAGE( " Description : " << field -> getDescription() );
57 MESSAGE( " Number of components : " << nb_comp );
59 for (int i=0 ; i<nb_comp ; i++) {
60 MESSAGE ( " Component " << field -> getComponentName(i+1) << endl \
61 << " Unit : " << field -> getMEDComponentUnit(i+1) << endl \
62 << " Description : " << field -> getComponentDescription(i+1) );
64 MESSAGE( " First " << until_index << " values : " );
66 for (int j=0 ; j < until_index ; j++) {
67 for (int i=0;i<nb_comp;i++) MESSAGE( values[i+j*nb_comp] << " " );
72 //================================================================================
74 //================================================================================
76 CalculatorEngine::CalculatorEngine(CORBA::ORB_ptr orb,
77 PortableServer::POA_ptr poa,
78 PortableServer::ObjectId * contId,
79 const char *instanceName,
80 const char *interfaceName) :
81 Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true)
83 MESSAGE("CalculatorEngine::CalculatorEngine activate object instanceName("
84 << instanceName << ") interfaceName(" << interfaceName << ")" )
86 _id = _poa->activate_object(_thisObj);
87 SALOME_NamingService *NS = new SALOME_NamingService(orb);
91 CalculatorEngine::CalculatorEngine()
95 //================================================================================
97 //================================================================================
99 CalculatorEngine::~CalculatorEngine()
103 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::PutToStudy(SALOME_MED::FIELDDOUBLE_ptr theField1,
104 long int theStudyId) {
105 CORBA::Object_var anObj = _NS->Resolve("/myStudyManager");
106 SALOMEDS::StudyManager_var aManager = SALOMEDS::StudyManager::_narrow(anObj);
107 // SALOMEDS::ListOfOpenStudies_var aList = aManager->GetOpenStudies();
108 // SALOMEDS::Study_var aStudy = aManager->GetStudyByName(aList[0]);
109 SALOMEDS::Study_var aStudy = aManager->GetStudyByID(theStudyId);
110 SALOMEDS::StudyBuilder_var aBuilder = aStudy->NewBuilder();
112 SALOMEDS::SComponent_var aComponent = aStudy->FindComponent("Calculator");
113 if (aComponent->_is_nil()) aComponent = aBuilder->NewComponent("Calculator");
114 SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributeName");
115 SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
116 aName->SetValue("Calculator");
118 SALOMEDS::SObject_var aSO = aBuilder->NewObject(aComponent);
119 anAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeName");
120 aName = SALOMEDS::AttributeName::_narrow(anAttr);
122 sprintf(aFieldName, "Field_%d", (int)aSO->Tag());
123 aName->SetValue(strdup(aFieldName));
125 ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
126 ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
127 CORBA::ORB_var &orb = init(0,0);
129 string iorStr = orb->object_to_string(theField1);
130 anAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeIOR");
131 SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
132 anIOR->SetValue(iorStr.c_str());
134 return SALOME_MED::FIELDDOUBLE::_duplicate(theField1);
138 //=======================================================================================
139 // Addition of 2 FieldNodeDouble (based on Med library)
143 // - number of components
144 // - name, type, unit and description of components
145 // are the same for the 2 fields.
148 // the result will be a copy of the first field.
150 //=======================================================================================
152 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,
153 SALOME_MED::FIELDDOUBLE_ptr SecondField)
156 bool same_support = true;
158 beginService("CalculatorEngine::Add");
160 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add is Computing");
162 BEGIN_OF("CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,SALOME_MED::FIELDDOUBLE_ptr SecondField)");
167 string message = string("\n CalculatorEngine::Add : ") +
168 string("\n first field name --> ") + FirstField -> getName() +
169 string("\n second field name --> ") + SecondField -> getName();
171 sendMessage(NOTIF_TRACE, message.c_str());
173 // Number of components
174 int nb_comp1 = FirstField -> getNumberOfComponents();
175 int nb_comp2 = SecondField -> getNumberOfComponents();
176 if (nb_comp1 != nb_comp2) same_support = false;
177 MESSAGE( " nb_comp1 --> " << nb_comp1 <<endl );
178 MESSAGE( " nb_comp2 --> " << nb_comp2 <<endl );
181 /* Name Description and Unit of each component of the field */
183 string * component_name = new string[nb_comp1];
184 string * component_unit = new string[nb_comp1];
186 for (int i=0 ; i<nb_comp1 ; i++) {
187 component_name[i].assign(FirstField -> getComponentName(i+1));
188 component_unit[i].assign(FirstField -> getComponentUnit(i+1));
192 (component_name[i] != SecondField -> getComponentName(i+1)) ||
193 (component_unit[i] != SecondField -> getComponentUnit(i+1)))
194 same_support = false;
198 MESSAGE("CalculatorEngine::Add Number of entities in the Support of each fields");
200 // Number of entities in the Support of the field
204 SALOME_MED::SUPPORT_ptr support1 = FirstField -> getSupport();
205 SALOME_MED::SUPPORT_ptr support2 = SecondField -> getSupport();
211 SALOME_MED::MESH_ptr mesh1 = support1 -> getMesh();
212 SALOME_MED::MESH_ptr mesh2 = support2 -> getMesh();
217 if (same_support && support1 != support2) same_support = false;
219 if (support1 -> isOnAllElements())
220 len_value1 = support1 -> getMesh() -> getNumberOfElements(support1 -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
222 len_value1 = support1 -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
226 if (support2 -> isOnAllElements())
227 len_value2 = support2 -> getMesh() -> getNumberOfElements(support2 -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
229 len_value2 = support2 -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
231 if (same_support && len_value1 != len_value2) same_support = false;
235 // Values of new field
236 SALOME_MED::double_array * first_value = FirstField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
237 SALOME_MED::double_array * second_value;
239 second_value = SecondField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
240 tmp << "\n CalculatorEngine::Add : " ;
241 tmp << "\n Number of entities in the Support of first field = " << len_value1 ;
242 tmp << "\n Number of entities in the Support of second field = " << len_value2 ;
245 sendMessage(NOTIF_TRACE, message.c_str());
249 int totalLength = nb_comp1*len_value1;
250 double * new_value = new double[totalLength];
253 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add - field1 and field2 have the same support");
255 for(int i=0 ; i<totalLength ; i++)
256 new_value[i] = ((*first_value)[i]) + ((*second_value)[i]);
259 for(int i=0 ; i<totalLength ; i++)
260 new_value[i] = ((*first_value)[i]) ;
263 // Creation of a Local Field
265 MESSAGE("CalculatorEngine::Add Creation of the local field "<< totalLength);
267 FIELD<double> * fieldloc = new FIELD<double>();
268 fieldloc -> allocValue(nb_comp1,len_value1);
269 fieldloc -> setValue(MED_EN::MED_FULL_INTERLACE,new_value);
270 fieldloc -> setValueType(MED_EN::MED_REEL64);
271 fieldloc -> setName("-new_Add-");
272 fieldloc -> setDescription( FirstField -> getDescription() );
273 fieldloc -> setComponentsNames(component_name);
274 fieldloc -> setMEDComponentsUnits(component_unit);
277 int until_index = ( 20 > len_value1)? len_value1 : 20;
278 PrintFieldValues (fieldloc,until_index);
280 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add - new field created");
283 // Creation of the new CORBA field
285 MESSAGE("CalculatorEngine::Add Creation of the CORBA field");
287 // Corrected by APV - November 23, 2004
288 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(support1,fieldloc) ;
289 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
291 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
292 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
296 END_OF("CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,SALOME_MED::FIELDDOUBLE_ptr SecondField)");
298 endService("CalculatorEngine::Add");
304 //===============================================================================
305 // Multiplication of a FieldNodeDouble by a double value (based on Med library)
306 //===============================================================================
308 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,
311 beginService("CalculatorEngine::Mul");
313 BEGIN_OF("CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,CORBA::Double x1)");
318 // Name and description of field
319 string field_name = OldField -> getName();
320 string field_description = OldField -> getDescription();
322 // Number of components
323 int nb_comp = OldField -> getNumberOfComponents();
324 string * component_name = new string[nb_comp];
325 string * component_unit = new string[nb_comp];
327 for (int i=0 ; i<nb_comp ; i++) {
328 component_name[i] = OldField -> getComponentName(i+1);
329 component_unit[i] = OldField -> getComponentUnit(i+1);
332 MESSAGE("CalculatorEngine::Mul Number of entities in the Support of the field");
334 // Number of entities in the Support of the field
337 SALOME_MED::SUPPORT_ptr support = OldField -> getSupport();
341 SALOME_MED::MESH_ptr mesh = support -> getMesh();
345 if (support -> isOnAllElements())
346 len_value = support -> getMesh() -> getNumberOfElements(support -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
348 len_value = support -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
352 // Values of new field
353 SALOME_MED::double_array * old_value = OldField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
355 int totalLength = nb_comp*len_value;
356 double * new_value = new double[totalLength];
357 for(int i=0 ; i<totalLength ; i++) {
358 new_value[i] = x1 * ((*old_value)[i]);
361 // Creation of a Local Field
363 MESSAGE("CalculatorEngine::Mul Creation of the local field "<< totalLength);
365 FIELD<double> * fieldloc = new FIELD<double>();
366 fieldloc -> allocValue(nb_comp,len_value);
367 fieldloc -> setValue(MED_EN::MED_FULL_INTERLACE,new_value);
368 fieldloc -> setValueType(MED_EN::MED_REEL64);
369 fieldloc -> setName("-new_Mul-");
370 fieldloc -> setDescription(field_description);
371 fieldloc -> setComponentsNames(component_name);
372 fieldloc -> setMEDComponentsUnits(component_unit);
375 // Creation of the new CORBA field
377 MESSAGE("CalculatorEngine::Mul Creation of the CORBA field");
379 // Corrected by APV - November 23, 2004
380 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(support,fieldloc) ;
381 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
383 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
384 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
388 END_OF("CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,CORBA::Double x1)");
390 endService("CalculatorEngine::Mul");
395 //================================================================================
396 // Build a constant field of double based on first field support (Med library)
397 //================================================================================
399 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,
403 beginService("CalculatorEngine::Const");
405 BEGIN_OF("CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,CORBA::Double x1)");
407 // Name and description of field
408 string field_name = FirstField -> getName();
409 string field_description = FirstField -> getDescription();
411 SALOME_MED::SUPPORT_ptr FirstSupport = FirstField -> getSupport();
413 // Number of components
414 int nb_comp = FirstField -> getNumberOfComponents();
416 // Type, name, unit and description of components
417 string * component_name = new string[nb_comp];
418 string * component_unit = new string[nb_comp];
420 for (int i = 0 ; i<nb_comp ; i++) {
421 component_name[i] = FirstField -> getComponentName(i+1);
422 component_unit[i] = FirstField -> getComponentUnit(i+1);
425 MESSAGE("CalculatorEngine::Constant Number of entities in the Support of the field");
427 // Number of entities in the Support of the field
430 SCRUTE(FirstSupport);
432 SALOME_MED::MESH_ptr mesh = FirstSupport -> getMesh();
436 if ( FirstSupport -> isOnAllElements() )
437 len_value = FirstSupport -> getMesh() -> getNumberOfElements(FirstSupport -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
439 len_value = FirstSupport -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
441 // Values of new field
442 SALOME_MED::double_array * old_value = FirstField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
444 int totalLength = nb_comp*len_value;
445 double * new_value = new double[totalLength];
447 for(int i=0 ; i<totalLength ; i++)
451 // Creation of a Local Field
453 MESSAGE("CalculatorEngine::Constant Creation of the local field "<< totalLength);
455 FIELD<double> * fieldloc = new FIELD<double>();
456 fieldloc -> allocValue(nb_comp,len_value);
457 fieldloc -> setValue(MED_EN::MED_FULL_INTERLACE,new_value);
458 fieldloc -> setValueType(MED_EN::MED_REEL64);
459 fieldloc -> setName("-new_Const_Field-");
460 fieldloc -> setDescription(field_description);
461 fieldloc -> setComponentsNames(component_name);
462 fieldloc -> setMEDComponentsUnits(component_unit);
465 int until_index = ( 20 > len_value)? len_value : 20 ;
466 PrintFieldValues (fieldloc,until_index);
468 // Creation of the new CORBA field
470 MESSAGE("CalculatorEngine::Constant Creation of the CORBA field");
472 // Corrected by APV - November 23, 2004
473 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(FirstSupport,fieldloc) ;
474 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
476 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
477 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
481 endService("CalculatorEngine::Const");
483 END_OF("CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,CORBA::Double x1)");
489 //================================================================================
490 // write a field in a MED file
491 //================================================================================
493 void CalculatorEngine::writeMEDfile(SALOME_MED::FIELDDOUBLE_ptr field, const char *filename)
495 beginService("CalculatorEngine::writeMEDfile");
496 MESSAGE("fichier d'impression du champ resultat:"<<filename);
498 // get support of the field
500 SALOME_MED::SUPPORT_ptr support = field -> getSupport();
502 // get mesh from this support
504 SALOME_MED::MESH_ptr mesh = support -> getMesh();
508 int index_m = mesh->addDriver(SALOME_MED::MED_DRIVER,filename,mesh->getName());
510 mesh -> write(index_m,"");
514 const char * LOC = "CalculatorEngine::writeMEDfile ";
516 MESSAGE("fichier :"<<filename);
518 med_2_1::med_idt _medIdt = med_2_1::MEDouvrir(const_cast <char *> (filename) , med_2_1::MED_ECRI);
521 if (_medIdt<0) return;
525 int component_count= field->getNumberOfComponents();
526 string component_name(component_count*MED_TAILLE_PNOM,' ') ;
527 string component_unit(component_count*MED_TAILLE_PNOM,' ') ;
529 for (int i=0; i < component_count ; i++) {
530 component_name.replace(i*MED_TAILLE_PNOM,MED_TAILLE_PNOM,(field -> getComponentName(i+1)),0,MED_TAILLE_PNOM);
531 component_unit.replace(i*MED_TAILLE_PNOM,MED_TAILLE_PNOM,(field -> getComponentUnit(i+1)),0,MED_TAILLE_PNOM);
534 MESSAGE("component_name=|"<<component_name<<"|");
535 MESSAGE("component_unit=|"<<component_unit<<"|");
537 // already existing ?
539 char * champName = new char[MED_TAILLE_NOM+1] ;
540 char * compName, * compUnit ;
543 int n = med_2_1::MEDnChamp(_medIdt,0);
546 med_2_1::med_type_champ type ;
548 for (int i = 1; i <= n; i++)
550 nbComp = med_2_1::MEDnChamp(_medIdt,i);
551 compName = new char[MED_TAILLE_PNOM*nbComp+1];
552 compUnit = new char[MED_TAILLE_PNOM*nbComp+1];
554 err = med_2_1::MEDchampInfo(_medIdt,i,champName,&type,compName,compUnit,nbComp);
556 if (strcmp(champName, field->getName())==0) { // Found !
567 if (nbComp != component_count)
568 throw MEDEXCEPTION ( LOCALIZED (STRING(LOC)
569 <<": Field exist in file, but number of component are different : " \
570 <<nbComp<<" in file and "<<component_count<<" in CORBA object."
573 // component name and unit
574 MESSAGE(LOC<<" Component name in file : "<<compName);
575 MESSAGE(LOC<<" Component name in CORBA object : "<<component_name);
576 MESSAGE(LOC<<" Component unit in file : "<<compUnit);
577 MESSAGE(LOC<<" Component unit in CORBA object : "<<component_unit);
582 // Verify the field doesn't exist
584 string dataGroupName = "/CHA/"+ string(field->getName());
586 MESSAGE(LOC << "|" << dataGroupName << "|" );
588 med_2_1::med_idt gid = H5Gopen(_medIdt, dataGroupName.c_str() );
592 err=med_2_1::MEDchampCr(_medIdt,
593 const_cast <char*> (field->getName()),
595 const_cast <char*> ( component_name.c_str() ),
596 const_cast <char*> ( component_unit.c_str() ),
599 throw MEDEXCEPTION( LOCALIZED (STRING(LOC)
600 << ": Error MEDchampCr : "<<err
607 SALOME_MED::SUPPORT_ptr mySupport = field -> getSupport();
610 if (! mySupport->isOnAllElements())
611 throw MEDEXCEPTION ( LOCALIZED (STRING(LOC)
612 <<": Field must be on all entity"
616 SALOME_MED::MESH_ptr myMesh = mySupport -> getMesh();
619 SALOME_MED::medGeometryElement_array* Types = mySupport->getTypes() ;
621 int NumberOfType = Types->length() ;
623 for ( int i = 0; i < NumberOfType; i++ )
625 int NumberOfElements = mySupport->getNumberOfElements ( (*Types)[i] ) ;
626 int NumberOfGaussPoint = mySupport->getNumberOfGaussPoint ( (*Types)[i] ) ;
628 MESSAGE( " " << field->getName() );
629 MESSAGE( " " << NumberOfElements );
630 MESSAGE( " " << NumberOfGaussPoint );
631 MESSAGE( " " << (int) (convertIdlEntToMedEnt(mySupport->getEntity())) );
632 MESSAGE( " " << (int)(convertIdlEltToMedElt((*Types)[i])) );
633 MESSAGE( " " << field->getIterationNumber() );
634 MESSAGE( " " << field->getTime() );
635 MESSAGE( " " << field->getOrderNumber() );
636 MESSAGE( "MEDchampEcr :" << myMesh->getName() );
638 SALOME_MED::double_array * value = field->getValue( SALOME_MED::MED_FULL_INTERLACE ) ;
639 double *locvalue = new double[NumberOfElements];
640 for (int k = 0; k < NumberOfElements; k++)
641 locvalue[k] = (*value) [k];
643 err=med_2_1::MEDchampEcr(_medIdt,
644 const_cast <char*> (myMesh->getName()) ,
645 const_cast <char*> (field->getName()),
646 (unsigned char*)locvalue,
647 med_2_1::MED_FULL_INTERLACE,
653 (med_2_1::med_entite_maillage)convertIdlEntToMedEnt(mySupport->getEntity()),
654 (med_2_1::med_geometrie_element)(convertIdlEltToMedElt((*Types)[i])),
655 field->getIterationNumber(),
658 field->getOrderNumber()
662 if (err < MED_VALID )
663 throw MEDEXCEPTION(LOCALIZED( STRING(LOC)
664 <<": Error in writing Field "<< field->getName() <<", type "<<(*Types)[i]
671 if (err < 0 ) return ;
673 med_2_1::MEDfermer(_medIdt) ;
675 endService("CalculatorEngine::writeMEDfile");
682 //===========================================================================
683 // CalculatorEngine_factory
684 //===========================================================================
685 PortableServer::ObjectId * CalculatorEngine_factory
687 PortableServer::POA_ptr poa,
688 PortableServer::ObjectId * contId,
689 const char *instanceName,
690 const char *interfaceName)
692 MESSAGE("CalculatorEngine_factory CalculatorEngine ("
693 << instanceName << "," << interfaceName << ")");
694 CalculatorEngine * myCalculator
695 = new CalculatorEngine(orb, poa, contId, instanceName, interfaceName);
696 return myCalculator->getId() ;