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
29 #include "utilities.h"
30 #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"
40 using namespace MEDMEM;
42 //================================================================================
43 // static PrintFieldValues - shows field contents
44 //================================================================================
46 static void PrintFieldValues (FIELD<double> * field, int until_index)
48 const double * values = field -> getValue(MED_FULL_INTERLACE);
49 int nb_comp = field -> getNumberOfComponents();
50 MESSAGE( "Field : " << field -> getName() );
51 MESSAGE( " Description : " << field -> getDescription() );
52 MESSAGE( " Number of components : " << nb_comp );
54 for (int i=0 ; i<nb_comp ; i++) {
55 MESSAGE ( " Component " << field -> getComponentName(i+1) << endl \
56 << " Unit : " << field -> getMEDComponentUnit(i+1) << endl \
57 << " Description : " << field -> getComponentDescription(i+1) );
59 MESSAGE( " First " << until_index << " values : " );
61 for (int j=0 ; j < until_index ; j++) {
62 for (int i=0;i<nb_comp;i++) MESSAGE( values[i+j*nb_comp] << " " );
67 //================================================================================
69 //================================================================================
71 CalculatorEngine::CalculatorEngine(CORBA::ORB_ptr orb,
72 PortableServer::POA_ptr poa,
73 PortableServer::ObjectId * contId,
74 const char *instanceName,
75 const char *interfaceName) :
76 Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true)
78 MESSAGE("CalculatorEngine::CalculatorEngine activate object instanceName("
79 << instanceName << ") interfaceName(" << interfaceName << ")" )
81 _id = _poa->activate_object(_thisObj);
82 SALOME_NamingService *NS = new SALOME_NamingService(orb);
86 CalculatorEngine::CalculatorEngine()
90 //================================================================================
92 //================================================================================
94 CalculatorEngine::~CalculatorEngine()
98 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::PutToStudy(SALOME_MED::FIELDDOUBLE_ptr theField1,
99 long int theStudyId) {
100 CORBA::Object_var anObj = _NS->Resolve("/myStudyManager");
101 SALOMEDS::StudyManager_var aManager = SALOMEDS::StudyManager::_narrow(anObj);
102 // SALOMEDS::ListOfOpenStudies_var aList = aManager->GetOpenStudies();
103 // SALOMEDS::Study_var aStudy = aManager->GetStudyByName(aList[0]);
104 SALOMEDS::Study_var aStudy = aManager->GetStudyByID(theStudyId);
105 SALOMEDS::StudyBuilder_var aBuilder = aStudy->NewBuilder();
107 SALOMEDS::SComponent_var aComponent = aStudy->FindComponent("Calculator");
108 if (aComponent->_is_nil()) aComponent = aBuilder->NewComponent("Calculator");
109 SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributeName");
110 SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
111 aName->SetValue("Calculator");
113 SALOMEDS::SObject_var aSO = aBuilder->NewObject(aComponent);
114 anAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeName");
115 aName = SALOMEDS::AttributeName::_narrow(anAttr);
117 sprintf(aFieldName, "Field_%d", (int)aSO->Tag());
118 aName->SetValue(strdup(aFieldName));
120 ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
121 ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
122 CORBA::ORB_var &orb = init(0,0);
124 string iorStr = orb->object_to_string(theField1);
125 anAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeIOR");
126 SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
127 anIOR->SetValue(iorStr.c_str());
129 return SALOME_MED::FIELDDOUBLE::_duplicate(theField1);
133 //=======================================================================================
134 // Addition of 2 FieldNodeDouble (based on Med library)
138 // - number of components
139 // - name, type, unit and description of components
140 // are the same for the 2 fields.
143 // the result will be a copy of the first field.
145 //=======================================================================================
147 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,
148 SALOME_MED::FIELDDOUBLE_ptr SecondField)
151 bool same_support = true;
153 beginService("CalculatorEngine::Add");
155 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add is Computing");
157 BEGIN_OF("CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,SALOME_MED::FIELDDOUBLE_ptr SecondField)");
162 string message = string("\n CalculatorEngine::Add : ") +
163 string("\n first field name --> ") + FirstField -> getName() +
164 string("\n second field name --> ") + SecondField -> getName();
166 sendMessage(NOTIF_TRACE, message.c_str());
168 // Number of components
169 int nb_comp1 = FirstField -> getNumberOfComponents();
170 int nb_comp2 = SecondField -> getNumberOfComponents();
171 if (nb_comp1 != nb_comp2) same_support = false;
172 MESSAGE( " nb_comp1 --> " << nb_comp1 <<endl );
173 MESSAGE( " nb_comp2 --> " << nb_comp2 <<endl );
176 /* Name Description and Unit of each component of the field */
178 string * component_name = new string[nb_comp1];
179 string * component_unit = new string[nb_comp1];
181 for (int i=0 ; i<nb_comp1 ; i++) {
182 component_name[i].assign(FirstField -> getComponentName(i+1));
183 component_unit[i].assign(FirstField -> getComponentUnit(i+1));
187 (component_name[i] != SecondField -> getComponentName(i+1)) ||
188 (component_unit[i] != SecondField -> getComponentUnit(i+1)))
189 same_support = false;
193 MESSAGE("CalculatorEngine::Add Number of entities in the Support of each fields");
195 // Number of entities in the Support of the field
199 SALOME_MED::SUPPORT_ptr support1 = FirstField -> getSupport();
200 SALOME_MED::SUPPORT_ptr support2 = SecondField -> getSupport();
206 SALOME_MED::MESH_ptr mesh1 = support1 -> getMesh();
207 SALOME_MED::MESH_ptr mesh2 = support2 -> getMesh();
212 if (same_support && support1 != support2) same_support = false;
214 if (support1 -> isOnAllElements())
215 len_value1 = support1 -> getMesh() -> getNumberOfElements(support1 -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
217 len_value1 = support1 -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
221 if (support2 -> isOnAllElements())
222 len_value2 = support2 -> getMesh() -> getNumberOfElements(support2 -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
224 len_value2 = support2 -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
226 if (same_support && len_value1 != len_value2) same_support = false;
230 // Values of new field
231 SALOME_MED::double_array * first_value = FirstField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
232 SALOME_MED::double_array * second_value;
234 second_value = SecondField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
235 tmp << "\n CalculatorEngine::Add : " ;
236 tmp << "\n Number of entities in the Support of first field = " << len_value1 ;
237 tmp << "\n Number of entities in the Support of second field = " << len_value2 ;
240 sendMessage(NOTIF_TRACE, message.c_str());
244 int totalLength = nb_comp1*len_value1;
245 double * new_value = new double[totalLength];
248 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add - field1 and field2 have the same support");
250 for(int i=0 ; i<totalLength ; i++)
251 new_value[i] = ((*first_value)[i]) + ((*second_value)[i]);
254 for(int i=0 ; i<totalLength ; i++)
255 new_value[i] = ((*first_value)[i]) ;
258 // Creation of a Local Field
260 MESSAGE("CalculatorEngine::Add Creation of the local field "<< totalLength);
262 FIELD<double> * fieldloc = new FIELD<double>();
263 fieldloc -> allocValue(nb_comp1,len_value1);
264 fieldloc -> setValue(MED_FULL_INTERLACE,new_value);
265 fieldloc -> setValueType(MED_EN::MED_REEL64);
266 fieldloc -> setName("-new_Add-");
267 fieldloc -> setDescription( FirstField -> getDescription() );
268 fieldloc -> setComponentsNames(component_name);
269 fieldloc -> setMEDComponentsUnits(component_unit);
272 int until_index = ( 20 > len_value1)? len_value1 : 20;
273 PrintFieldValues (fieldloc,until_index);
275 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add - new field created");
278 // Creation of the new CORBA field
280 MESSAGE("CalculatorEngine::Add Creation of the CORBA field");
282 // Corrected by APV - November 23, 2004
283 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(support1,fieldloc) ;
284 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
286 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
287 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
291 END_OF("CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,SALOME_MED::FIELDDOUBLE_ptr SecondField)");
293 endService("CalculatorEngine::Add");
299 //===============================================================================
300 // Multiplication of a FieldNodeDouble by a double value (based on Med library)
301 //===============================================================================
303 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,
306 beginService("CalculatorEngine::Mul");
308 BEGIN_OF("CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,CORBA::Double x1)");
313 // Name and description of field
314 string field_name = OldField -> getName();
315 string field_description = OldField -> getDescription();
317 // Number of components
318 int nb_comp = OldField -> getNumberOfComponents();
319 string * component_name = new string[nb_comp];
320 string * component_unit = new string[nb_comp];
322 for (int i=0 ; i<nb_comp ; i++) {
323 component_name[i] = OldField -> getComponentName(i+1);
324 component_unit[i] = OldField -> getComponentUnit(i+1);
327 MESSAGE("CalculatorEngine::Mul Number of entities in the Support of the field");
329 // Number of entities in the Support of the field
332 SALOME_MED::SUPPORT_ptr support = OldField -> getSupport();
336 SALOME_MED::MESH_ptr mesh = support -> getMesh();
340 if (support -> isOnAllElements())
341 len_value = support -> getMesh() -> getNumberOfElements(support -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
343 len_value = support -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
347 // Values of new field
348 SALOME_MED::double_array * old_value = OldField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
350 int totalLength = nb_comp*len_value;
351 double * new_value = new double[totalLength];
352 for(int i=0 ; i<totalLength ; i++) {
353 new_value[i] = x1 * ((*old_value)[i]);
356 // Creation of a Local Field
358 MESSAGE("CalculatorEngine::Mul Creation of the local field "<< totalLength);
360 FIELD<double> * fieldloc = new FIELD<double>();
361 fieldloc -> allocValue(nb_comp,len_value);
362 fieldloc -> setValue(MED_FULL_INTERLACE,new_value);
363 fieldloc -> setValueType(MED_EN::MED_REEL64);
364 fieldloc -> setName("-new_Mul-");
365 fieldloc -> setDescription(field_description);
366 fieldloc -> setComponentsNames(component_name);
367 fieldloc -> setMEDComponentsUnits(component_unit);
370 // Creation of the new CORBA field
372 MESSAGE("CalculatorEngine::Mul Creation of the CORBA field");
374 // Corrected by APV - November 23, 2004
375 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(support,fieldloc) ;
376 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
378 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
379 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
383 END_OF("CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,CORBA::Double x1)");
385 endService("CalculatorEngine::Mul");
390 //================================================================================
391 // Build a constant field of double based on first field support (Med library)
392 //================================================================================
394 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,
398 beginService("CalculatorEngine::Const");
400 BEGIN_OF("CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,CORBA::Double x1)");
402 // Name and description of field
403 string field_name = FirstField -> getName();
404 string field_description = FirstField -> getDescription();
406 SALOME_MED::SUPPORT_ptr FirstSupport = FirstField -> getSupport();
408 // Number of components
409 int nb_comp = FirstField -> getNumberOfComponents();
411 // Type, name, unit and description of components
412 string * component_name = new string[nb_comp];
413 string * component_unit = new string[nb_comp];
415 for (int i = 0 ; i<nb_comp ; i++) {
416 component_name[i] = FirstField -> getComponentName(i+1);
417 component_unit[i] = FirstField -> getComponentUnit(i+1);
420 MESSAGE("CalculatorEngine::Constant Number of entities in the Support of the field");
422 // Number of entities in the Support of the field
425 SCRUTE(FirstSupport);
427 SALOME_MED::MESH_ptr mesh = FirstSupport -> getMesh();
431 if ( FirstSupport -> isOnAllElements() )
432 len_value = FirstSupport -> getMesh() -> getNumberOfElements(FirstSupport -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
434 len_value = FirstSupport -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
436 // Values of new field
437 SALOME_MED::double_array * old_value = FirstField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
439 int totalLength = nb_comp*len_value;
440 double * new_value = new double[totalLength];
442 for(int i=0 ; i<totalLength ; i++)
446 // Creation of a Local Field
448 MESSAGE("CalculatorEngine::Constant Creation of the local field "<< totalLength);
450 FIELD<double> * fieldloc = new FIELD<double>();
451 fieldloc -> allocValue(nb_comp,len_value);
452 fieldloc -> setValue(MED_FULL_INTERLACE,new_value);
453 fieldloc -> setValueType(MED_EN::MED_REEL64);
454 fieldloc -> setName("-new_Const_Field-");
455 fieldloc -> setDescription(field_description);
456 fieldloc -> setComponentsNames(component_name);
457 fieldloc -> setMEDComponentsUnits(component_unit);
460 int until_index = ( 20 > len_value)? len_value : 20 ;
461 PrintFieldValues (fieldloc,until_index);
463 // Creation of the new CORBA field
465 MESSAGE("CalculatorEngine::Constant Creation of the CORBA field");
467 // Corrected by APV - November 23, 2004
468 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(FirstSupport,fieldloc) ;
469 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
471 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
472 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
476 endService("CalculatorEngine::Const");
478 END_OF("CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,CORBA::Double x1)");
484 //================================================================================
485 // write a field in a MED file
486 //================================================================================
488 void CalculatorEngine::writeMEDfile(SALOME_MED::FIELDDOUBLE_ptr field, const char *filename)
490 beginService("CalculatorEngine::writeMEDfile");
491 MESSAGE("fichier d'impression du champ resultat:"<<filename);
493 // get support of the field
495 SALOME_MED::SUPPORT_ptr support = field -> getSupport();
497 // get mesh from this support
499 SALOME_MED::MESH_ptr mesh = support -> getMesh();
503 int index_m = mesh->addDriver(SALOME_MED::MED_DRIVER,filename,mesh->getName());
505 mesh -> write(index_m,"");
509 const char * LOC = "CalculatorEngine::writeMEDfile ";
511 MESSAGE("fichier :"<<filename);
513 MED_FR::med_idt _medIdt=MED_FR::MEDouvrir(const_cast <char *> (filename) ,(MED_FR::med_mode_acces) MED_LECTURE_ECRITURE);
516 if (_medIdt<0) return;
520 int component_count= field->getNumberOfComponents();
521 string component_name(component_count*MED_TAILLE_PNOM,' ') ;
522 string component_unit(component_count*MED_TAILLE_PNOM,' ') ;
524 for (int i=0; i < component_count ; i++) {
525 component_name.replace(i*MED_TAILLE_PNOM,MED_TAILLE_PNOM,(field -> getComponentName(i+1)),0,MED_TAILLE_PNOM);
526 component_unit.replace(i*MED_TAILLE_PNOM,MED_TAILLE_PNOM,(field -> getComponentUnit(i+1)),0,MED_TAILLE_PNOM);
529 MESSAGE("component_name=|"<<component_name<<"|");
530 MESSAGE("component_unit=|"<<component_unit<<"|");
532 // already existing ?
534 char * champName = new char[MED_TAILLE_NOM+1] ;
535 char * compName, * compUnit ;
538 int n = MED_FR::MEDnChamp(_medIdt,0);
541 MED_FR::med_type_champ type ;
543 for (int i = 1; i <= n; i++)
545 nbComp = MED_FR::MEDnChamp(_medIdt,i);
546 compName = new char[MED_TAILLE_PNOM*nbComp+1];
547 compUnit = new char[MED_TAILLE_PNOM*nbComp+1];
549 err = MED_FR::MEDchampInfo(_medIdt,i,champName,&type,compName,compUnit,nbComp);
551 if (strcmp(champName, field->getName())==0) { // Found !
562 if (nbComp != component_count)
563 throw MEDEXCEPTION ( LOCALIZED (STRING(LOC)
564 <<": Field exist in file, but number of component are different : " \
565 <<nbComp<<" in file and "<<component_count<<" in CORBA object."
568 // component name and unit
569 MESSAGE(LOC<<" Component name in file : "<<compName);
570 MESSAGE(LOC<<" Component name in CORBA object : "<<component_name);
571 MESSAGE(LOC<<" Component unit in file : "<<compUnit);
572 MESSAGE(LOC<<" Component unit in CORBA object : "<<component_unit);
577 // Verify the field doesn't exist
579 string dataGroupName = "/CHA/"+ string(field->getName());
581 MESSAGE(LOC << "|" << dataGroupName << "|" );
583 med_idt gid = H5Gopen(_medIdt, dataGroupName.c_str() );
587 err=MED_FR::MEDchampCr(_medIdt,
588 const_cast <char*> (field->getName()),
590 const_cast <char*> ( component_name.c_str() ),
591 const_cast <char*> ( component_unit.c_str() ),
594 throw MEDEXCEPTION( LOCALIZED (STRING(LOC)
595 << ": Error MEDchampCr : "<<err
602 SALOME_MED::SUPPORT_ptr mySupport = field -> getSupport();
605 if (! mySupport->isOnAllElements())
606 throw MEDEXCEPTION ( LOCALIZED (STRING(LOC)
607 <<": Field must be on all entity"
611 SALOME_MED::MESH_ptr myMesh = mySupport -> getMesh();
614 SALOME_MED::medGeometryElement_array* Types = mySupport->getTypes() ;
616 int NumberOfType = Types->length() ;
618 for ( int i = 0; i < NumberOfType; i++ )
620 int NumberOfElements = mySupport->getNumberOfElements ( (*Types)[i] ) ;
621 int NumberOfGaussPoint = mySupport->getNumberOfGaussPoint ( (*Types)[i] ) ;
623 MESSAGE( " " << field->getName() );
624 MESSAGE( " " << NumberOfElements );
625 MESSAGE( " " << NumberOfGaussPoint );
626 MESSAGE( " " << (int) (convertIdlEntToMedEnt(mySupport->getEntity())) );
627 MESSAGE( " " << (int)(convertIdlEltToMedElt((*Types)[i])) );
628 MESSAGE( " " << field->getIterationNumber() );
629 MESSAGE( " " << field->getTime() );
630 MESSAGE( " " << field->getOrderNumber() );
631 MESSAGE( "MEDchampEcr :" << myMesh->getName() );
633 SALOME_MED::double_array * value = field->getValue( SALOME_MED::MED_FULL_INTERLACE ) ;
634 double *locvalue = new double[NumberOfElements];
635 for (int k = 0; k < NumberOfElements; k++)
636 locvalue[k] = (*value) [k];
638 err=MED_FR::MEDchampEcr(_medIdt,
639 const_cast <char*> (myMesh->getName()) ,
640 const_cast <char*> (field->getName()),
641 (unsigned char*)locvalue,
642 MED_FR::MED_FULL_INTERLACE,
647 MED_FR::MED_NO_PFLMOD,
648 (MED_FR::med_entite_maillage)convertIdlEntToMedEnt(mySupport->getEntity()),
649 (MED_FR::med_geometrie_element)(convertIdlEltToMedElt((*Types)[i])),
650 field->getIterationNumber(),
653 field->getOrderNumber()
657 if (err < MED_VALID )
658 throw MEDEXCEPTION(LOCALIZED( STRING(LOC)
659 <<": Error in writing Field "<< field->getName() <<", type "<<(*Types)[i]
666 if (err < 0 ) return ;
668 MED_FR::MEDfermer(_medIdt) ;
670 endService("CalculatorEngine::writeMEDfile");
677 //===========================================================================
678 // CalculatorEngine_factory
679 //===========================================================================
680 PortableServer::ObjectId * CalculatorEngine_factory
682 PortableServer::POA_ptr poa,
683 PortableServer::ObjectId * contId,
684 const char *instanceName,
685 const char *interfaceName)
687 MESSAGE("CalculatorEngine_factory CalculatorEngine ("
688 << instanceName << "," << interfaceName << ")");
689 CalculatorEngine * myCalculator
690 = new CalculatorEngine(orb, poa, contId, instanceName, interfaceName);
691 return myCalculator->getId() ;