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;
41 using namespace MED_EN;
43 //================================================================================
44 // static PrintFieldValues - shows field contents
45 //================================================================================
47 static void PrintFieldValues (FIELD<double> * field, int until_index)
49 const double * values = field -> getValue(MED_FULL_INTERLACE);
50 int nb_comp = field -> getNumberOfComponents();
51 MESSAGE( "Field : " << field -> getName() );
52 MESSAGE( " Description : " << field -> getDescription() );
53 MESSAGE( " Number of components : " << nb_comp );
55 for (int i=0 ; i<nb_comp ; i++) {
56 MESSAGE ( " Component " << field -> getComponentName(i+1) << endl \
57 << " Unit : " << field -> getMEDComponentUnit(i+1) << endl \
58 << " Description : " << field -> getComponentDescription(i+1) );
60 MESSAGE( " First " << until_index << " values : " );
62 for (int j=0 ; j < until_index ; j++) {
63 for (int i=0;i<nb_comp;i++) MESSAGE( values[i+j*nb_comp] << " " );
68 //================================================================================
70 //================================================================================
72 CalculatorEngine::CalculatorEngine(CORBA::ORB_ptr orb,
73 PortableServer::POA_ptr poa,
74 PortableServer::ObjectId * contId,
75 const char *instanceName,
76 const char *interfaceName) :
77 Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true)
79 MESSAGE("CalculatorEngine::CalculatorEngine activate object instanceName("
80 << instanceName << ") interfaceName(" << interfaceName << ")" )
82 _id = _poa->activate_object(_thisObj);
83 SALOME_NamingService *NS = new SALOME_NamingService(orb);
87 CalculatorEngine::CalculatorEngine()
91 //================================================================================
93 //================================================================================
95 CalculatorEngine::~CalculatorEngine()
99 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::PutToStudy(SALOME_MED::FIELDDOUBLE_ptr theField1,
100 long int theStudyId) {
101 CORBA::Object_var anObj = _NS->Resolve("/myStudyManager");
102 SALOMEDS::StudyManager_var aManager = SALOMEDS::StudyManager::_narrow(anObj);
103 // SALOMEDS::ListOfOpenStudies_var aList = aManager->GetOpenStudies();
104 // SALOMEDS::Study_var aStudy = aManager->GetStudyByName(aList[0]);
105 SALOMEDS::Study_var aStudy = aManager->GetStudyByID(theStudyId);
106 SALOMEDS::StudyBuilder_var aBuilder = aStudy->NewBuilder();
108 SALOMEDS::SComponent_var aComponent = aStudy->FindComponent("Calculator");
109 if (aComponent->_is_nil()) aComponent = aBuilder->NewComponent("Calculator");
110 SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributeName");
111 SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
112 aName->SetValue("Calculator");
114 SALOMEDS::SObject_var aSO = aBuilder->NewObject(aComponent);
115 anAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeName");
116 aName = SALOMEDS::AttributeName::_narrow(anAttr);
118 sprintf(aFieldName, "Field_%d", (int)aSO->Tag());
119 aName->SetValue(strdup(aFieldName));
121 ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
122 ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
123 CORBA::ORB_var &orb = init(0,0);
125 string iorStr = orb->object_to_string(theField1);
126 anAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeIOR");
127 SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
128 anIOR->SetValue(iorStr.c_str());
130 return SALOME_MED::FIELDDOUBLE::_duplicate(theField1);
134 //=======================================================================================
135 // Addition of 2 FieldNodeDouble (based on Med library)
139 // - number of components
140 // - name, type, unit and description of components
141 // are the same for the 2 fields.
144 // the result will be a copy of the first field.
146 //=======================================================================================
148 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,
149 SALOME_MED::FIELDDOUBLE_ptr SecondField)
152 bool same_support = true;
154 beginService("CalculatorEngine::Add");
156 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add is Computing");
158 BEGIN_OF("CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,SALOME_MED::FIELDDOUBLE_ptr SecondField)");
163 string message = string("\n CalculatorEngine::Add : ") +
164 string("\n first field name --> ") + FirstField -> getName() +
165 string("\n second field name --> ") + SecondField -> getName();
167 sendMessage(NOTIF_TRACE, message.c_str());
169 // Number of components
170 int nb_comp1 = FirstField -> getNumberOfComponents();
171 int nb_comp2 = SecondField -> getNumberOfComponents();
172 if (nb_comp1 != nb_comp2) same_support = false;
173 MESSAGE( " nb_comp1 --> " << nb_comp1 <<endl );
174 MESSAGE( " nb_comp2 --> " << nb_comp2 <<endl );
177 /* Name Description and Unit of each component of the field */
179 string * component_name = new string[nb_comp1];
180 string * component_unit = new string[nb_comp1];
182 for (int i=0 ; i<nb_comp1 ; i++) {
183 component_name[i].assign(FirstField -> getComponentName(i+1));
184 component_unit[i].assign(FirstField -> getComponentUnit(i+1));
188 (component_name[i] != SecondField -> getComponentName(i+1)) ||
189 (component_unit[i] != SecondField -> getComponentUnit(i+1)))
190 same_support = false;
194 MESSAGE("CalculatorEngine::Add Number of entities in the Support of each fields");
196 // Number of entities in the Support of the field
200 SALOME_MED::SUPPORT_ptr support1 = FirstField -> getSupport();
201 SALOME_MED::SUPPORT_ptr support2 = SecondField -> getSupport();
207 SALOME_MED::MESH_ptr mesh1 = support1 -> getMesh();
208 SALOME_MED::MESH_ptr mesh2 = support2 -> getMesh();
213 if (same_support && support1 != support2) same_support = false;
215 if (support1 -> isOnAllElements())
216 len_value1 = support1 -> getMesh() -> getNumberOfElements(support1 -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
218 len_value1 = support1 -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
222 if (support2 -> isOnAllElements())
223 len_value2 = support2 -> getMesh() -> getNumberOfElements(support2 -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
225 len_value2 = support2 -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
227 if (same_support && len_value1 != len_value2) same_support = false;
231 // Values of new field
232 SALOME_MED::double_array * first_value = FirstField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
233 SALOME_MED::double_array * second_value;
235 second_value = SecondField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
236 tmp << "\n CalculatorEngine::Add : " ;
237 tmp << "\n Number of entities in the Support of first field = " << len_value1 ;
238 tmp << "\n Number of entities in the Support of second field = " << len_value2 ;
241 sendMessage(NOTIF_TRACE, message.c_str());
245 int totalLength = nb_comp1*len_value1;
246 double * new_value = new double[totalLength];
249 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add - field1 and field2 have the same support");
251 for(int i=0 ; i<totalLength ; i++)
252 new_value[i] = ((*first_value)[i]) + ((*second_value)[i]);
255 for(int i=0 ; i<totalLength ; i++)
256 new_value[i] = ((*first_value)[i]) ;
259 // Creation of a Local Field
261 MESSAGE("CalculatorEngine::Add Creation of the local field "<< totalLength);
263 FIELD<double> * fieldloc = new FIELD<double>();
264 fieldloc -> allocValue(nb_comp1,len_value1);
265 fieldloc -> setValue(MED_FULL_INTERLACE,new_value);
266 fieldloc -> setValueType(MED_EN::MED_REEL64);
267 fieldloc -> setName("-new_Add-");
268 fieldloc -> setDescription( FirstField -> getDescription() );
269 fieldloc -> setComponentsNames(component_name);
270 fieldloc -> setMEDComponentsUnits(component_unit);
273 int until_index = ( 20 > len_value1)? len_value1 : 20;
274 PrintFieldValues (fieldloc,until_index);
276 sendMessage(NOTIF_TRACE, "CalculatorEngine::Add - new field created");
279 // Creation of the new CORBA field
281 MESSAGE("CalculatorEngine::Add Creation of the CORBA field");
283 // Corrected by APV - November 23, 2004
284 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(support1,fieldloc) ;
285 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
287 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
288 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
292 END_OF("CalculatorEngine::Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,SALOME_MED::FIELDDOUBLE_ptr SecondField)");
294 endService("CalculatorEngine::Add");
300 //===============================================================================
301 // Multiplication of a FieldNodeDouble by a double value (based on Med library)
302 //===============================================================================
304 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,
307 beginService("CalculatorEngine::Mul");
309 BEGIN_OF("CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,CORBA::Double x1)");
314 // Name and description of field
315 string field_name = OldField -> getName();
316 string field_description = OldField -> getDescription();
318 // Number of components
319 int nb_comp = OldField -> getNumberOfComponents();
320 string * component_name = new string[nb_comp];
321 string * component_unit = new string[nb_comp];
323 for (int i=0 ; i<nb_comp ; i++) {
324 component_name[i] = OldField -> getComponentName(i+1);
325 component_unit[i] = OldField -> getComponentUnit(i+1);
328 MESSAGE("CalculatorEngine::Mul Number of entities in the Support of the field");
330 // Number of entities in the Support of the field
333 SALOME_MED::SUPPORT_ptr support = OldField -> getSupport();
337 SALOME_MED::MESH_ptr mesh = support -> getMesh();
341 if (support -> isOnAllElements())
342 len_value = support -> getMesh() -> getNumberOfElements(support -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
344 len_value = support -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
348 // Values of new field
349 SALOME_MED::double_array * old_value = OldField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
351 int totalLength = nb_comp*len_value;
352 double * new_value = new double[totalLength];
353 for(int i=0 ; i<totalLength ; i++) {
354 new_value[i] = x1 * ((*old_value)[i]);
357 // Creation of a Local Field
359 MESSAGE("CalculatorEngine::Mul Creation of the local field "<< totalLength);
361 FIELD<double> * fieldloc = new FIELD<double>();
362 fieldloc -> allocValue(nb_comp,len_value);
363 fieldloc -> setValue(MED_FULL_INTERLACE,new_value);
364 fieldloc -> setValueType(MED_EN::MED_REEL64);
365 fieldloc -> setName("-new_Mul-");
366 fieldloc -> setDescription(field_description);
367 fieldloc -> setComponentsNames(component_name);
368 fieldloc -> setMEDComponentsUnits(component_unit);
371 // Creation of the new CORBA field
373 MESSAGE("CalculatorEngine::Mul Creation of the CORBA field");
375 // Corrected by APV - November 23, 2004
376 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(support,fieldloc) ;
377 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
379 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
380 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
384 END_OF("CalculatorEngine::Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,CORBA::Double x1)");
386 endService("CalculatorEngine::Mul");
391 //================================================================================
392 // Build a constant field of double based on first field support (Med library)
393 //================================================================================
395 SALOME_MED::FIELDDOUBLE_ptr CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,
399 beginService("CalculatorEngine::Const");
401 BEGIN_OF("CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,CORBA::Double x1)");
403 // Name and description of field
404 string field_name = FirstField -> getName();
405 string field_description = FirstField -> getDescription();
407 SALOME_MED::SUPPORT_ptr FirstSupport = FirstField -> getSupport();
409 // Number of components
410 int nb_comp = FirstField -> getNumberOfComponents();
412 // Type, name, unit and description of components
413 string * component_name = new string[nb_comp];
414 string * component_unit = new string[nb_comp];
416 for (int i = 0 ; i<nb_comp ; i++) {
417 component_name[i] = FirstField -> getComponentName(i+1);
418 component_unit[i] = FirstField -> getComponentUnit(i+1);
421 MESSAGE("CalculatorEngine::Constant Number of entities in the Support of the field");
423 // Number of entities in the Support of the field
426 SCRUTE(FirstSupport);
428 SALOME_MED::MESH_ptr mesh = FirstSupport -> getMesh();
432 if ( FirstSupport -> isOnAllElements() )
433 len_value = FirstSupport -> getMesh() -> getNumberOfElements(FirstSupport -> getEntity(),SALOME_MED::MED_ALL_ELEMENTS);
435 len_value = FirstSupport -> getNumberOfElements(SALOME_MED::MED_ALL_ELEMENTS);
437 // Values of new field
438 SALOME_MED::double_array * old_value = FirstField -> getValue(SALOME_MED::MED_FULL_INTERLACE);
440 int totalLength = nb_comp*len_value;
441 double * new_value = new double[totalLength];
443 for(int i=0 ; i<totalLength ; i++)
447 // Creation of a Local Field
449 MESSAGE("CalculatorEngine::Constant Creation of the local field "<< totalLength);
451 FIELD<double> * fieldloc = new FIELD<double>();
452 fieldloc -> allocValue(nb_comp,len_value);
453 fieldloc -> setValue(MED_FULL_INTERLACE,new_value);
454 fieldloc -> setValueType(MED_EN::MED_REEL64);
455 fieldloc -> setName("-new_Const_Field-");
456 fieldloc -> setDescription(field_description);
457 fieldloc -> setComponentsNames(component_name);
458 fieldloc -> setMEDComponentsUnits(component_unit);
461 int until_index = ( 20 > len_value)? len_value : 20 ;
462 PrintFieldValues (fieldloc,until_index);
464 // Creation of the new CORBA field
466 MESSAGE("CalculatorEngine::Constant Creation of the CORBA field");
468 // Corrected by APV - November 23, 2004
469 // FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(FirstSupport,fieldloc) ;
470 FIELDDOUBLE_i * NewField = new FIELDDOUBLE_i(fieldloc) ;
472 POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i> * myFieldTie = new POA_SALOME_MED::FIELDDOUBLE_tie<FIELDDOUBLE_i>(NewField) ;
473 SALOME_MED::FIELDDOUBLE_ptr myFieldIOR = myFieldTie->_this() ;
477 endService("CalculatorEngine::Const");
479 END_OF("CalculatorEngine::Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,CORBA::Double x1)");
485 //================================================================================
486 // write a field in a MED file
487 //================================================================================
489 void CalculatorEngine::writeMEDfile(SALOME_MED::FIELDDOUBLE_ptr field, const char *filename)
491 beginService("CalculatorEngine::writeMEDfile");
492 MESSAGE("fichier d'impression du champ resultat:"<<filename);
494 // get support of the field
496 SALOME_MED::SUPPORT_ptr support = field -> getSupport();
498 // get mesh from this support
500 SALOME_MED::MESH_ptr mesh = support -> getMesh();
504 int index_m = mesh->addDriver(SALOME_MED::MED_DRIVER,filename,mesh->getName());
506 mesh -> write(index_m,"");
510 const char * LOC = "CalculatorEngine::writeMEDfile ";
512 MESSAGE("fichier :"<<filename);
514 MED_FR::med_idt _medIdt=MED_FR::MEDouvrir(const_cast <char *> (filename) ,(MED_FR::med_mode_acces) MED_LECTURE_ECRITURE);
517 if (_medIdt<0) return;
521 int component_count= field->getNumberOfComponents();
522 string component_name(component_count*MED_TAILLE_PNOM,' ') ;
523 string component_unit(component_count*MED_TAILLE_PNOM,' ') ;
525 for (int i=0; i < component_count ; i++) {
526 component_name.replace(i*MED_TAILLE_PNOM,MED_TAILLE_PNOM,(field -> getComponentName(i+1)),0,MED_TAILLE_PNOM);
527 component_unit.replace(i*MED_TAILLE_PNOM,MED_TAILLE_PNOM,(field -> getComponentUnit(i+1)),0,MED_TAILLE_PNOM);
530 MESSAGE("component_name=|"<<component_name<<"|");
531 MESSAGE("component_unit=|"<<component_unit<<"|");
533 // already existing ?
535 char * champName = new char[MED_TAILLE_NOM+1] ;
536 char * compName, * compUnit ;
539 int n = MED_FR::MEDnChamp(_medIdt,0);
542 MED_FR::med_type_champ type ;
544 for (int i = 1; i <= n; i++)
546 nbComp = MED_FR::MEDnChamp(_medIdt,i);
547 compName = new char[MED_TAILLE_PNOM*nbComp+1];
548 compUnit = new char[MED_TAILLE_PNOM*nbComp+1];
550 err = MED_FR::MEDchampInfo(_medIdt,i,champName,&type,compName,compUnit,nbComp);
552 if (strcmp(champName, field->getName())==0) { // Found !
563 if (nbComp != component_count)
564 throw MEDEXCEPTION ( LOCALIZED (STRING(LOC)
565 <<": Field exist in file, but number of component are different : " \
566 <<nbComp<<" in file and "<<component_count<<" in CORBA object."
569 // component name and unit
570 MESSAGE(LOC<<" Component name in file : "<<compName);
571 MESSAGE(LOC<<" Component name in CORBA object : "<<component_name);
572 MESSAGE(LOC<<" Component unit in file : "<<compUnit);
573 MESSAGE(LOC<<" Component unit in CORBA object : "<<component_unit);
578 // Verify the field doesn't exist
580 string dataGroupName = "/CHA/"+ string(field->getName());
582 MESSAGE(LOC << "|" << dataGroupName << "|" );
584 med_idt gid = H5Gopen(_medIdt, dataGroupName.c_str() );
588 err=MED_FR::MEDchampCr(_medIdt,
589 const_cast <char*> (field->getName()),
591 const_cast <char*> ( component_name.c_str() ),
592 const_cast <char*> ( component_unit.c_str() ),
595 throw MEDEXCEPTION( LOCALIZED (STRING(LOC)
596 << ": Error MEDchampCr : "<<err
603 SALOME_MED::SUPPORT_ptr mySupport = field -> getSupport();
606 if (! mySupport->isOnAllElements())
607 throw MEDEXCEPTION ( LOCALIZED (STRING(LOC)
608 <<": Field must be on all entity"
612 SALOME_MED::MESH_ptr myMesh = mySupport -> getMesh();
615 SALOME_MED::medGeometryElement_array* Types = mySupport->getTypes() ;
617 int NumberOfType = Types->length() ;
619 for ( int i = 0; i < NumberOfType; i++ )
621 int NumberOfElements = mySupport->getNumberOfElements ( (*Types)[i] ) ;
622 int NumberOfGaussPoint = mySupport->getNumberOfGaussPoint ( (*Types)[i] ) ;
624 MESSAGE( " " << field->getName() );
625 MESSAGE( " " << NumberOfElements );
626 MESSAGE( " " << NumberOfGaussPoint );
627 MESSAGE( " " << (int) (convertIdlEntToMedEnt(mySupport->getEntity())) );
628 MESSAGE( " " << (int)(convertIdlEltToMedElt((*Types)[i])) );
629 MESSAGE( " " << field->getIterationNumber() );
630 MESSAGE( " " << field->getTime() );
631 MESSAGE( " " << field->getOrderNumber() );
632 MESSAGE( "MEDchampEcr :" << myMesh->getName() );
634 SALOME_MED::double_array * value = field->getValue( SALOME_MED::MED_FULL_INTERLACE ) ;
635 double *locvalue = new double[NumberOfElements];
636 for (int k = 0; k < NumberOfElements; k++)
637 locvalue[k] = (*value) [k];
639 err=MED_FR::MEDchampEcr(_medIdt,
640 const_cast <char*> (myMesh->getName()) ,
641 const_cast <char*> (field->getName()),
642 (unsigned char*)locvalue,
643 MED_FR::MED_FULL_INTERLACE,
648 MED_FR::MED_NO_PFLMOD,
649 (MED_FR::med_entite_maillage)convertIdlEntToMedEnt(mySupport->getEntity()),
650 (MED_FR::med_geometrie_element)(convertIdlEltToMedElt((*Types)[i])),
651 field->getIterationNumber(),
654 field->getOrderNumber()
658 if (err < MED_VALID )
659 throw MEDEXCEPTION(LOCALIZED( STRING(LOC)
660 <<": Error in writing Field "<< field->getName() <<", type "<<(*Types)[i]
667 if (err < 0 ) return ;
669 MED_FR::MEDfermer(_medIdt) ;
671 endService("CalculatorEngine::writeMEDfile");
678 //===========================================================================
679 // CalculatorEngine_factory
680 //===========================================================================
681 PortableServer::ObjectId * CalculatorEngine_factory
683 PortableServer::POA_ptr poa,
684 PortableServer::ObjectId * contId,
685 const char *instanceName,
686 const char *interfaceName)
688 MESSAGE("CalculatorEngine_factory CalculatorEngine ("
689 << instanceName << "," << interfaceName << ")");
690 CalculatorEngine * myCalculator
691 = new CalculatorEngine(orb, poa, contId, instanceName, interfaceName);
692 return myCalculator->getId() ;