Salome HOME
Merge remote branch 'origin/V7_dev'
authorvsr <vsr@opencascade.com>
Wed, 25 May 2016 08:23:38 +0000 (11:23 +0300)
committervsr <vsr@opencascade.com>
Wed, 25 May 2016 08:38:26 +0000 (11:38 +0300)
58 files changed:
CMakeLists.txt
src/PVGUI/CMakeLists.txt
src/PVGUI/PVGUI_Module.cxx
src/PVGUI/PVGUI_Module.h
src/Plugins/ArrayRenamer/CMakeLists.txt
src/Plugins/ArrayRenamer/pqArraysEditorPropertyWidget.cxx
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx
src/Plugins/MEDReader/IO/vtkExtractCellType.cxx
src/Plugins/MEDReader/IO/vtkMEDReader.cxx
src/Plugins/MEDReader/ParaViewPlugin/CMakeLists.txt
src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.cxx
src/Plugins/MEDReader/Test/Baselines/testMEDReader20.png
src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png [new file with mode: 0644]
src/Plugins/MEDReader/Test/CMakeLists.txt
src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake
src/Plugins/MEDReader/Test/testMEDReader0.py
src/Plugins/MEDReader/Test/testMEDReader1.py
src/Plugins/MEDReader/Test/testMEDReader10.py
src/Plugins/MEDReader/Test/testMEDReader11.py
src/Plugins/MEDReader/Test/testMEDReader13.py
src/Plugins/MEDReader/Test/testMEDReader14.py
src/Plugins/MEDReader/Test/testMEDReader15.py
src/Plugins/MEDReader/Test/testMEDReader16.py
src/Plugins/MEDReader/Test/testMEDReader17.py
src/Plugins/MEDReader/Test/testMEDReader2.py
src/Plugins/MEDReader/Test/testMEDReader20.py
src/Plugins/MEDReader/Test/testMEDReader21.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader4.py
src/Plugins/MEDReader/Test/testMEDReader5.py
src/Plugins/MEDReader/Test/testMEDReader6.py
src/Plugins/MEDWriter/IO/vtkMEDWriter.cxx
src/Plugins/MEDWriter/Test/TestMEDWriter0.py
src/Plugins/TableReader/ParaViewPlugin/CMakeLists.txt
src/Plugins/View/CMakeLists.txt
test/VisuPrs/2D_viewer/CTestTestfileInstall.cmake
test/VisuPrs/3D_viewer/CTestTestfileInstall.cmake
test/VisuPrs/Animation/CTestTestfileInstall.cmake
test/VisuPrs/CutLines/CTestTestfileInstall.cmake
test/VisuPrs/CutPlanes/CTestTestfileInstall.cmake
test/VisuPrs/DeformedShape/CTestTestfileInstall.cmake
test/VisuPrs/GaussPoints/CTestTestfileInstall.cmake
test/VisuPrs/ImportMedField/CTestTestfileInstall.cmake
test/VisuPrs/IsoSurfaces/CTestTestfileInstall.cmake
test/VisuPrs/MeshPresentation/CTestTestfileInstall.cmake
test/VisuPrs/Plot3D/CTestTestfileInstall.cmake
test/VisuPrs/SWIG_scripts/CTestTestfileInstall.cmake
test/VisuPrs/ScalarMap/CTestTestfileInstall.cmake
test/VisuPrs/ScalarMap_On_DeformedShape/CTestTestfileInstall.cmake
test/VisuPrs/StreamLines/CTestTestfileInstall.cmake
test/VisuPrs/Tables/CTestTestfileInstall.cmake
test/VisuPrs/Vectors/CTestTestfileInstall.cmake
test/VisuPrs/bugs/CTestTestfileInstall.cmake
test/VisuPrs/dump_study/CTestTestfileInstall.cmake
test/VisuPrs/imps/CTestTestfileInstall.cmake
test/VisuPrs/united/CTestTestfileInstall.cmake
test/standalone/CMakeLists.txt
test/standalone/gui/CMakeLists.txt

index ba469e82256fa34a5fe619c34e454dd670db02e9..4871943580e28d87a3157ad2f0265707c58792a3 100644 (file)
@@ -33,12 +33,12 @@ CMAKE_POLICY(SET CMP0003 NEW)
 # Project name, upper case
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
-SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 8)
+SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 0)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
 
 # Find KERNEL
 # ===========
@@ -119,7 +119,11 @@ ENDIF()
 ## From GUI
 ##
 
-FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtHelp)
+IF (NOT SALOME_GUI_BUILD_WITH_QT5)
+  FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtHelp)
+ELSE()
+  FIND_PACKAGE(SalomeQt5 REQUIRED)
+ENDIF()
 
 ##
 ## Specific to ParaViS:
index 3f5eef9a992380596c0801eaef13cea3631555b0..7e74e068696019f3c81badd7187064c190eed03a 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
 
 # --- options ---
 
@@ -57,7 +57,7 @@ SET(_ui_files
     resources/pqCustomSettingsWidget.ui
     )
 
-QT4_WRAP_UI(_ui_FORMS_HEADERS ${_ui_files})
+QT_WRAP_UIC(_ui_FORMS_HEADERS ${_ui_files})
 
 # header files / to be processed by moc
 SET(_moc_HEADERS
@@ -105,10 +105,10 @@ ENDIF()
 # --- sources ---
 
 # sources / rcc wrappings
-QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
+QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
 
 # sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 
 # sources / static
 SET(_other_SOURCES
@@ -135,5 +135,5 @@ INSTALL(TARGETS PARAVIS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_I
 
 # --- header and resources installation ---
 INSTALL(FILES ${PVGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_PARAVIS_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_PARAVIS_INSTALL_RES_DATA}")
 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_PARAVIS_INSTALL_RES_DATA})
index 284d98a81d88bea4e8f94e16da9651d7b23bffad..60a1635c08f9814d8415e67f94701072801d94bd 100644 (file)
@@ -513,7 +513,7 @@ void PVGUI_Module::endWaitCursor()
 {
   QApplication::restoreOverrideCursor();
 }
-
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
 /*!
   \brief Handler method for the output of messages.
 */
@@ -535,7 +535,29 @@ static void ParavisMessageOutput(QtMsgType type, const char *msg)
     break;
     }
 }
-
+#else
+/*!
+  \brief Handler method for the output of messages.
+*/
+static void ParavisMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
+{
+  switch(type)
+    {
+  case QtDebugMsg:
+    vtkOutputWindow::GetInstance()->DisplayText(msg.toLatin1().constData());
+    break;
+  case QtWarningMsg:
+    vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
+    break;
+  case QtCriticalMsg:
+    vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
+    break;
+  case QtFatalMsg:
+    vtkOutputWindow::GetInstance()->DisplayErrorText(msg.toLatin1().constData());
+    break;
+    }
+}
+#endif
 /*!
   \brief Activate module.
   \param study current study
@@ -544,8 +566,11 @@ static void ParavisMessageOutput(QtMsgType type, const char *msg)
 */
 bool PVGUI_Module::activateModule( SUIT_Study* study )
 {
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myOldMsgHandler = qInstallMsgHandler(ParavisMessageOutput);
-  
+#else
+  myOldMsgHandler = qInstallMessageHandler(ParavisMessageOutput);
+#endif  
   SUIT_ExceptionHandler::addCleanUpRoutine( paravisCleanUp );
 
   storeCommonWindowsState();
@@ -643,8 +668,11 @@ bool PVGUI_Module::deactivateModule( SUIT_Study* study )
   SUIT_ExceptionHandler::removeCleanUpRoutine( paravisCleanUp );
 
   if (myOldMsgHandler)
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
     qInstallMsgHandler(myOldMsgHandler);
-
+#else
+    qInstallMessageHandler(myOldMsgHandler);
+#endif
   restoreCommonWindowsState();
   
   return LightApp_Module::deactivateModule( study );
index 0ce311fd1d38a6cd38ccfef80a6bce4aae2a0a57..bbeed82bdc63333b3f7fee268c1a9664b53d2809 100644 (file)
@@ -217,9 +217,11 @@ private:
 
   typedef QMap<int, bool> DockWindowMap;         
   DockWindowMap           myCommonMap; 
-
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   QtMsgHandler            myOldMsgHandler;
-
+#else  
+  QtMessageHandler        myOldMsgHandler;
+#endif  
   vtkEventQtSlotConnect*  VTKConnect;
 
   pqPythonScriptEditor*   myTraceWindow;
index 6eb34f59dc28123ba0f3b822a0e6f233744423c4..f5be88a877d84667d0fca93f8c98b6fa5a45be82 100644 (file)
@@ -22,13 +22,14 @@ PROJECT(ArrayRenamer)
 
 cmake_minimum_required(VERSION 2.8)
 
+INCLUDE(UseQtExt)
 FIND_PACKAGE(ParaView REQUIRED)
 INCLUDE(${PARAVIEW_USE_FILE})
 
 SET (outifaces)        
 SET (outsrcs)
 
-QT4_WRAP_CPP(moc_srcs pqArraysEditorPropertyWidget.h pqEditComponents.h)
+QT_WRAP_MOC(moc_srcs pqArraysEditorPropertyWidget.h pqEditComponents.h)
 
   ADD_PARAVIEW_PROPERTY_GROUP_WIDGET(outifaces outsrcs
     TYPE "custom_arrays_editor"
index 76854e2fed332d70a3103e0c2fe62bce33d50e7a..405edb98c8f15ad49fc3cbe8b8b6a9fca822dc2c 100644 (file)
@@ -437,9 +437,13 @@ pqEditComponents::pqEditComponents( pqComponentsModel* model, QWidget* parent )
   QTableView* componentsTable = new QTableView( this );
   componentsTable->setModel( model );
   aCompsLayout->addWidget( componentsTable );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   componentsTable->horizontalHeader()->setResizeMode( pqComponentsModel::COMPONENT_NAME,  QHeaderView::Stretch );
   componentsTable->horizontalHeader()->setResizeMode( pqComponentsModel::NEW_COMPONENT_NAME, QHeaderView::Stretch );
-  
+#else
+  componentsTable->horizontalHeader()->setSectionResizeMode( pqComponentsModel::COMPONENT_NAME,  QHeaderView::Stretch );
+  componentsTable->horizontalHeader()->setSectionResizeMode( pqComponentsModel::NEW_COMPONENT_NAME, QHeaderView::Stretch );
+#endif
   /// Parameters
   QVBoxLayout *aParamsLayout = new QVBoxLayout( aParams );
   myRenameAllComps = new QCheckBox( "Rename all similar Components", aParams );
@@ -488,10 +492,17 @@ pqArraysEditorPropertyWidget::pqArraysEditorPropertyWidget( vtkSMProxy* smproxy,
   // Layout
   QVBoxLayout* lay = new QVBoxLayout(this);
   lay->addWidget(myArraysTable);
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myArraysTable->horizontalHeader()->setResizeMode( pqArraysModel::PROCESSING, QHeaderView::ResizeToContents );
   myArraysTable->horizontalHeader()->setResizeMode( pqArraysModel::NAME,  QHeaderView::Stretch);
   myArraysTable->horizontalHeader()->setResizeMode( pqArraysModel::NEW_NAME, QHeaderView::Stretch );
   myArraysTable->horizontalHeader()->setResizeMode( pqArraysModel::COMPONENTS, QHeaderView::ResizeToContents );
+#else
+  myArraysTable->horizontalHeader()->setSectionResizeMode( pqArraysModel::PROCESSING, QHeaderView::ResizeToContents );
+  myArraysTable->horizontalHeader()->setSectionResizeMode( pqArraysModel::NAME,  QHeaderView::Stretch);
+  myArraysTable->horizontalHeader()->setSectionResizeMode( pqArraysModel::NEW_NAME, QHeaderView::Stretch );
+  myArraysTable->horizontalHeader()->setSectionResizeMode( pqArraysModel::COMPONENTS, QHeaderView::ResizeToContents );
+#endif
   myArraysTable->resizeColumnsToContents();
 
   // Connections
index 237228dbf18775ffcd5ee711000ea76c638b3191..433e3c656f81bf9e1237c8fb311c40ba52fcd531 100644 (file)
@@ -53,7 +53,7 @@
 
 #include "vtkMutableDirectedGraph.h"
 
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
 
 const char MEDFileFieldRepresentationLeavesArrays::ZE_SEP[]="@@][@@";
 
@@ -69,13 +69,15 @@ const char MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME[]="Family
 
 const char MEDFileFieldRepresentationLeavesArrays::NUM_ID_NODE_NAME[]="NumIdNode";
 
+const char MEDFileFieldRepresentationLeavesArrays::GLOBAL_NODE_ID_NAME[]="GlobalNodeIds";// WARNING DO NOT CHANGE IT BEFORE HAVING CHECKED IN PV SOURCES !
+
 const char MEDFileFieldRepresentationTree::ROOT_OF_GRPS_IN_TREE[]="zeGrps";
 
 const char MEDFileFieldRepresentationTree::ROOT_OF_FAM_IDS_IN_TREE[]="zeFamIds";
 
 const char MEDFileFieldRepresentationTree::COMPO_STR_TO_LOCATE_MESH_DA[]="-@?|*_";
 
-vtkIdTypeArray *ELGACmp::findOrCreate(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const
+vtkIdTypeArray *ELGACmp::findOrCreate(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const
 {
   vtkIdTypeArray *try0(isExisting(locsReallyUsed,vtkd));
   if(try0)
@@ -106,7 +108,7 @@ vtkIdTypeArray *ELGACmp::isExisting(const std::vector<std::string>& locsReallyUs
   return ret;
 }
 
-vtkIdTypeArray *ELGACmp::createNew(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const
+vtkIdTypeArray *ELGACmp::createNew(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const
 {
   const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_DELETE;
   std::vector< std::vector<std::string> > locNames(_loc_names);
@@ -196,25 +198,68 @@ ELGACmp::~ELGACmp()
 
 //=
 
+template<class T>
+class MEDFileVTKTraits
+{
+public:
+  typedef void VtkType;
+  typedef void MCType;
+};
+
+template<>
+class MEDFileVTKTraits<int>
+{
+public:
+  typedef vtkIntArray VtkType;
+  typedef MEDCoupling::DataArrayInt MCType;
+};
+
+template<>
+class MEDFileVTKTraits<double>
+{
+public:
+  typedef vtkDoubleArray VtkType;
+  typedef MEDCoupling::DataArrayDouble MCType;
+};
+
+template<class T>
+void AssignDataPointerToVTK(typename MEDFileVTKTraits<T>::VtkType *vtkTab, typename MEDFileVTKTraits<T>::MCType *mcTab, bool noCpyNumNodes)
+{
+  if(noCpyNumNodes)
+    vtkTab->SetArray(mcTab->getPointer(),mcTab->getNbOfElems(),1,vtkDataArrayTemplate<T>::VTK_DATA_ARRAY_FREE);
+ else
+   { vtkTab->SetArray(mcTab->getPointer(),mcTab->getNbOfElems(),0,vtkDataArrayTemplate<T>::VTK_DATA_ARRAY_FREE); mcTab->accessToMemArray().setSpecificDeallocator(0); }
+}
+
+// here copy is always assumed.
+template<class VTKT, class MCT>
+void AssignDataPointerOther(VTKT *vtkTab, MCT *mcTab, int nbElems)
+{
+  vtkTab->SetVoidArray(reinterpret_cast<unsigned char *>(mcTab->getPointer()),nbElems,0,VTKT::VTK_DATA_ARRAY_FREE);
+  mcTab->accessToMemArray().setSpecificDeallocator(0);
+}
+
+//=
+
 MEDFileFieldRepresentationLeavesArrays::MEDFileFieldRepresentationLeavesArrays():_id(-1)
 {
 }
 
-MEDFileFieldRepresentationLeavesArrays::MEDFileFieldRepresentationLeavesArrays(const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>& arr):ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>(arr),_activated(false),_id(-1)
+MEDFileFieldRepresentationLeavesArrays::MEDFileFieldRepresentationLeavesArrays(const MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS>& arr):MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS>(arr),_activated(false),_id(-1)
 {
-  std::vector< std::vector<ParaMEDMEM::TypeOfField> > typs((operator->())->getTypesOfFieldAvailable());
+  std::vector< std::vector<MEDCoupling::TypeOfField> > typs((operator->())->getTypesOfFieldAvailable());
   if(typs.size()<1)
     throw INTERP_KERNEL::Exception("There is a big internal problem in MEDLoader ! The field time spitting has failed ! A CRASH will occur soon !");
   if(typs[0].size()!=1)
     throw INTERP_KERNEL::Exception("There is a big internal problem in MEDLoader ! The field spitting by spatial discretization has failed ! A CRASH will occur soon !");
-  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDiscretization> fd(MEDCouplingFieldDiscretization::New(typs[0][0]));
+  MEDCoupling::MCAuto<MEDCoupling::MEDCouplingFieldDiscretization> fd(MEDCouplingFieldDiscretization::New(typs[0][0]));
   std::ostringstream oss2; oss2 << (operator->())->getName() << ZE_SEP << fd->getRepr();
   _ze_name=oss2.str();
 }
 
 MEDFileFieldRepresentationLeavesArrays& MEDFileFieldRepresentationLeavesArrays::operator=(const MEDFileFieldRepresentationLeavesArrays& other)
 {
-  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>::operator=(other);
+  MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS>::operator=(other);
   _id=-1;
   _activated=false;
   _ze_name=other._ze_name;
@@ -272,15 +317,14 @@ bool MEDFileFieldRepresentationLeavesArrays::setStatus(bool status) const
   return ret;
 }
 
-void MEDFileFieldRepresentationLeavesArrays::appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshStruct *mst, vtkDataSet *ds) const
+void MEDFileFieldRepresentationLeavesArrays::appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshStruct *mst, vtkDataSet *ds) const
 {
-  const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
   const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_DELETE;
   tr->setNumberOfTS((operator->())->getNumberOfTS());
   tr->initIterator();
   for(int timeStepId=0;timeStepId<tr->size();timeStepId++,++(*tr))
     {
-      MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TS> f1ts((operator->())->getTimeStepAtPos(tr->getCurrent()));
+      MCAuto<MEDFileAnyTypeField1TS> f1ts((operator->())->getTimeStepAtPos(tr->getCurrent()));
       MEDFileAnyTypeField1TS *f1tsPtr(f1ts);
       MEDFileField1TS *f1tsPtrDbl(dynamic_cast<MEDFileField1TS *>(f1tsPtr));
       MEDFileIntField1TS *f1tsPtrInt(dynamic_cast<MEDFileIntField1TS *>(f1tsPtr));
@@ -293,7 +337,7 @@ void MEDFileFieldRepresentationLeavesArrays::appendFields(const MEDTimeReq *tr,
         throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeavesArrays::appendFields : only FLOAT64 and INT32 fields are dealt for the moment !");
       MEDFileField1TSStructItem fsst(MEDFileField1TSStructItem::BuildItemFrom(f1ts,mst));
       f1ts->loadArraysIfNecessary();
-      MEDCouplingAutoRefCountObjectPtr<DataArray> v(mml->buildDataArray(fsst,globs,crudeArr));
+      MCAuto<DataArray> v(mml->buildDataArray(fsst,globs,crudeArr));
       postProcessedArr=v;
       //
       std::vector<TypeOfField> discs(f1ts->getTypesOfFieldAvailable());
@@ -332,14 +376,7 @@ void MEDFileFieldRepresentationLeavesArrays::appendFields(const MEDTimeReq *tr,
           vtkd->SetNumberOfComponents(vd->getNumberOfComponents());
           for(int i=0;i<vd->getNumberOfComponents();i++)
             vtkd->SetComponentName(i,vd->getInfoOnComponent(i).c_str());
-          if(postProcessedArr!=crudeArr)
-            {
-              vtkd->SetArray(vd->getPointer(),vd->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); vd->accessToMemArray().setSpecificDeallocator(0);
-            }
-          else
-            {
-              vtkd->SetArray(vd->getPointer(),vd->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-            }
+          AssignDataPointerToVTK<double>(vtkd,vd,postProcessedArr==crudeArr);
           std::string name(tr->buildName(f1ts->getName()));
           vtkd->SetName(name.c_str());
           att->AddArray(vtkd);
@@ -412,14 +449,7 @@ void MEDFileFieldRepresentationLeavesArrays::appendFields(const MEDTimeReq *tr,
           vtkd->SetNumberOfComponents(vi->getNumberOfComponents());
           for(int i=0;i<vi->getNumberOfComponents();i++)
             vtkd->SetComponentName(i,vi->getVarOnComponent(i).c_str());
-          if(postProcessedArr!=crudeArr)
-            {
-              vtkd->SetArray(vi->getPointer(),vi->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); vi->accessToMemArray().setSpecificDeallocator(0);
-            }
-          else
-            {
-              vtkd->SetArray(vi->getPointer(),vi->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-            }
+          AssignDataPointerToVTK<int>(vtkd,vi,postProcessedArr==crudeArr);
           std::string name(tr->buildName(f1ts->getName()));
           vtkd->SetName(name.c_str());
           att->AddArray(vtkd);
@@ -441,8 +471,8 @@ MEDFileFieldRepresentationLeaves::MEDFileFieldRepresentationLeaves():_cached_ds(
 {
 }
 
-MEDFileFieldRepresentationLeaves::MEDFileFieldRepresentationLeaves(const std::vector< ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS> >& arr,
-                                                                   const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFastCellSupportComparator>& fsp):_arrays(arr.size()),_fsp(fsp),_cached_ds(0)
+MEDFileFieldRepresentationLeaves::MEDFileFieldRepresentationLeaves(const std::vector< MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS> >& arr,
+                                                                   const MEDCoupling::MCAuto<MEDCoupling::MEDFileFastCellSupportComparator>& fsp):_arrays(arr.size()),_fsp(fsp),_cached_ds(0)
 {
   for(std::size_t i=0;i<arr.size();i++)
     _arrays[i]=MEDFileFieldRepresentationLeavesArrays(arr[i]);
@@ -490,7 +520,7 @@ void MEDFileFieldRepresentationLeaves::computeFullNameInLeaves(const std::string
 /*!
  * \param [in] ms is the meshes pointer. It can be used only for information of geometric types. No special processing will be requested on ms.
  */
-void MEDFileFieldRepresentationLeaves::feedSIL(const ParaMEDMEM::MEDFileMeshes *ms, const std::string& meshName, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const
+void MEDFileFieldRepresentationLeaves::feedSIL(const MEDCoupling::MEDFileMeshes *ms, const std::string& meshName, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const
 {
   vtkIdType root2(sil->AddChild(root,edge));
   names.push_back(std::string("Arrs"));
@@ -499,10 +529,10 @@ void MEDFileFieldRepresentationLeaves::feedSIL(const ParaMEDMEM::MEDFileMeshes *
   //
   vtkIdType root3(sil->AddChild(root,edge));
   names.push_back(std::string("InfoOnGeoType"));
-  const ParaMEDMEM::MEDFileMesh *m(0);
+  const MEDCoupling::MEDFileMesh *m(0);
   if(ms)
     m=ms->getMeshWithName(meshName);
-  const ParaMEDMEM::MEDFileFastCellSupportComparator *fsp(_fsp);
+  const MEDCoupling::MEDFileFastCellSupportComparator *fsp(_fsp);
   if(!fsp || fsp->getNumberOfTS()==0)
     return ;
   std::vector< INTERP_KERNEL::NormalizedCellType > gts(fsp->getGeoTypesAt(0,m));
@@ -618,11 +648,11 @@ std::string MEDFileFieldRepresentationLeaves::getHumanReadableOverviewOfTS() con
   return oss.str();
 }
 
-void MEDFileFieldRepresentationLeaves::appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshes *meshes, vtkDataSet *ds) const
+void MEDFileFieldRepresentationLeaves::appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshes *meshes, vtkDataSet *ds) const
 {
   if(_arrays.size()<1)
     throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeaves::appendFields : internal error !");
-  MEDCouplingAutoRefCountObjectPtr<MEDFileMeshStruct> mst(MEDFileMeshStruct::New(meshes->getMeshWithName(_arrays[0]->getMeshName().c_str())));
+  MCAuto<MEDFileMeshStruct> mst(MEDFileMeshStruct::New(meshes->getMeshWithName(_arrays[0]->getMeshName().c_str())));
   for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
     if((*it).getStatus())
       {
@@ -633,32 +663,31 @@ void MEDFileFieldRepresentationLeaves::appendFields(const MEDTimeReq *tr, const
 
 vtkUnstructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationUnstructured(MEDUMeshMultiLev *mm) const
 {
-  const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
   DataArrayDouble *coordsMC(0);
   DataArrayByte *typesMC(0);
   DataArrayInt *cellLocationsMC(0),*cellsMC(0),*faceLocationsMC(0),*facesMC(0);
   bool statusOfCoords(mm->buildVTUArrays(coordsMC,typesMC,cellLocationsMC,cellsMC,faceLocationsMC,facesMC));
-  MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coordsSafe(coordsMC);
-  MEDCouplingAutoRefCountObjectPtr<DataArrayByte> typesSafe(typesMC);
-  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> cellLocationsSafe(cellLocationsMC),cellsSafe(cellsMC),faceLocationsSafe(faceLocationsMC),facesSafe(facesMC);
+  MCAuto<DataArrayDouble> coordsSafe(coordsMC);
+  MCAuto<DataArrayByte> typesSafe(typesMC);
+  MCAuto<DataArrayInt> cellLocationsSafe(cellLocationsMC),cellsSafe(cellsMC),faceLocationsSafe(faceLocationsMC),facesSafe(facesMC);
   //
   int nbOfCells(typesSafe->getNbOfElems());
   vtkUnstructuredGrid *ret(vtkUnstructuredGrid::New());
   vtkUnsignedCharArray *cellTypes(vtkUnsignedCharArray::New());
-  cellTypes->SetArray(reinterpret_cast<unsigned char *>(typesSafe->getPointer()),nbOfCells,0,VTK_DATA_ARRAY_FREE); typesSafe->accessToMemArray().setSpecificDeallocator(0);
+  AssignDataPointerOther<vtkUnsignedCharArray,DataArrayByte>(cellTypes,typesSafe,nbOfCells);
   vtkIdTypeArray *cellLocations(vtkIdTypeArray::New());
-  cellLocations->SetVoidArray(cellLocationsSafe->getPointer(),nbOfCells,0,VTK_DATA_ARRAY_FREE); cellLocationsSafe->accessToMemArray().setSpecificDeallocator(0);
+  AssignDataPointerOther<vtkIdTypeArray,DataArrayInt>(cellLocations,cellLocationsSafe,nbOfCells);
   vtkCellArray *cells(vtkCellArray::New());
   vtkIdTypeArray *cells2(vtkIdTypeArray::New());
-  cells2->SetVoidArray(cellsSafe->getPointer(),cellsSafe->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); cellsSafe->accessToMemArray().setSpecificDeallocator(0);
+  AssignDataPointerOther<vtkIdTypeArray,DataArrayInt>(cells2,cellsSafe,cellsSafe->getNbOfElems());
   cells->SetCells(nbOfCells,cells2);
   cells2->Delete();
   if(faceLocationsMC!=0 && facesMC!=0)
     {
       vtkIdTypeArray *faces(vtkIdTypeArray::New());
-      faces->SetVoidArray(facesSafe->getPointer(),facesSafe->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); facesSafe->accessToMemArray().setSpecificDeallocator(0);
+      AssignDataPointerOther<vtkIdTypeArray,DataArrayInt>(faces,facesSafe,facesSafe->getNbOfElems());
       vtkIdTypeArray *faceLocations(vtkIdTypeArray::New());
-      faceLocations->SetVoidArray(faceLocationsSafe->getPointer(),faceLocationsSafe->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); faceLocationsSafe->accessToMemArray().setSpecificDeallocator(0);
+      AssignDataPointerOther<vtkIdTypeArray,DataArrayInt>(faceLocations,faceLocationsSafe,faceLocationsSafe->getNbOfElems());
       ret->SetCells(cellTypes,cellLocations,cells,faceLocations,faces);
       faceLocations->Delete();
       faces->Delete();
@@ -671,13 +700,7 @@ vtkUnstructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInt
   vtkPoints *pts(vtkPoints::New());
   vtkDoubleArray *pts2(vtkDoubleArray::New());
   pts2->SetNumberOfComponents(3);
-  if(!statusOfCoords)
-    {
-      pts2->SetArray(coordsSafe->getPointer(),coordsSafe->getNbOfElems(),0,VTK_DATA_ARRAY_FREE);
-      coordsSafe->accessToMemArray().setSpecificDeallocator(0);
-    }
-  else
-    pts2->SetArray(coordsSafe->getPointer(),coordsSafe->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+  AssignDataPointerToVTK<double>(pts2,coordsSafe,statusOfCoords);
   pts->SetData(pts2);
   pts2->Delete();
   ret->SetPoints(pts);
@@ -686,9 +709,8 @@ vtkUnstructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInt
   return ret;
 }
 
-vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCartesian(ParaMEDMEM::MEDCMeshMultiLev *mm) const
+vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCartesian(MEDCoupling::MEDCMeshMultiLev *mm) const
 {
-  const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
   bool isInternal;
   std::vector< DataArrayDouble * > arrs(mm->buildVTUArrays(isInternal));
   vtkDoubleArray *vtkTmp(0);
@@ -705,10 +727,7 @@ vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInte
   ret->SetDimensions(sizePerAxe[0],sizePerAxe[1],sizePerAxe[2]);
   vtkTmp=vtkDoubleArray::New();
   vtkTmp->SetNumberOfComponents(1);
-  if(isInternal)
-    vtkTmp->SetArray(arrs[0]->getPointer(),arrs[0]->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-  else
-    { vtkTmp->SetArray(arrs[0]->getPointer(),arrs[0]->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); arrs[0]->accessToMemArray().setSpecificDeallocator(0); }
+  AssignDataPointerToVTK<double>(vtkTmp,arrs[0],isInternal);
   ret->SetXCoordinates(vtkTmp);
   vtkTmp->Delete();
   arrs[0]->decrRef();
@@ -716,10 +735,7 @@ vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInte
     {
       vtkTmp=vtkDoubleArray::New();
       vtkTmp->SetNumberOfComponents(1);
-      if(isInternal)
-        vtkTmp->SetArray(arrs[1]->getPointer(),arrs[1]->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-      else
-        { vtkTmp->SetArray(arrs[1]->getPointer(),arrs[1]->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); arrs[1]->accessToMemArray().setSpecificDeallocator(0); }
+      AssignDataPointerToVTK<double>(vtkTmp,arrs[1],isInternal);
       ret->SetYCoordinates(vtkTmp);
       vtkTmp->Delete();
       arrs[1]->decrRef();
@@ -728,10 +744,7 @@ vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInte
     {
       vtkTmp=vtkDoubleArray::New();
       vtkTmp->SetNumberOfComponents(1);
-      if(isInternal)
-        vtkTmp->SetArray(arrs[2]->getPointer(),arrs[2]->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-      else
-        { vtkTmp->SetArray(arrs[2]->getPointer(),arrs[2]->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); arrs[2]->accessToMemArray().setSpecificDeallocator(0); }
+      AssignDataPointerToVTK<double>(vtkTmp,arrs[2],isInternal);
       ret->SetZCoordinates(vtkTmp);
       vtkTmp->Delete();
       arrs[2]->decrRef();
@@ -739,9 +752,8 @@ vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInte
   return ret;
 }
 
-vtkStructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCurveLinear(ParaMEDMEM::MEDCurveLinearMeshMultiLev *mm) const
+vtkStructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCurveLinear(MEDCoupling::MEDCurveLinearMeshMultiLev *mm) const
 {
-  const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
   int meshStr[3]={1,1,1};
   DataArrayDouble *coords(0);
   std::vector<int> nodeStrct;
@@ -760,17 +772,11 @@ vtkStructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInter
   vtkDoubleArray *da(vtkDoubleArray::New());
   da->SetNumberOfComponents(3);
   if(coords->getNumberOfComponents()==3)
-    {
-      if(isInternal)
-        da->SetArray(coords->getPointer(),coords->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);//VTK has not the ownership of double * because MEDLoader main struct has it !
-      else
-        { da->SetArray(coords->getPointer(),coords->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); coords->accessToMemArray().setSpecificDeallocator(0); }
-    }
+    AssignDataPointerToVTK<double>(da,coords,isInternal);//if isIntenal==True VTK has not the ownership of double * because MEDLoader main struct has it !
   else
     {
-      MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coords2(coords->changeNbOfComponents(3,0.));
-      da->SetArray(coords2->getPointer(),coords2->getNbOfElems(),0,VTK_DATA_ARRAY_FREE);//let VTK deal with double *
-      coords2->accessToMemArray().setSpecificDeallocator(0);
+      MCAuto<DataArrayDouble> coords2(coords->changeNbOfComponents(3,0.));
+      AssignDataPointerToVTK<double>(da,coords2,false);//let VTK deal with double *
     }
   coords->decrRef();
   vtkPoints *points=vtkPoints::New();
@@ -781,13 +787,12 @@ vtkStructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInter
   return ret;
 }
  
-vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDFileMeshes *meshes) const
+vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDFileMeshes *meshes) const
 {
-  const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
   vtkDataSet *ret(0);
   //_fsp->isDataSetSupportEqualToThePreviousOne(i,globs);
-  MEDCouplingAutoRefCountObjectPtr<MEDMeshMultiLev> mml(_fsp->buildFromScratchDataSetSupport(0,globs));//0=timestep Id. Make the hypothesis that support does not change 
-  MEDCouplingAutoRefCountObjectPtr<MEDMeshMultiLev> mml2(mml->prepare());
+  MCAuto<MEDMeshMultiLev> mml(_fsp->buildFromScratchDataSetSupport(0,globs));//0=timestep Id. Make the hypothesis that support does not change 
+  MCAuto<MEDMeshMultiLev> mml2(mml->prepare());
   MEDMeshMultiLev *ptMML2(mml2);
   if(!_cached_ds)
     {
@@ -828,10 +833,7 @@ vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolatio
       vtkIntArray *vtkTab(vtkIntArray::New());
       vtkTab->SetNumberOfComponents(1);
       vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_CELL_NAME);
-      if(noCpyFamCells)
-        vtkTab->SetArray(famCells->getPointer(),famCells->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-      else
-        { vtkTab->SetArray(famCells->getPointer(),famCells->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); famCells->accessToMemArray().setSpecificDeallocator(0); }
+      AssignDataPointerToVTK<int>(vtkTab,famCells,noCpyFamCells);
       ret->GetCellData()->AddArray(vtkTab);
       vtkTab->Delete();
       famCells->decrRef();
@@ -842,10 +844,7 @@ vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolatio
       vtkIntArray *vtkTab(vtkIntArray::New());
       vtkTab->SetNumberOfComponents(1);
       vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::NUM_ID_CELL_NAME);
-      if(noCpyNumCells)
-        vtkTab->SetArray(numCells->getPointer(),numCells->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-      else
-        { vtkTab->SetArray(numCells->getPointer(),numCells->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); numCells->accessToMemArray().setSpecificDeallocator(0); }
+      AssignDataPointerToVTK<int>(vtkTab,numCells,noCpyNumCells);
       ret->GetCellData()->AddArray(vtkTab);
       vtkTab->Delete();
       numCells->decrRef();
@@ -859,10 +858,7 @@ vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolatio
       vtkIntArray *vtkTab(vtkIntArray::New());
       vtkTab->SetNumberOfComponents(1);
       vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME);
-      if(noCpyFamNodes)
-        vtkTab->SetArray(famNodes->getPointer(),famNodes->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-      else
-        { vtkTab->SetArray(famNodes->getPointer(),famNodes->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); famNodes->accessToMemArray().setSpecificDeallocator(0); }
+      AssignDataPointerToVTK<int>(vtkTab,famNodes,noCpyFamNodes);
       ret->GetPointData()->AddArray(vtkTab);
       vtkTab->Delete();
       famNodes->decrRef();
@@ -873,14 +869,23 @@ vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolatio
       vtkIntArray *vtkTab(vtkIntArray::New());
       vtkTab->SetNumberOfComponents(1);
       vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::NUM_ID_NODE_NAME);
-      if(noCpyNumNodes)
-        vtkTab->SetArray(numNodes->getPointer(),numNodes->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
-      else
-        { vtkTab->SetArray(numNodes->getPointer(),numNodes->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); numNodes->accessToMemArray().setSpecificDeallocator(0); }
+      AssignDataPointerToVTK<int>(vtkTab,numNodes,noCpyNumNodes);
       ret->GetPointData()->AddArray(vtkTab);
       vtkTab->Delete();
       numNodes->decrRef();
     }
+  // Global Node Ids if any ! (In // mode)
+  DataArrayInt *gni(ptMML2->retrieveGlobalNodeIdsIfAny());
+  if(gni)
+    {
+      vtkIntArray *vtkTab(vtkIntArray::New());
+      vtkTab->SetNumberOfComponents(1);
+      vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::GLOBAL_NODE_ID_NAME);
+      AssignDataPointerToVTK<int>(vtkTab,gni,false);
+      ret->GetPointData()->AddArray(vtkTab);
+      vtkTab->Delete();
+      gni->decrRef();
+    }
   return ret;
 }
 
@@ -1112,10 +1117,10 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam
           int nbMeshes(_ms->getNumberOfMeshes());
           for(int i=0;i<nbMeshes;i++)
             {
-              ParaMEDMEM::MEDFileMesh *tmp(_ms->getMeshAtPos(i));
-              ParaMEDMEM::MEDFileUMesh *tmp2(dynamic_cast<ParaMEDMEM::MEDFileUMesh *>(tmp));
+              MEDCoupling::MEDFileMesh *tmp(_ms->getMeshAtPos(i));
+              MEDCoupling::MEDFileUMesh *tmp2(dynamic_cast<MEDCoupling::MEDFileUMesh *>(tmp));
               if(tmp2)
-                MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp3(tmp2->zipCoords());
+                MCAuto<DataArrayInt> tmp3(tmp2->zipCoords());
             }
           _fields=MEDFileFields::LoadPartOf(fileName,false,_ms);//false is important to not read the values
 #else
@@ -1126,22 +1131,22 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam
     }
   else
     {
-      MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::SauvReader> sr(ParaMEDMEM::SauvReader::New(fileName));
-      MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileData> mfd(sr->loadInMEDFileDS());
+      MCAuto<MEDCoupling::SauvReader> sr(MEDCoupling::SauvReader::New(fileName));
+      MCAuto<MEDCoupling::MEDFileData> mfd(sr->loadInMEDFileDS());
       _ms=mfd->getMeshes(); _ms->incrRef();
       int nbMeshes(_ms->getNumberOfMeshes());
       for(int i=0;i<nbMeshes;i++)
         {
-          ParaMEDMEM::MEDFileMesh *tmp(_ms->getMeshAtPos(i));
-          ParaMEDMEM::MEDFileUMesh *tmp2(dynamic_cast<ParaMEDMEM::MEDFileUMesh *>(tmp));
+          MEDCoupling::MEDFileMesh *tmp(_ms->getMeshAtPos(i));
+          MEDCoupling::MEDFileUMesh *tmp2(dynamic_cast<MEDCoupling::MEDFileUMesh *>(tmp));
           if(tmp2)
             tmp2->forceComputationOfParts();
         }
       _fields=mfd->getFields();
-      if((ParaMEDMEM::MEDFileFields *)_fields)
+      if((MEDCoupling::MEDFileFields *)_fields)
         _fields->incrRef();
     }
-  if(!((ParaMEDMEM::MEDFileFields *)_fields))
+  if(!((MEDCoupling::MEDFileFields *)_fields))
     {
       _fields=BuildFieldFromMeshes(_ms);
     }
@@ -1152,29 +1157,29 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam
   _ms->cartesianizeMe();
   _fields->removeFieldsWithoutAnyTimeStep();
   std::vector<std::string> meshNames(_ms->getMeshesNames());
-  std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFields> > fields_per_mesh(meshNames.size());
+  std::vector< MCAuto<MEDFileFields> > fields_per_mesh(meshNames.size());
   for(std::size_t i=0;i<meshNames.size();i++)
     {
       fields_per_mesh[i]=_fields->partOfThisLyingOnSpecifiedMeshName(meshNames[i].c_str());
     }
-  std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS > > allFMTSLeavesToDisplaySafe;
+  std::vector< MCAuto<MEDFileAnyTypeFieldMultiTS > > allFMTSLeavesToDisplaySafe;
   std::size_t k(0);
-  for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFields> >::const_iterator fields=fields_per_mesh.begin();fields!=fields_per_mesh.end();fields++)
+  for(std::vector< MCAuto<MEDFileFields> >::const_iterator fields=fields_per_mesh.begin();fields!=fields_per_mesh.end();fields++)
     {
       for(int j=0;j<(*fields)->getNumberOfFields();j++)
         {
-          MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> fmts((*fields)->getFieldAtPos((int)j));
-          std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > tmp(fmts->splitDiscretizations());
+          MCAuto<MEDFileAnyTypeFieldMultiTS> fmts((*fields)->getFieldAtPos((int)j));
+          std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > tmp(fmts->splitDiscretizations());
           // EDF 8655
-          for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > >::const_iterator it=tmp.begin();it!=tmp.end();it++)
+          for(std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > >::const_iterator it=tmp.begin();it!=tmp.end();it++)
             {
               if(!(*it)->presenceOfMultiDiscPerGeoType())
                 allFMTSLeavesToDisplaySafe.push_back(*it);
               else
                 {// The case of some parts of field have more than one discretization per geo type.
-                  std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > subTmp((*it)->splitMultiDiscrPerGeoTypes());
+                  std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > subTmp((*it)->splitMultiDiscrPerGeoTypes());
                   std::size_t it0Cnt(0);
-                  for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > >::iterator it0=subTmp.begin();it0!=subTmp.end();it0++,it0Cnt++)//not const because setName
+                  for(std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > >::iterator it0=subTmp.begin();it0!=subTmp.end();it0++,it0Cnt++)//not const because setName
                     {
                       std::ostringstream oss; oss << (*it0)->getName() << "_" << std::setfill('M') << std::setw(3) << it0Cnt;
                       (*it0)->setName(oss.str());
@@ -1192,7 +1197,7 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam
     }
   std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > allFMTSLeavesPerTimeSeries(MEDFileAnyTypeFieldMultiTS::SplitIntoCommonTimeSeries(allFMTSLeavesToDisplay));
   // memory safety part
-  std::vector< std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> > > allFMTSLeavesPerTimeSeriesSafe(allFMTSLeavesPerTimeSeries.size());
+  std::vector< std::vector< MCAuto<MEDFileAnyTypeFieldMultiTS> > > allFMTSLeavesPerTimeSeriesSafe(allFMTSLeavesPerTimeSeries.size());
   for(std::size_t j=0;j<allFMTSLeavesPerTimeSeries.size();j++)
     {
       allFMTSLeavesPerTimeSeriesSafe[j].resize(allFMTSLeavesPerTimeSeries[j].size());
@@ -1208,7 +1213,7 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam
   for(std::size_t i=0;i<allFMTSLeavesPerTimeSeriesSafe.size();i++)
     {
       std::vector< std::string > meshNamesLoc;
-      std::vector< std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> > > splitByMeshName;
+      std::vector< std::vector< MCAuto<MEDFileAnyTypeFieldMultiTS> > > splitByMeshName;
       for(std::size_t j=0;j<allFMTSLeavesPerTimeSeriesSafe[i].size();j++)
         {
           std::string meshName(allFMTSLeavesPerTimeSeriesSafe[i][j]->getMeshName());
@@ -1225,13 +1230,13 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam
       _data_structure[i].resize(meshNamesLoc.size());
       for(std::size_t j=0;j<splitByMeshName.size();j++)
         {
-          std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFastCellSupportComparator> > fsp;
+          std::vector< MCAuto<MEDFileFastCellSupportComparator> > fsp;
           std::vector< MEDFileAnyTypeFieldMultiTS *> sbmn(splitByMeshName[j].size());
           for(std::size_t k=0;k<splitByMeshName[j].size();k++)
             sbmn[k]=splitByMeshName[j][k];
           //getMeshWithName does not return a newly allocated object ! It is a true get* method !
           std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > commonSupSplit(MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(sbmn,_ms->getMeshWithName(meshNamesLoc[j].c_str()),fsp));
-          std::vector< std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> > > commonSupSplitSafe(commonSupSplit.size());
+          std::vector< std::vector< MCAuto<MEDFileAnyTypeFieldMultiTS> > > commonSupSplitSafe(commonSupSplit.size());
           this->_data_structure[i][j].resize(commonSupSplit.size());
           for(std::size_t k=0;k<commonSupSplit.size();k++)
             {
@@ -1409,7 +1414,7 @@ std::map<std::string,bool> MEDFileFieldRepresentationTree::dumpState() const
   return ret;
 }
 
-void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms, ParaMEDMEM::MEDFileFields *ret)
+void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const MEDCoupling::MEDFileMeshes *ms, MEDCoupling::MEDFileFields *ret)
 {
   if(!ret)
     throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationTree::AppendFieldFromMeshes : internal error ! NULL ret !");
@@ -1417,7 +1422,7 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED
     {
       MEDFileMesh *mm(ms->getMeshAtPos(i));
       std::vector<int> levs(mm->getNonEmptyLevels());
-      ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileField1TS> f1tsMultiLev(ParaMEDMEM::MEDFileField1TS::New());
+      MEDCoupling::MCAuto<MEDCoupling::MEDFileField1TS> f1tsMultiLev(MEDCoupling::MEDFileField1TS::New());
       MEDFileUMesh *mmu(dynamic_cast<MEDFileUMesh *>(mm));
       if(mmu)
         {
@@ -1426,10 +1431,10 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED
               std::vector<INTERP_KERNEL::NormalizedCellType> gts(mmu->getGeoTypesAtLevel(*it));
               for(std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator gt=gts.begin();gt!=gts.end();gt++)
                 {
-                  ParaMEDMEM::MEDCouplingMesh *m(mmu->getDirectUndergroundSingleGeoTypeMesh(*gt));
-                  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDouble> f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS));
+                  MEDCoupling::MEDCouplingMesh *m(mmu->getDirectUndergroundSingleGeoTypeMesh(*gt));
+                  MEDCoupling::MCAuto<MEDCoupling::MEDCouplingFieldDouble> f(MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS));
                   f->setMesh(m);
-                  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());
+                  MEDCoupling::MCAuto<MEDCoupling::DataArrayDouble> arr(MEDCoupling::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());
                   arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
                   arr->iota();
                   f->setArray(arr);
@@ -1442,10 +1447,10 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED
               std::vector<int> levsExt(mm->getNonEmptyLevelsExt());
               if(levsExt.size()==levs.size()+1)
                 {
-                  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingMesh> m(mm->getMeshAtLevel(1));
-                  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDouble> f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_NODES));
+                  MEDCoupling::MCAuto<MEDCoupling::MEDCouplingMesh> m(mm->getMeshAtLevel(1));
+                  MEDCoupling::MCAuto<MEDCoupling::MEDCouplingFieldDouble> f(MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_NODES));
                   f->setMesh(m);
-                  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(m->getNumberOfNodes());
+                  MEDCoupling::MCAuto<MEDCoupling::DataArrayDouble> arr(MEDCoupling::DataArrayDouble::New()); arr->alloc(m->getNumberOfNodes());
                   arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
                   arr->iota(); f->setArray(arr);
                   f->setName(BuildAUniqueArrayNameForMesh(mm->getName(),ret));
@@ -1457,10 +1462,10 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED
         }
       else
         {
-          ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingMesh> m(mm->getMeshAtLevel(0));
-          ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDouble> f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS));
+          MEDCoupling::MCAuto<MEDCoupling::MEDCouplingMesh> m(mm->getMeshAtLevel(0));
+          MEDCoupling::MCAuto<MEDCoupling::MEDCouplingFieldDouble> f(MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS));
           f->setMesh(m);
-          ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());
+          MEDCoupling::MCAuto<MEDCoupling::DataArrayDouble> arr(MEDCoupling::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());
           arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
           arr->iota();
           f->setArray(arr);
@@ -1468,13 +1473,13 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED
           f1tsMultiLev->setFieldNoProfileSBT(f);
         }
       //
-      ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFieldMultiTS> fmtsMultiLev(ParaMEDMEM::MEDFileFieldMultiTS::New());
+      MEDCoupling::MCAuto<MEDCoupling::MEDFileFieldMultiTS> fmtsMultiLev(MEDCoupling::MEDFileFieldMultiTS::New());
       fmtsMultiLev->pushBackTimeStep(f1tsMultiLev);
       ret->pushField(fmtsMultiLev);
     }
 }
 
-std::string MEDFileFieldRepresentationTree::BuildAUniqueArrayNameForMesh(const std::string& meshName, const ParaMEDMEM::MEDFileFields *ret)
+std::string MEDFileFieldRepresentationTree::BuildAUniqueArrayNameForMesh(const std::string& meshName, const MEDCoupling::MEDFileFields *ret)
 {
   const char KEY_STR_TO_AVOID_COLLIDE[]="MESH@";
   if(!ret)
@@ -1488,9 +1493,9 @@ std::string MEDFileFieldRepresentationTree::BuildAUniqueArrayNameForMesh(const s
   return tmpName;
 }
 
-ParaMEDMEM::MEDFileFields *MEDFileFieldRepresentationTree::BuildFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms)
+MEDCoupling::MEDFileFields *MEDFileFieldRepresentationTree::BuildFieldFromMeshes(const MEDCoupling::MEDFileMeshes *ms)
 {
-  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFields> ret(ParaMEDMEM::MEDFileFields::New());
+  MEDCoupling::MCAuto<MEDCoupling::MEDFileFields> ret(MEDCoupling::MEDFileFields::New());
   AppendFieldFromMeshes(ms,ret);
   return ret.retn();
 }
index 6e9cfa9dce28bd506bab206e899fdae4413795e2..96f945345c0817763d0b861a6028402f45fd21bd 100644 (file)
@@ -46,12 +46,12 @@ class MEDTimeReq;
 class ELGACmp
 {
 public:
-  vtkIdTypeArray *findOrCreate(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const;
+  vtkIdTypeArray *findOrCreate(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const;
   void appendELGAIfAny(vtkDataSet *ds) const;
   ~ELGACmp();
 private:
   vtkIdTypeArray *isExisting(const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd) const;
-  vtkIdTypeArray *createNew(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const;
+  vtkIdTypeArray *createNew(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const;
 private:
   //! size of _loc_names is equal to _elgas.
   mutable std::vector< std::vector<std::string> > _loc_names;
@@ -61,11 +61,11 @@ private:
   mutable std::vector< std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > > > _defs;
 };
 
-class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeavesArrays : public ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>
+class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeavesArrays : public MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS>
 {
 public:
   MEDFileFieldRepresentationLeavesArrays();
-  MEDFileFieldRepresentationLeavesArrays(const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>& arr);
+  MEDFileFieldRepresentationLeavesArrays(const MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS>& arr);
   MEDFileFieldRepresentationLeavesArrays& operator=(const MEDFileFieldRepresentationLeavesArrays& other);
   int getId() const;
   void setId(int& id) const;
@@ -75,7 +75,7 @@ public:
   bool setStatus(bool status) const;
   std::string getZeName() const;
   const char *getZeNameC() const;
-  void appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshStruct *mst, vtkDataSet *ds) const;
+  void appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshStruct *mst, vtkDataSet *ds) const;
   void appendELGAIfAny(vtkDataSet *ds) const;
 public:
   static const char ZE_SEP[];
@@ -85,6 +85,7 @@ public:
   static const char NUM_ID_CELL_NAME[];
   static const char FAMILY_ID_NODE_NAME[];
   static const char NUM_ID_NODE_NAME[];
+  static const char GLOBAL_NODE_ID_NAME[];
 private:
   mutable bool _activated;
   mutable int _id;
@@ -97,15 +98,15 @@ class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeaves
 {
 public:
   MEDFileFieldRepresentationLeaves();
-  MEDFileFieldRepresentationLeaves(const std::vector< ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS> >& arr,
-                                   const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFastCellSupportComparator>& fsp);
+  MEDFileFieldRepresentationLeaves(const std::vector< MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS> >& arr,
+                                   const MEDCoupling::MCAuto<MEDCoupling::MEDFileFastCellSupportComparator>& fsp);
   ~MEDFileFieldRepresentationLeaves();
   bool empty() const;
   void setId(int& id) const;
   std::string getMeshName() const;
   int getNumberOfArrays() const;
   int getNumberOfTS() const;
-  void feedSIL(const ParaMEDMEM::MEDFileMeshes *ms, const std::string& meshName, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const;
+  void feedSIL(const MEDCoupling::MEDFileMeshes *ms, const std::string& meshName, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const;
   void computeFullNameInLeaves(const std::string& tsName, const std::string& meshName, const std::string& comSupStr) const;
   bool containId(int id) const;
   bool containZeName(const char *name, int& id) const;
@@ -117,15 +118,15 @@ public:
   std::vector<double> getTimeSteps(const TimeKeeper& tk) const;
   std::vector< std::pair<int,int> > getTimeStepsInCoarseMEDFileFormat(std::vector<double>& ts) const;
   std::string getHumanReadableOverviewOfTS() const;
-  vtkDataSet *buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDFileMeshes *meshes) const;
+  vtkDataSet *buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDFileMeshes *meshes) const;
 private:
-  vtkUnstructuredGrid *buildVTKInstanceNoTimeInterpolationUnstructured(ParaMEDMEM::MEDUMeshMultiLev *mm) const;
-  vtkRectilinearGrid *buildVTKInstanceNoTimeInterpolationCartesian(ParaMEDMEM::MEDCMeshMultiLev *mm) const;
-  vtkStructuredGrid *buildVTKInstanceNoTimeInterpolationCurveLinear(ParaMEDMEM::MEDCurveLinearMeshMultiLev *mm) const;
-  void appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshes *meshes, vtkDataSet *ds) const;
+  vtkUnstructuredGrid *buildVTKInstanceNoTimeInterpolationUnstructured(MEDCoupling::MEDUMeshMultiLev *mm) const;
+  vtkRectilinearGrid *buildVTKInstanceNoTimeInterpolationCartesian(MEDCoupling::MEDCMeshMultiLev *mm) const;
+  vtkStructuredGrid *buildVTKInstanceNoTimeInterpolationCurveLinear(MEDCoupling::MEDCurveLinearMeshMultiLev *mm) const;
+  void appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshes *meshes, vtkDataSet *ds) const;
 private:
   std::vector<MEDFileFieldRepresentationLeavesArrays> _arrays;
-  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFastCellSupportComparator> _fsp;
+  MEDCoupling::MCAuto<MEDCoupling::MEDFileFastCellSupportComparator> _fsp;
   mutable vtkDataSet *_cached_ds;
 };
 
@@ -164,15 +165,15 @@ public:
 private:
   const MEDFileFieldRepresentationLeavesArrays& getLeafArr(int id) const;
   const MEDFileFieldRepresentationLeaves& getTheSingleActivated(int& lev0, int& lev1, int& lev2) const;
-  static ParaMEDMEM::MEDFileFields *BuildFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms);
-  static void AppendFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms, ParaMEDMEM::MEDFileFields *ret);
-  static std::string BuildAUniqueArrayNameForMesh(const std::string& meshName, const ParaMEDMEM::MEDFileFields *ret);
+  static MEDCoupling::MEDFileFields *BuildFieldFromMeshes(const MEDCoupling::MEDFileMeshes *ms);
+  static void AppendFieldFromMeshes(const MEDCoupling::MEDFileMeshes *ms, MEDCoupling::MEDFileFields *ret);
+  static std::string BuildAUniqueArrayNameForMesh(const std::string& meshName, const MEDCoupling::MEDFileFields *ret);
   static std::vector<std::string> SplitFieldNameIntoParts(const std::string& fullFieldName, char sep);
 private:
   // 1st : timesteps, 2nd : meshName, 3rd : common support
   std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > > _data_structure;
-  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileMeshes> _ms;
-  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFields> _fields;
+  MEDCoupling::MCAuto<MEDCoupling::MEDFileMeshes> _ms;
+  MEDCoupling::MCAuto<MEDCoupling::MEDFileFields> _fields;
 };
 
 class MEDLOADERFORPV_EXPORT TimeKeeper
index 5152a81c1a7022dc3b90a7a8c8d2c879989ffcc5..d79200a2d68ce97ede5811bcaa7959377198521b 100644 (file)
@@ -341,13 +341,13 @@ int vtkExtractCellType::RequestInformation(vtkInformation *request, vtkInformati
              const std::map<int,INTERP_KERNEL::NormalizedCellType>::const_iterator it(m.find(vtkCt));
              if(it==m.end())
                {
-                 const unsigned char *pos(std::find(ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH,vtkCt));
-                 if(pos==ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH)
+                 const unsigned char *pos(std::find(MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH,vtkCt));
+                 if(pos==MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH)
                    {
                      vtkDebugMacro("vtkExtractCellType::RequestInformation : cell #" << cellId << " has unrecognized type !");
                      return 0;
                    }
-                 m[vtkCt]=(INTERP_KERNEL::NormalizedCellType)std::distance(ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,pos);
+                 m[vtkCt]=(INTERP_KERNEL::NormalizedCellType)std::distance(MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,pos);
             }
            }
          this->Internal->loadFrom(m);
index 7c4b308cb9e3f0ba9c631f19c7a089d6352284db..58944ecf62c156ee6fff3e08eb7c396fdb0d5a97 100644 (file)
@@ -206,7 +206,7 @@ vtkInformationDataObjectMetaDataKey *vtkMEDReader::META_DATA()
 {
   static const char ZE_KEY[]="vtkMEDReader::META_DATA";
   vtkInformationDataObjectMetaDataKey *ret(vtkMEDReader_META_DATA);
-  ParaMEDMEM::GlobalDict *gd(ParaMEDMEM::GlobalDict::GetInstance());
+  MEDCoupling::GlobalDict *gd(MEDCoupling::GlobalDict::GetInstance());
   if(!gd->hasKey(ZE_KEY))
     {// here META_DATA is put on global var to be exchanged with other filters without dependancy of MEDReader. Please do not change ZE_KEY !
       std::ostringstream oss; oss << ret;
index f92e18476f54953eadd396fe3b1f6e5f896ee540..2f948dad75db6acf42e22a0543caa5745238de39 100644 (file)
@@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../IO )
 
 IF(PARAVIEW_BUILD_QT_GUI)
 
-  QT4_WRAP_UI(CLIENT_UI_SRCS
+  QT_WRAP_UIC(CLIENT_UI_SRCS
     Resources/UI/MEDReaderVectorsWidget.ui
     Resources/UI/MEDReaderTimeModeWidget.ui)
 
@@ -41,7 +41,7 @@ IF(PARAVIEW_BUILD_QT_GUI)
     pqMEDReaderTimesFlagsWidget.cxx
     pqMEDReaderFieldsWidget.cxx)
 
-  QT4_WRAP_CPP(MOC_SRCS
+  QT_WRAP_MOC(MOC_SRCS
     pqExtractGroupFieldsWidget.h
     pqAbstractFieldsWidget.h
     VectBoolSpreadSheet.h
index 839136eba9de2513c15cf0f7f71f62f66bfdf7df..8f560beb168e65f459f5590ae0efac3b21d2d667 100644 (file)
@@ -217,8 +217,13 @@ void VectBoolSpreadSheet::init()
   this->verticalHeader()->setMinimumSectionSize(2);
   this->verticalHeader()->setDefaultSectionSize(2);
   this->setItemDelegate(_delegate);
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   this->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
   this->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
+#else
+  this->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
+  this->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
+#endif
   this->resizeColumnsToContents();
   this->resizeRowsToContents();
   //this->verticalHeader()->hide();
index bd87d10582b215bb78eb4a9134446d33459ef1b5..c27a45f9f82b206bb05b0e82ed6d959705fec799 100644 (file)
Binary files a/src/Plugins/MEDReader/Test/Baselines/testMEDReader20.png and b/src/Plugins/MEDReader/Test/Baselines/testMEDReader20.png differ
diff --git a/src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png b/src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png
new file mode 100644 (file)
index 0000000..bd87d10
Binary files /dev/null and b/src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png differ
index fd2950079f0bf32f4ce1a3ef0e57d3ce04e6ba6d..8ebef2151c75c4926bd147ae36b65033136e87d7 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
+SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21)
 
 SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDReader)
+SET(BASELINES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Baselines")
 
 IF(KW_TESTING_PLATFORM)
 
-FOREACH(tfile ${TEST_NUMBERS})
-  INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py
-          DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-  INSTALL(FILES CTestTestfileInstall.cmake
-        DESTINATION ${TEST_INSTALL_DIRECTORY}
-        RENAME CTestTestfile.cmake)
-
 cmake_minimum_required(VERSION 2.7)
 
 find_package(ParaView REQUIRED)
@@ -54,13 +46,9 @@ set(PARAVIEW_CLIENT "${PARAVIEW_BIN_DIR}/paraview")
 set(PARAVIEW_SERVER "${PARAVIEW_BIN_DIR}/pvserver")
 set(PVPYTHON "${PARAVIEW_BIN_DIR}/pvpython")
 
-set(BASELINES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Baselines")
 set(PYTHON_SCRIPTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
 set(TEMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/Testing/Temporary")
 
-# Application tests
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDReader)
-
 if(NOT EXISTS ${TEMP_DIR})
   file(MAKE_DIRECTORY ${TEMP_DIR})
 endif()
@@ -98,12 +86,24 @@ ELSE(KW_TESTING_PLATFORM)
 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
 
 FOREACH(tfile ${TEST_NUMBERS})
-  ADD_TEST(testMEDReader${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py -B ${CMAKE_CURRENT_SOURCE_DIR}/Baselines )
+  ADD_TEST(testMEDReader${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py -B ${BASELINES_DIR} )
   SET_TESTS_PROPERTIES(testMEDReader${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
 
 ENDIF(KW_TESTING_PLATFORM)
 
+
+# Application tests
+FOREACH(tfile ${TEST_NUMBERS})
+  INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader${tfile}.py
+          DESTINATION ${TEST_INSTALL_DIRECTORY})
+ENDFOREACH()
+
+FILE(GLOB BASELINE_FILES "${BASELINES_DIR}/*")
+FOREACH(baseline_file ${BASELINE_FILES})
+  INSTALL(FILES ${baseline_file} DESTINATION ${TEST_INSTALL_DIRECTORY}/Baselines)
+ENDFOREACH()
+
 INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${TEST_INSTALL_DIRECTORY}
         RENAME CTestTestfile.cmake)
index bc62bb7ff419ecbb2d151ae757a444ce00bd420f..c71da75d1bee108305f85f6258a4ecfe9401081e 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py")
 SET(COMPONENT_NAME MEDREADER)
-SET(TIMEOUT        30)
+SET(TIMEOUT        60)
 
-SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18)
+SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
+set(BASELINES_DIR "Baselines")
 
 FOREACH(tfile ${TEST_NUMBERS})
   SET(TEST_NAME MEDREADER_${tfile})
-  ADD_TEST(${TEST_NAME} python testMEDReader${tfile}.py)
-  #ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} testMEDReader${tfile}.py)
-  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+  ADD_TEST(${TEST_NAME} python testMEDReader${tfile}.py -B ${BASELINES_DIR})
+  SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" TIMEOUT ${TIMEOUT})
 ENDFOREACH()
index 017b8287738bf71e056bd7c072cd381c72707256..d6c59d5b43e66c633d9deb4a568a41decf36c471 100644 (file)
@@ -39,7 +39,7 @@ f0z.setMesh(mz)
 f0z.setArray(arr0)
 f0z.setGaussLocalizationOnType(NORM_QUAD9,[-1,-1,1,-1,1,1,-1,1,0,-1,1,0,0,1,-1,0,0,0],[-0.774597,-0.774597,0.774597,-0.774597,0.774597,0.774597,-0.774597,0.774597,0,-0.774597,0.774597,0,0,0.774597,-0.774597,0,0,0,-0.774597,-0.774597,0.774597,-0.774597,0.774597,0.774597,-0.774597,0.774597,0,-0.774597,0.774597,0,0,0.774597,-0.774597,0,0,0,-0.774597,-0.774597,0.774597,-0.774597,0.774597,0.774597,-0.774597,0.774597,0,-0.774597,0.774597,0,0,0.774597,-0.774597,0,0,0],[0.308642,0.308642,0.308642,0.308642,0.493827,0.493827,0.493827,0.493827,0.790123,0.308642,0.308642,0.308642,0.308642,0.493827,0.493827,0.493827,0.493827,0.790123,0.308642,0.308642,0.308642,0.308642,0.493827,0.493827,0.493827,0.493827,0.790123])
 f0z.setName("SolutionSIEF_ELGA")
-f0z.checkCoherency()
+f0z.checkConsistencyLight()
 ff0z=MEDFileField1TS()
 ff0z.setFieldNoProfileSBT(f0z)
 #
@@ -48,7 +48,7 @@ arr1.setInfoOnComponents(['VMIS','TRESCA'])
 f1z=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f1z.setName("SolutionSIEQ_ELNO")
 f1z.setArray(arr1)
 f1z.setMesh(mz)
-f1z.checkCoherency()
+f1z.checkConsistencyLight()
 ff1z=MEDFileField1TS()
 ff1z.setFieldNoProfileSBT(f1z)
 #
@@ -56,7 +56,7 @@ arr2=DataArrayDouble([4.938269266683534e-28,-6.232001151245993e-28,1.06022905661
 arr2.setInfoOnComponents(['DRX','DRZ'])
 f2z=MEDCouplingFieldDouble(ON_NODES) ; f2z.setName("SolutionDEPL") ; f2z.setArray(arr2)
 f2z.setMesh(mz)
-f2z.checkCoherency()
+f2z.checkConsistencyLight()
 ff2z=MEDFileField1TS()
 ff2z.setFieldNoProfileSBT(f2z)
 #
index 257cbab4a31792fbccd7ccef946652b050ba02bf..cbee37b9fafa94056ba261106995f32e226dcd2a 100644 (file)
@@ -33,26 +33,26 @@ m.allocateCells()
 m.insertNextCell(NORM_QUAD4,[0,5,3,2])
 m.insertNextCell(NORM_QUAD4,[4,2,3,1])
 m.finishInsertingCells()
-MEDLoader.WriteMesh(fname,m,True)
+WriteMesh(fname,m,True)
 #
 f0=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f0.setMesh(m) ; f0.setTimeUnit("ms")
 f0.setTime(1.1,1,1)
 f0.setName("myELNOField")
 arr=DataArrayDouble([7,5,3,1,5,3,1,7]) ; arr.setInfoOnComponent(0,"Comp0")
 f0.setArray(arr)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
+WriteFieldUsingAlreadyWrittenMesh(fname,f0)
 #
 f0.setTime(2.2,2,1)
 arr=DataArrayDouble([1,7,5,3,7,5,3,1]) ; arr.setInfoOnComponent(0,"Comp0")
 f0.setArray(arr)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
+WriteFieldUsingAlreadyWrittenMesh(fname,f0)
 #
 f0.setTime(3.3,3,1)
 arr=DataArrayDouble([3,1,7,5,1,7,5,3]) ; arr.setInfoOnComponent(0,"Comp0")
 f0.setArray(arr)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
+WriteFieldUsingAlreadyWrittenMesh(fname,f0)
 #
 f0.setTime(4.4,4,1)
 arr=DataArrayDouble([5,3,1,7,3,1,7,5]) ; arr.setInfoOnComponent(0,"Comp0")
 f0.setArray(arr)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
+WriteFieldUsingAlreadyWrittenMesh(fname,f0)
index 61544046e19e8bee633e01683eedf2d908d52bad..30953c59f66352cde7783effdfa87227fc78c4e1 100644 (file)
@@ -47,11 +47,11 @@ arr=DataArrayDouble.Aggregate(arr,arr2) ; arr3=DataArrayDouble(16) ; arr3.iota()
 arr.setInfoOnComponents(["1st","2nd","3rd","4th"])
 f3.setArray(arr)
 #
-MEDLoader.WriteMesh(fname,m,True)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f1)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f2)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f3)
+WriteMesh(fname,m,True)
+WriteFieldUsingAlreadyWrittenMesh(fname,f0)
+WriteFieldUsingAlreadyWrittenMesh(fname,f1)
+WriteFieldUsingAlreadyWrittenMesh(fname,f2)
+WriteFieldUsingAlreadyWrittenMesh(fname,f3)
 ################### MED write is done -> Go to MEDReader
 from paraview.simple import *
 
index 337b362b386de8579e74d2a8f38c546893e36972..8d3ce4d3d67ab457f66e0b11cc9acdbd0923b431 100644 (file)
@@ -85,7 +85,7 @@ for name,arrs in [("ENERGIE RECUE",(nrj_0_1,nrj_0_1)),("ENTHALPIE",(h_0,h_1)),("
         f1ts0=MEDFileField1TS()
         f=MEDCouplingFieldDouble(ON_CELLS) ; f.setName(name) ; f.setTime(ft,dt,it) ; f.setMesh(sup)
         f.setArray(arrs[its])
-        f.checkCoherency()
+        f.checkConsistencyLight()
         f1ts0.setFieldProfile(f,mm,0,pfl0)
         fmts0.pushBackTimeStep(f1ts0)
         pass
index 6c190b537ac87ea24cfe06f3b3bad1f05903f464..d19a774df4956081a7b8e2adfc74dbc5669ccd7c 100644 (file)
@@ -34,8 +34,8 @@ m.insertNextCell(NORM_TRI3,[0,1,3]) ; m.insertNextCell(NORM_TRI3,[1,2,3])
 f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setName("fieldELNO") ; f.setMesh(m)
 arr=DataArrayDouble([0.2,1.1,0.7,0.5,-0.3,0.4])
 f.setArray(DataArrayDouble.Meld(4*[arr]))
-f.checkCoherency()
-MEDLoader.WriteField(fname,f,True)
+f.checkConsistencyLight()
+WriteField(fname,f,True)
 
 ################### MED write is done -> Go to MEDReader
 
index ac0ea5c3990803d0672d745ddc67d9eaf4992c50..6412f05994f8942e3fa79d18d44a2125353e3d24 100644 (file)
@@ -78,7 +78,7 @@ for i in xrange(5):
     fNode.setGaussLocalizationOnCells(DataArrayInt.Range(0,12,1),[0.,0.,1.,0.,0.,1.],[0.1,0.1,0.8,0.1,0.1,0.8],3*[0.16666666666666666])
     fNode.setGaussLocalizationOnCells(DataArrayInt.Range(12,24,1),[-1.,-1.,1.,-1.,1.,1.,-1.,1.],[-0.577350,-0.577350,0.577350,-0.577350,0.577350,0.577350,-0.577350,0.577350],4*[1.])
     arr=DataArrayDouble(2*(12*3+12*4)) ; arr.iota(0+1000*i) ; arr.rearrange(2)
-    fNode.setArray(arr) ; arr.setInfoOnComponents(["Comp1_2 [m]","Com2_2 [s^2]"]) ; fNode.checkCoherency()
+    fNode.setArray(arr) ; arr.setInfoOnComponents(["Comp1_2 [m]","Com2_2 [s^2]"]) ; fNode.checkConsistencyLight()
     fNode.setName(fieldName0)
     f.setFieldProfile(fNode,mm,0,zePfl0)
     #
@@ -91,7 +91,7 @@ for i in xrange(5):
     fNode.setGaussLocalizationOnCells(DataArrayInt.Range(4,10,1),[-1.,1.],[-0.5,0.,0.5],[1.,1.,1.])
     fNode.setGaussLocalizationOnCells(DataArrayInt.Range(10,14,1),[-1.,1.],[-0.6,-0.2,0.2,0.6],[1.,1.,1.,1.])
     arr=DataArrayDouble(2*(4*2+6*3+4*4)) ; arr.iota(100+1000*i) ; arr.rearrange(2)
-    fNode.setArray(arr) ; arr.setInfoOnComponents(["Comp1_2 [m]","Com2_2 [s^2]"]) ; fNode.checkCoherency()
+    fNode.setArray(arr) ; arr.setInfoOnComponents(["Comp1_2 [m]","Com2_2 [s^2]"]) ; fNode.checkConsistencyLight()
     fNode.setName(fieldName0)
     f.setFieldProfile(fNode,mm,-1,zePfl1)
     fs0.pushBackTimeStep(f)
@@ -104,7 +104,7 @@ for i in xrange(5):
     fNode.setGaussLocalizationOnCells(DataArrayInt.Range(0,4,1),[-1.,1.],[-0.6,-0.2,0.2,0.6],[1.,1.,1.,1.])
     fNode.setGaussLocalizationOnCells(DataArrayInt.Range(4,10,1),[-1.,1.],[-0.6666666666666667,-0.33333333333333337,0.,0.33333333333333337,0.6666666666666667],[1.,1.,1.,1.,1.])
     arr=DataArrayDouble(2*(4*4+6*5)) ; arr.iota(500+1000*i) ; arr.rearrange(2)
-    fNode.setArray(arr) ; arr.setInfoOnComponents(["C1 [m]","C2 [s^2]"]) ; fNode.checkCoherency()
+    fNode.setArray(arr) ; arr.setInfoOnComponents(["C1 [m]","C2 [s^2]"]) ; fNode.checkConsistencyLight()
     f.setFieldProfile(fNode,mm,-1,zePfl2)
     fs1.pushBackTimeStep(f)
     #
index a26f76295979178f5876cc8ba54e5abe237dd69f..a68d7010a33c8128526ab600c0cd76ce9d97cec5 100644 (file)
@@ -38,7 +38,7 @@ f.setName(zeName)
 f.setArray(DataArrayDouble([(-1.,1.,0.),(0.,1.,0.),(1.,1.,0.)]))
 tmp=MEDCouplingUMesh.Build0DMeshFromCoords(m.getCoords()) ; tmp.setName(zeName)
 f.setMesh(tmp)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f)
+WriteFieldUsingAlreadyWrittenMesh(fname,f)
 #
 
 from paraview.simple import *
index 99b96edf79400a80ea16ac279d77aebc2ac5ed45..0252cb994272c4a3907192d89129f6d79dbc673f 100644 (file)
@@ -35,9 +35,9 @@ grp3=DataArrayInt([0,1,2,3]) ; grp3.setName("grp3")
 mm.setGroupsAtLevel(0,[grp0,grp1,grp2,grp3])
 f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setMesh(m) ; f.setName("MyField") ; f.setTime(0.,0,0)
 arr2=DataArrayDouble(4*4*2) ; arr2.iota() ; arr2.rearrange(2) ; arr2.setInfoOnComponents(["aa","bbb"])
-f.setArray(arr2) ; arr2+=0.1 ; f.checkCoherency()
+f.setArray(arr2) ; arr2+=0.1 ; f.checkConsistencyLight()
 mm.write(fname,2)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f)
+WriteFieldUsingAlreadyWrittenMesh(fname,f)
 #
 from paraview.simple import *
 from paraview import servermanager
index c19fdefacb4cb0138a59f8fb10fd7f41df16522a..e1564ba5b6594981ebc258638ac4b9653bc52131 100644 (file)
@@ -35,9 +35,9 @@ grp3=DataArrayInt([0,1,2,3]) ; grp3.setName("grp3")
 mm.setGroupsAtLevel(0,[grp0,grp1,grp2,grp3])
 f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setMesh(m) ; f.setName("MyField") ; f.setTime(0.,0,0)
 arr2=DataArrayDouble(4*4*2) ; arr2.iota() ; arr2.rearrange(2) ; arr2.setInfoOnComponents(["aa","bbb"])
-f.setArray(arr2) ; arr2+=0.1 ; f.checkCoherency()
+f.setArray(arr2) ; arr2+=0.1 ; f.checkConsistencyLight()
 mm.write(fname,2)
-MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f)
+WriteFieldUsingAlreadyWrittenMesh(fname,f)
 #
 from paraview.simple import *
 from paraview import servermanager
index 8c5631f5c240bf23627191a3260f0d5f9c0c05a2..da36c1c9ce7d86c53a89a1c10a99525341c14365 100644 (file)
@@ -46,7 +46,7 @@ mm.write(fname,2)
 pfl=DataArrayInt([7,8,9,10,13,14,15,16,19,20,21,22,25,26,27,28]) ; pfl.setName("pfl")
 f=MEDCouplingFieldDouble(ON_CELLS) ; f.setName("ACellField")
 arr=DataArrayDouble(16) ; arr.iota()
-arr2=arr.deepCpy() ; arr2.reverse()
+arr2=arr.deepCopy() ; arr2.reverse()
 arr=DataArrayDouble.Meld(arr,arr2) ; arr.setInfoOnComponents(["aa","bbb"])
 f.setArray(arr)
 f1ts=MEDFileField1TS()
index f8ec9d54c69afbd0791176154222614686631ae6..a63f90ff40fa6ec217550fbb00135f810f646461 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2016  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 #
 # Author : Anthony Geay (EDF R&D)
 
-from paraview.simple import *
+# non regression test that emulates https://ageay@git.salome-platform.org/gitpub/samples/datafiles.git Med/ResOK_0000.med
+# This test point error during commit efd9331a9455785d0f04b75 in PARAVIS
 
 from MEDLoader import *
-
-""" This is a non regression EDF12599"""
 fname="testMEDReader20.med"
-imgName="testMEDReader20.png"
-fieldName="MyField"
-meshName="mesh"
-m=MEDFileUMesh()
-m0=MEDCouplingUMesh(meshName,1)
-m0.setCoords(DataArrayDouble([(0.,0.,0),(1.,0.,0.),(2.,0.,0.)]))
-m0.allocateCells()
-m0.insertNextCell(NORM_SEG2,[0,1])
-m0.insertNextCell(NORM_SEG2,[1,2])
-m[0]=m0
+png="testMEDReader20.png"
+nb=10
+arrX=DataArrayDouble(nb+1) ; arrX.iota()
+arrY=DataArrayDouble([0.,1.])
+m=MEDCouplingCMesh() ; m.setCoords(arrX,arrY) ; m=m.buildUnstructured(); m.setName("mesh") ; m.simplexize(0)
+mm=MEDFileUMesh() ; mm[0]=m
+m1=m.computeSkin() ; mm[-1]=m1
 #
-f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setName(fieldName)
-f.setMesh(m0) ; f.setArray(DataArrayDouble([1.,7.,3.,2.]))
-MEDLoader.WriteField(fname,f,True)
-########
-testTotomed = MEDReader(FileName=fname)
-testTotomed.AllArrays = ['TS0/%s/ComSup0/%s@@][@@GSSNE'%(meshName,fieldName)]
-testTotomed.AllTimeSteps = ['0000']
+f0=DataArrayInt(m1.getNumberOfCells()) ; f0.iota() ; mm.setFamilyFieldArr(-1,f0)
+f1=DataArrayInt(m1.getNumberOfNodes()) ; f1.iota() ; mm.setFamilyFieldArr(1,f1) # <- very important the bug can be shown here
+#
+nbCells=m1.getNumberOfCells() ; nbNodes=m.getNumberOfNodes()
+mm.write(fname,2)
+for i in range(5):
+    f=MEDCouplingFieldDouble(ON_CELLS) ; f.setMesh(m)
+    f.setName("Field")
+    arr=DataArrayInt(2*nb) ; arr.iota(i) ; arr%=nb ; arr=arr.convertToDblArr()
+    f.setArray(arr) ; f.setTime(float(i),i,0)
+    WriteFieldUsingAlreadyWrittenMesh(fname,f)
+    #
+    f=MEDCouplingFieldDouble(ON_CELLS) ; f.setMesh(m1)
+    f.setName("Field")
+    arr=DataArrayInt(nbCells) ; arr.iota(i) ; arr%=nbCells ; arr=arr.convertToDblArr()
+    f.setArray(arr) ; f.setTime(float(i),i,0)
+    WriteFieldUsingAlreadyWrittenMesh(fname,f)
+    #
+    f=MEDCouplingFieldDouble(ON_NODES) ; f.setMesh(m)
+    f.setName("FieldNode")
+    arr=DataArrayDouble(nbNodes) ; arr[:]=float(i)
+    f.setArray(arr) ; f.setTime(float(i),i,0)
+    WriteFieldUsingAlreadyWrittenMesh(fname,f)
+    pass
+#####################
+from paraview.simple import *
+#### disable automatic camera reset on 'Show'
+paraview.simple._DisableFirstRenderCameraReset()
+
+# create a new 'MED Reader'
+testMEDReader20med = MEDReader(FileName=fname)
+testMEDReader20med.AllArrays = ['TS0/mesh/ComSup0/Field@@][@@P0']
+testMEDReader20med.AllTimeSteps = ['0000', '0001', '0002', '0003', '0004']
+
+# get animation scene
+animationScene1 = GetAnimationScene()
+
+# update animation scene based on data timesteps
+animationScene1.UpdateAnimationUsingDataTimeSteps()
+
 # get active view
 renderView1 = GetActiveViewOrCreate('RenderView')
 # uncomment following to set a specific view size
-# renderView1.ViewSize = [739, 503]
+# renderView1.ViewSize = [610, 477]
 
 # show data in view
-testTotomedDisplay = Show(testTotomed, renderView1)
+testMEDReader20medDisplay = Show(testMEDReader20med, renderView1)
 # trace defaults for the display properties.
-testTotomedDisplay.ColorArrayName = [None, '']
-testTotomedDisplay.GlyphType = 'Arrow'
-testTotomedDisplay.ScalarOpacityUnitDistance = 1.5874010519681994
-testTotomedDisplay.SelectUncertaintyArray = [None, '']
-testTotomedDisplay.UncertaintyTransferFunction = 'PiecewiseFunction'
-testTotomedDisplay.OpacityArray = [None, '']
-testTotomedDisplay.RadiusArray = [None, '']
-testTotomedDisplay.RadiusRange = [0.0, 2.0]
-testTotomedDisplay.ConstantRadius = 2.0
-testTotomedDisplay.PointSpriteDefaultsInitialized = 1
-testTotomedDisplay.SelectInputVectors = [None, '']
-testTotomedDisplay.WriteLog = ''
+testMEDReader20medDisplay.ColorArrayName = [None, '']
+testMEDReader20medDisplay.GlyphType = 'Arrow'
+testMEDReader20medDisplay.ScalarOpacityUnitDistance = 4.664739046219201
+testMEDReader20medDisplay.SelectUncertaintyArray = [None, '']
+testMEDReader20medDisplay.UncertaintyTransferFunction = 'PiecewiseFunction'
+testMEDReader20medDisplay.OpacityArray = [None, '']
+testMEDReader20medDisplay.RadiusArray = [None, '']
+testMEDReader20medDisplay.RadiusRange = [0.0, 10.0]
+testMEDReader20medDisplay.ConstantRadius = 10.0
+testMEDReader20medDisplay.PointSpriteDefaultsInitialized = 1
+testMEDReader20medDisplay.SelectInputVectors = [None, '']
+testMEDReader20medDisplay.WriteLog = ''
 
 # reset view to fit data
 renderView1.ResetCamera()
 
 #changing interaction mode based on data extents
 renderView1.InteractionMode = '2D'
-renderView1.CameraPosition = [1.0, 10000.0, 10000.0]
-renderView1.CameraFocalPoint = [1.0, 0.0, 0.0]
-renderView1.CameraViewUp = [1.0, 1.0, 0.0]
+renderView1.CameraPosition = [5.0, 0.5, 10000.0]
+renderView1.CameraFocalPoint = [5.0, 0.5, 0.0]
 
 # set scalar coloring
-ColorBy(testTotomedDisplay, ('FIELD', 'vtkBlockColors'))
+ColorBy(testMEDReader20medDisplay, ('FIELD', 'vtkBlockColors'))
 
 # show color bar/color legend
-testTotomedDisplay.SetScalarBarVisibility(renderView1, True)
+testMEDReader20medDisplay.SetScalarBarVisibility(renderView1, True)
 
 # get color transfer function/color map for 'vtkBlockColors'
 vtkBlockColorsLUT = GetColorTransferFunction('vtkBlockColors')
@@ -85,96 +113,48 @@ vtkBlockColorsLUT = GetColorTransferFunction('vtkBlockColors')
 # get opacity transfer function/opacity map for 'vtkBlockColors'
 vtkBlockColorsPWF = GetOpacityTransferFunction('vtkBlockColors')
 
-# create a new 'ELNO Mesh'
-eLNOMesh1 = ELNOMesh(Input=testTotomed)
-
-# Properties modified on eLNOMesh1
-eLNOMesh1.ShrinkFactor = 0.5 # <- test is here !!!!!!!!
-
-# show data in view
-eLNOMesh1Display = Show(eLNOMesh1, renderView1)
-# trace defaults for the display properties.
-eLNOMesh1Display.ColorArrayName = [None, '']
-eLNOMesh1Display.GlyphType = 'Arrow'
-eLNOMesh1Display.ScalarOpacityUnitDistance = 1.1905507889761495
-eLNOMesh1Display.SelectUncertaintyArray = ['POINTS', 'MyField']
-eLNOMesh1Display.UncertaintyTransferFunction = 'PiecewiseFunction'
-eLNOMesh1Display.OpacityArray = [None, '']
-eLNOMesh1Display.RadiusArray = [None, '']
-eLNOMesh1Display.RadiusRange = [0.25, 1.75]
-eLNOMesh1Display.ConstantRadius = 1.75
-eLNOMesh1Display.PointSpriteDefaultsInitialized = 1
-eLNOMesh1Display.SelectInputVectors = [None, '']
-eLNOMesh1Display.WriteLog = ''
-
-# hide data in view
-Hide(testTotomed, renderView1)
-
 # set scalar coloring
-ColorBy(eLNOMesh1Display, ('FIELD', 'vtkBlockColors'))
-
-# show color bar/color legend
-eLNOMesh1Display.SetScalarBarVisibility(renderView1, False)
-
-# set scalar coloring
-ColorBy(eLNOMesh1Display, ('POINTS', 'MyField'))
+ColorBy(testMEDReader20medDisplay, ('CELLS', 'Field'))
 
 # rescale color and/or opacity maps used to include current data range
-eLNOMesh1Display.RescaleTransferFunctionToDataRange(True)
+testMEDReader20medDisplay.RescaleTransferFunctionToDataRange(True)
 
 # show color bar/color legend
-eLNOMesh1Display.SetScalarBarVisibility(renderView1, False)
+testMEDReader20medDisplay.SetScalarBarVisibility(renderView1, True)
 
-# get color transfer function/color map for 'MyField'
-myFieldLUT = GetColorTransferFunction('MyField')
+# get color transfer function/color map for 'Field'
+fieldLUT = GetColorTransferFunction('Field')
 
-# get opacity transfer function/opacity map for 'MyField'
-myFieldPWF = GetOpacityTransferFunction('MyField')
+# get opacity transfer function/opacity map for 'Field'
+fieldPWF = GetOpacityTransferFunction('Field')
 
-# hide color bar/color legend
-eLNOMesh1Display.SetScalarBarVisibility(renderView1, False)
+animationScene1.GoToNext() # <- very important to see the bug play with time steps...
+animationScene1.GoToNext()
+animationScene1.GoToNext()
+animationScene1.GoToNext()
+animationScene1.GoToPrevious()
+animationScene1.GoToPrevious()
 
-# create a new 'Glyph'
-glyph1 = Glyph(Input=eLNOMesh1,
-    GlyphType='Arrow')
-glyph1.Scalars = ['POINTS', 'MyField']
-glyph1.Vectors = ['POINTS', 'None']
-glyph1.ScaleFactor = 0.15000000000000002
-glyph1.GlyphTransform = 'Transform2'
-
-# Properties modified on glyph1
-glyph1.GlyphType = 'Sphere'
-glyph1.ScaleFactor = 0.15
+# current camera placement for renderView1
+renderView1.InteractionMode = '2D'
+renderView1.CameraPosition = [5.0, 0.5, 10000.0]
+renderView1.CameraFocalPoint = [5.0, 0.5, 0.0]
+renderView1.CameraParallelScale = 5.024937810560445
 
-# show data in view
-glyph1Display = Show(glyph1, renderView1)
-# trace defaults for the display properties.
-glyph1Display.ColorArrayName = ['POINTS', 'MyField']
-glyph1Display.LookupTable = myFieldLUT
-glyph1Display.GlyphType = 'Arrow'
-glyph1Display.SelectUncertaintyArray = ['POINTS', 'MyField']
-glyph1Display.UncertaintyTransferFunction = 'PiecewiseFunction'
-glyph1Display.OpacityArray = [None, '']
-glyph1Display.RadiusArray = [None, '']
-glyph1Display.RadiusRange = [0.17688040435314178, 1.8231196403503418]
-glyph1Display.ConstantRadius = 1.8231196403503418
-glyph1Display.PointSpriteDefaultsInitialized = 1
-glyph1Display.SelectInputVectors = ['POINTS', 'Normals']
-glyph1Display.WriteLog = ''
+#
 
-# show color bar/color legend
-glyph1Display.SetScalarBarVisibility(renderView1, True)
+renderView1.ViewSize =[300,300]
+Render()
+#WriteImage(png)
 
 #### saving camera placements for all active views
 
 # current camera placement for renderView1
 renderView1.InteractionMode = '2D'
-renderView1.CameraPosition = [0.9999999999999908, 9999.999999999995, 9999.999999999993]
-renderView1.CameraFocalPoint = [1.0, 0.0, 0.0]
-renderView1.CameraViewUp = [0.6331899945158901, 0.547298104713038, -0.5472981047130381]
-renderView1.CameraParallelScale = 0.6930835077290218
-renderView1.ViewSize = [739,503]
-
+renderView1.CameraPosition = [5.0, 0.5, 10000.0]
+renderView1.CameraFocalPoint = [5.0, 0.5, 0.0]
+renderView1.CameraParallelScale = 5.024937810560445
+# compare with baseline image
 import os
 import sys
 try:
@@ -183,9 +163,8 @@ try:
 except:
   print "Could not get baseline directory. Test failed."
   exit(1)
-baseline_file = os.path.join(baselinePath, imgName)
+baseline_file = os.path.join(baselinePath,png)
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=25)
 vtk.test.Testing.interact()
-
diff --git a/src/Plugins/MEDReader/Test/testMEDReader21.py b/src/Plugins/MEDReader/Test/testMEDReader21.py
new file mode 100644 (file)
index 0000000..1159dd5
--- /dev/null
@@ -0,0 +1,191 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay (EDF R&D)
+
+from paraview.simple import *
+
+from MEDLoader import *
+
+""" This is a non regression EDF12599"""
+fname="testMEDReader21.med"
+imgName="testMEDReader21.png"
+fieldName="MyField"
+meshName="mesh"
+m=MEDFileUMesh()
+m0=MEDCouplingUMesh(meshName,1)
+m0.setCoords(DataArrayDouble([(0.,0.,0),(1.,0.,0.),(2.,0.,0.)]))
+m0.allocateCells()
+m0.insertNextCell(NORM_SEG2,[0,1])
+m0.insertNextCell(NORM_SEG2,[1,2])
+m[0]=m0
+#
+f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setName(fieldName)
+f.setMesh(m0) ; f.setArray(DataArrayDouble([1.,7.,3.,2.]))
+WriteField(fname,f,True)
+########
+testTotomed = MEDReader(FileName=fname)
+testTotomed.AllArrays = ['TS0/%s/ComSup0/%s@@][@@GSSNE'%(meshName,fieldName)]
+testTotomed.AllTimeSteps = ['0000']
+# get active view
+renderView1 = GetActiveViewOrCreate('RenderView')
+# uncomment following to set a specific view size
+# renderView1.ViewSize = [739, 503]
+
+# show data in view
+testTotomedDisplay = Show(testTotomed, renderView1)
+# trace defaults for the display properties.
+testTotomedDisplay.ColorArrayName = [None, '']
+testTotomedDisplay.GlyphType = 'Arrow'
+testTotomedDisplay.ScalarOpacityUnitDistance = 1.5874010519681994
+testTotomedDisplay.SelectUncertaintyArray = [None, '']
+testTotomedDisplay.UncertaintyTransferFunction = 'PiecewiseFunction'
+testTotomedDisplay.OpacityArray = [None, '']
+testTotomedDisplay.RadiusArray = [None, '']
+testTotomedDisplay.RadiusRange = [0.0, 2.0]
+testTotomedDisplay.ConstantRadius = 2.0
+testTotomedDisplay.PointSpriteDefaultsInitialized = 1
+testTotomedDisplay.SelectInputVectors = [None, '']
+testTotomedDisplay.WriteLog = ''
+
+# reset view to fit data
+renderView1.ResetCamera()
+
+#changing interaction mode based on data extents
+renderView1.InteractionMode = '2D'
+renderView1.CameraPosition = [1.0, 10000.0, 10000.0]
+renderView1.CameraFocalPoint = [1.0, 0.0, 0.0]
+renderView1.CameraViewUp = [1.0, 1.0, 0.0]
+
+# set scalar coloring
+ColorBy(testTotomedDisplay, ('FIELD', 'vtkBlockColors'))
+
+# show color bar/color legend
+testTotomedDisplay.SetScalarBarVisibility(renderView1, True)
+
+# get color transfer function/color map for 'vtkBlockColors'
+vtkBlockColorsLUT = GetColorTransferFunction('vtkBlockColors')
+
+# get opacity transfer function/opacity map for 'vtkBlockColors'
+vtkBlockColorsPWF = GetOpacityTransferFunction('vtkBlockColors')
+
+# create a new 'ELNO Mesh'
+eLNOMesh1 = ELNOMesh(Input=testTotomed)
+
+# Properties modified on eLNOMesh1
+eLNOMesh1.ShrinkFactor = 0.5 # <- test is here !!!!!!!!
+
+# show data in view
+eLNOMesh1Display = Show(eLNOMesh1, renderView1)
+# trace defaults for the display properties.
+eLNOMesh1Display.ColorArrayName = [None, '']
+eLNOMesh1Display.GlyphType = 'Arrow'
+eLNOMesh1Display.ScalarOpacityUnitDistance = 1.1905507889761495
+eLNOMesh1Display.SelectUncertaintyArray = ['POINTS', 'MyField']
+eLNOMesh1Display.UncertaintyTransferFunction = 'PiecewiseFunction'
+eLNOMesh1Display.OpacityArray = [None, '']
+eLNOMesh1Display.RadiusArray = [None, '']
+eLNOMesh1Display.RadiusRange = [0.25, 1.75]
+eLNOMesh1Display.ConstantRadius = 1.75
+eLNOMesh1Display.PointSpriteDefaultsInitialized = 1
+eLNOMesh1Display.SelectInputVectors = [None, '']
+eLNOMesh1Display.WriteLog = ''
+
+# hide data in view
+Hide(testTotomed, renderView1)
+
+# set scalar coloring
+ColorBy(eLNOMesh1Display, ('FIELD', 'vtkBlockColors'))
+
+# show color bar/color legend
+eLNOMesh1Display.SetScalarBarVisibility(renderView1, False)
+
+# set scalar coloring
+ColorBy(eLNOMesh1Display, ('POINTS', 'MyField'))
+
+# rescale color and/or opacity maps used to include current data range
+eLNOMesh1Display.RescaleTransferFunctionToDataRange(True)
+
+# show color bar/color legend
+eLNOMesh1Display.SetScalarBarVisibility(renderView1, False)
+
+# get color transfer function/color map for 'MyField'
+myFieldLUT = GetColorTransferFunction('MyField')
+
+# get opacity transfer function/opacity map for 'MyField'
+myFieldPWF = GetOpacityTransferFunction('MyField')
+
+# hide color bar/color legend
+eLNOMesh1Display.SetScalarBarVisibility(renderView1, False)
+
+# create a new 'Glyph'
+glyph1 = Glyph(Input=eLNOMesh1,
+    GlyphType='Arrow')
+glyph1.Scalars = ['POINTS', 'MyField']
+glyph1.Vectors = ['POINTS', 'None']
+glyph1.ScaleFactor = 0.15000000000000002
+glyph1.GlyphTransform = 'Transform2'
+
+# Properties modified on glyph1
+glyph1.GlyphType = 'Sphere'
+glyph1.ScaleFactor = 0.15
+
+# show data in view
+glyph1Display = Show(glyph1, renderView1)
+# trace defaults for the display properties.
+glyph1Display.ColorArrayName = ['POINTS', 'MyField']
+glyph1Display.LookupTable = myFieldLUT
+glyph1Display.GlyphType = 'Arrow'
+glyph1Display.SelectUncertaintyArray = ['POINTS', 'MyField']
+glyph1Display.UncertaintyTransferFunction = 'PiecewiseFunction'
+glyph1Display.OpacityArray = [None, '']
+glyph1Display.RadiusArray = [None, '']
+glyph1Display.RadiusRange = [0.17688040435314178, 1.8231196403503418]
+glyph1Display.ConstantRadius = 1.8231196403503418
+glyph1Display.PointSpriteDefaultsInitialized = 1
+glyph1Display.SelectInputVectors = ['POINTS', 'Normals']
+glyph1Display.WriteLog = ''
+
+# show color bar/color legend
+glyph1Display.SetScalarBarVisibility(renderView1, True)
+
+#### saving camera placements for all active views
+
+# current camera placement for renderView1
+renderView1.InteractionMode = '2D'
+renderView1.CameraPosition = [0.9999999999999908, 9999.999999999995, 9999.999999999993]
+renderView1.CameraFocalPoint = [1.0, 0.0, 0.0]
+renderView1.CameraViewUp = [0.6331899945158901, 0.547298104713038, -0.5472981047130381]
+renderView1.CameraParallelScale = 0.6930835077290218
+renderView1.ViewSize = [739,503]
+
+import os
+import sys
+try:
+  baselineIndex = sys.argv.index('-B')+1
+  baselinePath = sys.argv[baselineIndex]
+except:
+  print "Could not get baseline directory. Test failed."
+  exit(1)
+baseline_file = os.path.join(baselinePath, imgName)
+import vtk.test.Testing
+vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
+vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=25)
+vtk.test.Testing.interact()
+
index e745408c81167ee9de82e0054900044b16ac5950..a6cef30f391d7a520e5d6592734acd8d8062aa70 100644 (file)
@@ -42,7 +42,7 @@ f1ts1=MEDFileField1TS()
 f0=MEDCouplingFieldDouble(ON_NODES) ; f0.setMesh(m0) ; f0.setName("f0NoPfl")
 arr0=DataArrayDouble([0.,1.,2.,3.,1.,1.5,2.2,3.1,2.,2.2,3.,3.1,3.,3.1,3.5,4.])
 f0.setArray(arr0)
-f0.checkCoherency()
+f0.checkConsistencyLight()
 f1ts0.setFieldNoProfileSBT(f0)
 #
 pfl1=DataArrayInt([0,1,2,3,4,5,6,8,9,12]) ; pfl1.setName("pfl1")
index 09a8286bb4df1e516fb28481377bbd76b1a03f8a..0248a1c710f10b2b696bde096811f00d68ba9df0 100644 (file)
@@ -32,7 +32,7 @@ arr=DataArrayDouble(5) ; arr.iota()
 c=MEDCouplingCMesh("mesh")
 c.setCoords(arr,arr,arr)
 m=c.buildUnstructured()
-mbis=m.deepCpy() ; mbis.translate([5,0,0]) ; mbis.tetrahedrize(PLANAR_FACE_5)
+mbis=m.deepCopy() ; mbis.translate([5,0,0]) ; mbis.tetrahedrize(PLANAR_FACE_5)
 m=MEDCouplingUMesh.MergeUMeshes([mbis,m]) ; m.setName(c.getName())
 mm=MEDFileUMesh()
 mm.setMeshAtLevel(0,m)
index dc586f3b95895d520d6a9a1048b9d1b03e87ee0e..9b73ce292546594a96e2b3f42f7babc1a45fc6c9 100644 (file)
@@ -47,7 +47,7 @@ fGauss.setGaussLocalizationOnType(NORM_TRI3,[0.,0.,1.,0.,0.,1.],[0.1,0.1,0.05,0.
 fGauss.setGaussLocalizationOnType(NORM_QUAD4,[-1.,-1.,1.,-1.,1.,1.,-1.,1.],[-0.9,-0.9,0.,0.,0.9,0.9],[0.2,0.3,0.5])
 fGauss.setArray(DataArrayDouble([0.9,1.3,0.22,1.3,1.62,2.21,1.62,2.72,2.95,2.54,2.25,2.16,1.58,1.05,3.13,2.91,2.82,1.41,1.58,1.95,3.59,3.53,3.59,2.82,2.91,3.13,2.25,2.54,2.95]))
 fGauss.getArray().setInfoOnComponent(0,"C0")
-fGauss.checkCoherency()
+fGauss.checkConsistencyLight()
 #
 f1ts=MEDFileField1TS()
 f1ts.setFieldNoProfileSBT(fGauss)
index d2a2bf45c2d09b0dca9efe941ff51a61b0b02afc..8fd42052078a0b53cac292ba4135329cc7a2e6d8 100644 (file)
 #include "MEDFileData.hxx"
 #include "MEDCouplingMemArray.hxx"
 #include "MEDCouplingFieldDouble.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MEDCouplingRefCountObject.hxx"
 
 #include <map>
 #include <deque>
 #include <sstream>
 
-using ParaMEDMEM::MEDFileData;
-using ParaMEDMEM::MEDFileMesh;
-using ParaMEDMEM::MEDFileCMesh;
-using ParaMEDMEM::MEDFileUMesh;
-using ParaMEDMEM::MEDFileFields;
-using ParaMEDMEM::MEDFileMeshes;
+using MEDCoupling::MEDFileData;
+using MEDCoupling::MEDFileMesh;
+using MEDCoupling::MEDFileCMesh;
+using MEDCoupling::MEDFileUMesh;
+using MEDCoupling::MEDFileFields;
+using MEDCoupling::MEDFileMeshes;
 
-using ParaMEDMEM::MEDFileIntField1TS;
-using ParaMEDMEM::MEDFileField1TS;
-using ParaMEDMEM::MEDFileIntFieldMultiTS;
-using ParaMEDMEM::MEDFileFieldMultiTS;
-using ParaMEDMEM::MEDFileAnyTypeFieldMultiTS;
-using ParaMEDMEM::DataArray;
-using ParaMEDMEM::DataArrayInt;
-using ParaMEDMEM::DataArrayDouble;
-using ParaMEDMEM::MEDCouplingMesh;
-using ParaMEDMEM::MEDCouplingUMesh;
-using ParaMEDMEM::MEDCouplingCMesh;
-using ParaMEDMEM::MEDCouplingFieldDouble;
-using ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr;
+using MEDCoupling::MEDFileIntField1TS;
+using MEDCoupling::MEDFileField1TS;
+using MEDCoupling::MEDFileIntFieldMultiTS;
+using MEDCoupling::MEDFileFieldMultiTS;
+using MEDCoupling::MEDFileAnyTypeFieldMultiTS;
+using MEDCoupling::DataArray;
+using MEDCoupling::DataArrayInt;
+using MEDCoupling::DataArrayDouble;
+using MEDCoupling::MEDCouplingMesh;
+using MEDCoupling::MEDCouplingUMesh;
+using MEDCoupling::MEDCouplingCMesh;
+using MEDCoupling::MEDCouplingFieldDouble;
+using MEDCoupling::MCAuto;
 
 vtkStandardNewMacro(vtkMEDWriter);
 
@@ -107,10 +107,10 @@ private:
 std::map<int,int> ComputeMapOfType()
 {
   std::map<int,int> ret;
-  int nbOfTypesInMC(sizeof(MEDCouplingUMesh::PARAMEDMEM2VTKTYPETRADUCER)/sizeof(int));
+  int nbOfTypesInMC(sizeof(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER)/sizeof(int));
   for(int i=0;i<nbOfTypesInMC;i++)
     {
-      int vtkId(MEDCouplingUMesh::PARAMEDMEM2VTKTYPETRADUCER[i]);
+      int vtkId(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[i]);
       if(vtkId!=-1)
         ret[vtkId]=i;
     }
@@ -134,7 +134,7 @@ DataArrayInt *ConvertVTKArrayToMCArrayInt(vtkDataArray *data)
     throw MZCException("ConvertVTKArrayToMCArrayInt : internal error !");
   int nbTuples(data->GetNumberOfTuples()),nbComp(data->GetNumberOfComponents());
   std::size_t nbElts(nbTuples*nbComp);
-  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret(DataArrayInt::New());
+  MCAuto<DataArrayInt> ret(DataArrayInt::New());
   ret->alloc(nbTuples,nbComp);
   for(int i=0;i<nbComp;i++)
     {
@@ -161,7 +161,7 @@ DataArrayDouble *ConvertVTKArrayToMCArrayDouble(vtkDataArray *data)
     throw MZCException("ConvertVTKArrayToMCArrayDouble : internal error !");
   int nbTuples(data->GetNumberOfTuples()),nbComp(data->GetNumberOfComponents());
   std::size_t nbElts(nbTuples*nbComp);
-  MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret(DataArrayDouble::New());
+  MCAuto<DataArrayDouble> ret(DataArrayDouble::New());
   ret->alloc(nbTuples,nbComp);
   for(int i=0;i<nbComp;i++)
     {
@@ -208,7 +208,7 @@ DataArray *ConvertVTKArrayToMCArray(vtkDataArray *data)
 
 MEDCouplingUMesh *BuildMeshFromCellArray(vtkCellArray *ca, DataArrayDouble *coords, int meshDim, INTERP_KERNEL::NormalizedCellType type)
 {
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> subMesh(MEDCouplingUMesh::New("",meshDim));
+  MCAuto<MEDCouplingUMesh> subMesh(MEDCouplingUMesh::New("",meshDim));
   subMesh->setCoords(coords); subMesh->allocateCells();
   int nbCells(ca->GetNumberOfCells());
   if(nbCells==0)
@@ -227,9 +227,9 @@ MEDCouplingUMesh *BuildMeshFromCellArray(vtkCellArray *ca, DataArrayDouble *coor
   return subMesh.retn();
 }
 
-MEDCouplingUMesh *BuildMeshFromCellArrayTriangleStrip(vtkCellArray *ca, DataArrayDouble *coords, MEDCouplingAutoRefCountObjectPtr<DataArrayInt>& ids)
+MEDCouplingUMesh *BuildMeshFromCellArrayTriangleStrip(vtkCellArray *ca, DataArrayDouble *coords, MCAuto<DataArrayInt>& ids)
 {
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> subMesh(MEDCouplingUMesh::New("",2));
+  MCAuto<MEDCouplingUMesh> subMesh(MEDCouplingUMesh::New("",2));
   subMesh->setCoords(coords); subMesh->allocateCells();
   int nbCells(ca->GetNumberOfCells());
   if(nbCells==0)
@@ -263,22 +263,22 @@ MEDCouplingUMesh *BuildMeshFromCellArrayTriangleStrip(vtkCellArray *ca, DataArra
 class MicroField
 {
 public:
-  MicroField(const MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh>& m, const std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> >& cellFs):_m(m),_cellFs(cellFs) { }
+  MicroField(const MCAuto<MEDCouplingUMesh>& m, const std::vector<MCAuto<DataArray> >& cellFs):_m(m),_cellFs(cellFs) { }
   MicroField(const std::vector< MicroField >& vs);
-  void setNodeFields(const std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> >& nf) { _nodeFs=nf; }
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> getMesh() const { return _m; }
-  std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > getCellFields() const { return _cellFs; }
+  void setNodeFields(const std::vector<MCAuto<DataArray> >& nf) { _nodeFs=nf; }
+  MCAuto<MEDCouplingUMesh> getMesh() const { return _m; }
+  std::vector<MCAuto<DataArray> > getCellFields() const { return _cellFs; }
 private:
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> _m;
-  std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > _cellFs;
-  std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > _nodeFs;
+  MCAuto<MEDCouplingUMesh> _m;
+  std::vector<MCAuto<DataArray> > _cellFs;
+  std::vector<MCAuto<DataArray> > _nodeFs;
 };
 
 MicroField::MicroField(const std::vector< MicroField >& vs)
 {
   std::size_t sz(vs.size());
   std::vector<const MEDCouplingUMesh *> vs2(sz);
-  std::vector< std::vector< MEDCouplingAutoRefCountObjectPtr<DataArray> > > arrs2(sz);
+  std::vector< std::vector< MCAuto<DataArray> > > arrs2(sz);
   int nbElts(-1);
   for(std::size_t ii=0;ii<sz;ii++)
     {
@@ -303,7 +303,7 @@ MicroField::MicroField(const std::vector< MicroField >& vs)
   _m=MEDCouplingUMesh::MergeUMeshesOnSameCoords(vs2);
 }
 
-void AppendMCFieldFrom(ParaMEDMEM::TypeOfField tf, MEDCouplingMesh *mesh, MEDFileData *mfd, MEDCouplingAutoRefCountObjectPtr<DataArray> da, const DataArrayInt *n2oPtr)
+void AppendMCFieldFrom(MEDCoupling::TypeOfField tf, MEDCouplingMesh *mesh, MEDFileData *mfd, MCAuto<DataArray> da, const DataArrayInt *n2oPtr)
 {
   static const char FAMFIELD_FOR_CELLS[]="FamilyIdCell";
   static const char FAMFIELD_FOR_NODES[]="FamilyIdNode";
@@ -313,53 +313,53 @@ void AppendMCFieldFrom(ParaMEDMEM::TypeOfField tf, MEDCouplingMesh *mesh, MEDFil
   MEDFileMeshes *ms(mfd->getMeshes());
   if(!fs || !ms)
     throw MZCException("AppendMCFieldFrom : internal error 2 !");
-  MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> dad(ParaMEDMEM::DynamicCast<DataArray,DataArrayDouble>(da));
+  MCAuto<DataArrayDouble> dad(MEDCoupling::DynamicCast<DataArray,DataArrayDouble>(da));
   DataArrayDouble *dadPtr(dad);
   std::string fieldName;
   if(dadPtr)
     {
       fieldName=dadPtr->getName();
-      MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f(MEDCouplingFieldDouble::New(tf));
+      MCAuto<MEDCouplingFieldDouble> f(MEDCouplingFieldDouble::New(tf));
       f->setName(fieldName);
       if(!n2oPtr)
         f->setArray(dadPtr);
       else
         {
-          MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> dad2(dadPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end()));
+          MCAuto<DataArrayDouble> dad2(dadPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end()));
           f->setArray(dad2);
         }
       f->setMesh(mesh);
-      MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> fmts(MEDFileFieldMultiTS::New());
-      MEDCouplingAutoRefCountObjectPtr<MEDFileField1TS> f1ts(MEDFileField1TS::New());
+      MCAuto<MEDFileFieldMultiTS> fmts(MEDFileFieldMultiTS::New());
+      MCAuto<MEDFileField1TS> f1ts(MEDFileField1TS::New());
       f1ts->setFieldNoProfileSBT(f);
       fmts->pushBackTimeStep(f1ts);
       fs->pushField(fmts);
       return ;
     }
-  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> dai(ParaMEDMEM::DynamicCast<DataArray,DataArrayInt>(da));
+  MCAuto<DataArrayInt> dai(MEDCoupling::DynamicCast<DataArray,DataArrayInt>(da));
   DataArrayInt *daiPtr(dai);
   if(daiPtr)
     {
       fieldName=daiPtr->getName();
-      if((fieldName!=FAMFIELD_FOR_CELLS || tf!=ParaMEDMEM::ON_CELLS) && (fieldName!=FAMFIELD_FOR_NODES || tf!=ParaMEDMEM::ON_NODES))
+      if((fieldName!=FAMFIELD_FOR_CELLS || tf!=MEDCoupling::ON_CELLS) && (fieldName!=FAMFIELD_FOR_NODES || tf!=MEDCoupling::ON_NODES))
         {
-          MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f(MEDCouplingFieldDouble::New(tf));
+          MCAuto<MEDCouplingFieldDouble> f(MEDCouplingFieldDouble::New(tf));
           f->setName(fieldName);
           f->setMesh(mesh);
-          MEDCouplingAutoRefCountObjectPtr<MEDFileIntFieldMultiTS> fmts(MEDFileIntFieldMultiTS::New());
-          MEDCouplingAutoRefCountObjectPtr<MEDFileIntField1TS> f1ts(MEDFileIntField1TS::New());
+          MCAuto<MEDFileIntFieldMultiTS> fmts(MEDFileIntFieldMultiTS::New());
+          MCAuto<MEDFileIntField1TS> f1ts(MEDFileIntField1TS::New());
           if(!n2oPtr)
             f1ts->setFieldNoProfileSBT(f,daiPtr);
           else
             {
-              MEDCouplingAutoRefCountObjectPtr<DataArrayInt> dai2(daiPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end()));
+              MCAuto<DataArrayInt> dai2(daiPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end()));
               f1ts->setFieldNoProfileSBT(f,dai2);
             }
           fmts->pushBackTimeStep(f1ts);
           fs->pushField(fmts);
           return ;
         }
-      else if(fieldName==FAMFIELD_FOR_CELLS && tf==ParaMEDMEM::ON_CELLS)
+      else if(fieldName==FAMFIELD_FOR_CELLS && tf==MEDCoupling::ON_CELLS)
         {
           MEDFileMesh *mm(ms->getMeshWithName(mesh->getName()));
           if(!mm)
@@ -368,11 +368,11 @@ void AppendMCFieldFrom(ParaMEDMEM::TypeOfField tf, MEDCouplingMesh *mesh, MEDFil
             mm->setFamilyFieldArr(mesh->getMeshDimension()-mm->getMeshDimension(),daiPtr);
           else
             {
-              MEDCouplingAutoRefCountObjectPtr<DataArrayInt> dai2(daiPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end()));
+              MCAuto<DataArrayInt> dai2(daiPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end()));
               mm->setFamilyFieldArr(mesh->getMeshDimension()-mm->getMeshDimension(),dai2);
             }
         }
-      else if(fieldName==FAMFIELD_FOR_NODES || tf==ParaMEDMEM::ON_NODES)
+      else if(fieldName==FAMFIELD_FOR_NODES || tf==MEDCoupling::ON_NODES)
         {
           MEDFileMesh *mm(ms->getMeshWithName(mesh->getName()));
           if(!mm)
@@ -381,7 +381,7 @@ void AppendMCFieldFrom(ParaMEDMEM::TypeOfField tf, MEDCouplingMesh *mesh, MEDFil
             mm->setFamilyFieldArr(1,daiPtr);
           else
             {
-              MEDCouplingAutoRefCountObjectPtr<DataArrayInt> dai2(daiPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end()));
+              MCAuto<DataArrayInt> dai2(daiPtr->selectByTupleId(n2oPtr->begin(),n2oPtr->end()));
               mm->setFamilyFieldArr(1,dai2);
             }
         }
@@ -396,28 +396,28 @@ void PutAtLevelDealOrder(MEDFileData *mfd, int meshDimRel, const MicroField& mf)
   MEDFileUMesh *mmu(dynamic_cast<MEDFileUMesh *>(mm));
   if(!mmu)
     throw MZCException("PutAtLevelDealOrder : internal error 2 !");
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mesh(mf.getMesh());
+  MCAuto<MEDCouplingUMesh> mesh(mf.getMesh());
   mesh->setName(mfd->getMeshes()->getMeshAtPos(0)->getName());
-  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> o2n(mesh->sortCellsInMEDFileFrmt());
+  MCAuto<DataArrayInt> o2n(mesh->sortCellsInMEDFileFrmt());
   const DataArrayInt *o2nPtr(o2n);
-  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> n2o;
+  MCAuto<DataArrayInt> n2o;
   mmu->setMeshAtLevel(meshDimRel,mesh);
   const DataArrayInt *n2oPtr(0);
   if(o2n)
     {
       n2o=o2n->invertArrayO2N2N2O(mesh->getNumberOfCells());
       n2oPtr=n2o;
-      if(n2oPtr && n2oPtr->isIdentity2(mesh->getNumberOfCells()))
+      if(n2oPtr && n2oPtr->isIota(mesh->getNumberOfCells()))
         n2oPtr=0;
       if(n2oPtr)
         mm->setRenumFieldArr(meshDimRel,n2o);
     }
   //
-  std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > cells(mf.getCellFields());
-  for(std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> >::const_iterator it=cells.begin();it!=cells.end();it++)
+  std::vector<MCAuto<DataArray> > cells(mf.getCellFields());
+  for(std::vector<MCAuto<DataArray> >::const_iterator it=cells.begin();it!=cells.end();it++)
     {
-      MEDCouplingAutoRefCountObjectPtr<DataArray> da(*it);
-      AppendMCFieldFrom(ParaMEDMEM::ON_CELLS,mesh,mfd,da,n2oPtr);
+      MCAuto<DataArray> da(*it);
+      AppendMCFieldFrom(MEDCoupling::ON_CELLS,mesh,mfd,da,n2oPtr);
     }
 }
 
@@ -468,7 +468,7 @@ DataArrayDouble *BuildCoordsFrom(vtkPointSet *ds)
   vtkDataArray *data(pts->GetData());
   if(!data)
     throw MZCException("BuildCoordsFrom : internal error 3 !");
-  MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coords(ConvertVTKArrayToMCArrayDouble(data));
+  MCAuto<DataArrayDouble> coords(ConvertVTKArrayToMCArrayDouble(data));
   return coords.retn();
 }
 
@@ -480,7 +480,7 @@ void AddNodeFields(MEDFileData *mfd, vtkDataSetAttributes *dsa)
   MEDFileUMesh *mmu(dynamic_cast<MEDFileUMesh *>(mm));
   if(!mmu)
     throw MZCException("AddNodeFields : internal error 2 !");
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mesh(mmu->getMeshAtLevel(0));
+  MCAuto<MEDCouplingUMesh> mesh(mmu->getMeshAtLevel(0));
   int nba(dsa->GetNumberOfArrays());
   for(int i=0;i<nba;i++)
     {
@@ -488,15 +488,15 @@ void AddNodeFields(MEDFileData *mfd, vtkDataSetAttributes *dsa)
       const char *name(arr->GetName());
       if(!arr)
         continue;
-      MEDCouplingAutoRefCountObjectPtr<DataArray> da(ConvertVTKArrayToMCArray(arr));
+      MCAuto<DataArray> da(ConvertVTKArrayToMCArray(arr));
       da->setName(name);
-      AppendMCFieldFrom(ParaMEDMEM::ON_NODES,mesh,mfd,da,0);
+      AppendMCFieldFrom(MEDCoupling::ON_NODES,mesh,mfd,da,0);
     }
 }
 
-std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > AddPartFields(const DataArrayInt *part, vtkDataSetAttributes *dsa)
+std::vector<MCAuto<DataArray> > AddPartFields(const DataArrayInt *part, vtkDataSetAttributes *dsa)
 {
-  std::vector< MEDCouplingAutoRefCountObjectPtr<DataArray> > ret;
+  std::vector< MCAuto<DataArray> > ret;
   if(!dsa)
     return ret;
   int nba(dsa->GetNumberOfArrays());
@@ -508,7 +508,7 @@ std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > AddPartFields(const Da
       const char *name(arr->GetName());
       int nbCompo(arr->GetNumberOfComponents());
       vtkIdType nbTuples(arr->GetNumberOfTuples());
-      MEDCouplingAutoRefCountObjectPtr<DataArray> mcarr(ConvertVTKArrayToMCArray(arr));
+      MCAuto<DataArray> mcarr(ConvertVTKArrayToMCArray(arr));
       if(part)
         mcarr=mcarr->selectByTupleId(part->begin(),part->end());
       mcarr->setName(name);
@@ -517,9 +517,9 @@ std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > AddPartFields(const Da
   return ret;
 }
 
-std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > AddPartFields2(int bg, int end, vtkDataSetAttributes *dsa)
+std::vector<MCAuto<DataArray> > AddPartFields2(int bg, int end, vtkDataSetAttributes *dsa)
 {
-  std::vector< MEDCouplingAutoRefCountObjectPtr<DataArray> > ret;
+  std::vector< MCAuto<DataArray> > ret;
   if(!dsa)
     return ret;
   int nba(dsa->GetNumberOfArrays());
@@ -531,8 +531,8 @@ std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > AddPartFields2(int bg,
       const char *name(arr->GetName());
       int nbCompo(arr->GetNumberOfComponents());
       vtkIdType nbTuples(arr->GetNumberOfTuples());
-      MEDCouplingAutoRefCountObjectPtr<DataArray> mcarr(ConvertVTKArrayToMCArray(arr));
-      mcarr=mcarr->selectByTupleId2(bg,end,1);
+      MCAuto<DataArray> mcarr(ConvertVTKArrayToMCArray(arr));
+      mcarr=mcarr->selectByTupleIdSafeSlice(bg,end,1);
       mcarr->setName(name);
       ret.push_back(mcarr);
     }
@@ -544,44 +544,44 @@ void ConvertFromRectilinearGrid(MEDFileData *ret, vtkRectilinearGrid *ds, const
   if(!ds || !ret)
     throw MZCException("ConvertFromRectilinearGrid : internal error !");
   //
-  MEDCouplingAutoRefCountObjectPtr<MEDFileMeshes> meshes(MEDFileMeshes::New());
+  MCAuto<MEDFileMeshes> meshes(MEDFileMeshes::New());
   ret->setMeshes(meshes);
-  MEDCouplingAutoRefCountObjectPtr<MEDFileFields> fields(MEDFileFields::New());
+  MCAuto<MEDFileFields> fields(MEDFileFields::New());
   ret->setFields(fields);
   //
-  MEDCouplingAutoRefCountObjectPtr<MEDFileCMesh> cmesh(MEDFileCMesh::New());
+  MCAuto<MEDFileCMesh> cmesh(MEDFileCMesh::New());
   meshes->pushMesh(cmesh);
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingCMesh> cmeshmc(MEDCouplingCMesh::New());
+  MCAuto<MEDCouplingCMesh> cmeshmc(MEDCouplingCMesh::New());
   vtkDataArray *cx(ds->GetXCoordinates()),*cy(ds->GetYCoordinates()),*cz(ds->GetZCoordinates());
   if(cx)
     {
-      MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr(ConvertVTKArrayToMCArrayDouble(cx));
+      MCAuto<DataArrayDouble> arr(ConvertVTKArrayToMCArrayDouble(cx));
       cmeshmc->setCoordsAt(0,arr);
     }
   if(cy)
     {
-      MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr(ConvertVTKArrayToMCArrayDouble(cy));
+      MCAuto<DataArrayDouble> arr(ConvertVTKArrayToMCArrayDouble(cy));
       cmeshmc->setCoordsAt(1,arr);
     }
   if(cz)
     {
-      MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr(ConvertVTKArrayToMCArrayDouble(cz));
+      MCAuto<DataArrayDouble> arr(ConvertVTKArrayToMCArrayDouble(cz));
       cmeshmc->setCoordsAt(2,arr);
     }
   std::string meshName(GetMeshNameWithContext(context));
   cmeshmc->setName(meshName);
   cmesh->setMesh(cmeshmc);
-  std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > cellFs(AddPartFields(0,ds->GetCellData()));
-  for(std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> >::const_iterator it=cellFs.begin();it!=cellFs.end();it++)
+  std::vector<MCAuto<DataArray> > cellFs(AddPartFields(0,ds->GetCellData()));
+  for(std::vector<MCAuto<DataArray> >::const_iterator it=cellFs.begin();it!=cellFs.end();it++)
     {
-      MEDCouplingAutoRefCountObjectPtr<DataArray> da(*it);
-      AppendMCFieldFrom(ParaMEDMEM::ON_CELLS,cmeshmc,ret,da,0);
+      MCAuto<DataArray> da(*it);
+      AppendMCFieldFrom(MEDCoupling::ON_CELLS,cmeshmc,ret,da,0);
     }
-  std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > nodeFs(AddPartFields(0,ds->GetPointData()));
-  for(std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> >::const_iterator it=nodeFs.begin();it!=nodeFs.end();it++)
+  std::vector<MCAuto<DataArray> > nodeFs(AddPartFields(0,ds->GetPointData()));
+  for(std::vector<MCAuto<DataArray> >::const_iterator it=nodeFs.begin();it!=nodeFs.end();it++)
     {
-      MEDCouplingAutoRefCountObjectPtr<DataArray> da(*it);
-      AppendMCFieldFrom(ParaMEDMEM::ON_NODES,cmeshmc,ret,da,0);
+      MCAuto<DataArray> da(*it);
+      AppendMCFieldFrom(MEDCoupling::ON_NODES,cmeshmc,ret,da,0);
     }
 }
 
@@ -590,14 +590,14 @@ void ConvertFromPolyData(MEDFileData *ret, vtkPolyData *ds, const std::vector<in
   if(!ds || !ret)
     throw MZCException("ConvertFromPolyData : internal error !");
   //
-  MEDCouplingAutoRefCountObjectPtr<MEDFileMeshes> meshes(MEDFileMeshes::New());
+  MCAuto<MEDFileMeshes> meshes(MEDFileMeshes::New());
   ret->setMeshes(meshes);
-  MEDCouplingAutoRefCountObjectPtr<MEDFileFields> fields(MEDFileFields::New());
+  MCAuto<MEDFileFields> fields(MEDFileFields::New());
   ret->setFields(fields);
   //
-  MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> umesh(MEDFileUMesh::New());
+  MCAuto<MEDFileUMesh> umesh(MEDFileUMesh::New());
   meshes->pushMesh(umesh);
-  MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coords(BuildCoordsFrom(ds));
+  MCAuto<DataArrayDouble> coords(BuildCoordsFrom(ds));
   umesh->setCoords(coords);
   umesh->setName(GetMeshNameWithContext(context));
   //
@@ -606,10 +606,10 @@ void ConvertFromPolyData(MEDFileData *ret, vtkPolyData *ds, const std::vector<in
   vtkCellArray *cd(ds->GetVerts());
   if(cd)
     {
-      MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> subMesh(BuildMeshFromCellArray(cd,coords,0,INTERP_KERNEL::NORM_POINT1));
+      MCAuto<MEDCouplingUMesh> subMesh(BuildMeshFromCellArray(cd,coords,0,INTERP_KERNEL::NORM_POINT1));
       if((const MEDCouplingUMesh *)subMesh)
         {
-          std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > cellFs(AddPartFields2(offset,offset+subMesh->getNumberOfCells(),ds->GetCellData()));
+          std::vector<MCAuto<DataArray> > cellFs(AddPartFields2(offset,offset+subMesh->getNumberOfCells(),ds->GetCellData()));
           offset+=subMesh->getNumberOfCells();
           ms.push_back(MicroField(subMesh,cellFs));
         }
@@ -617,10 +617,10 @@ void ConvertFromPolyData(MEDFileData *ret, vtkPolyData *ds, const std::vector<in
   vtkCellArray *cc(ds->GetLines());
   if(cc)
     {
-      MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> subMesh(BuildMeshFromCellArray(cc,coords,1,INTERP_KERNEL::NORM_SEG2));
+      MCAuto<MEDCouplingUMesh> subMesh(BuildMeshFromCellArray(cc,coords,1,INTERP_KERNEL::NORM_SEG2));
       if((const MEDCouplingUMesh *)subMesh)
         {
-          std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > cellFs(AddPartFields2(offset,offset+subMesh->getNumberOfCells(),ds->GetCellData()));
+          std::vector<MCAuto<DataArray> > cellFs(AddPartFields2(offset,offset+subMesh->getNumberOfCells(),ds->GetCellData()));
           offset+=subMesh->getNumberOfCells();
           ms.push_back(MicroField(subMesh,cellFs));
         }
@@ -628,10 +628,10 @@ void ConvertFromPolyData(MEDFileData *ret, vtkPolyData *ds, const std::vector<in
   vtkCellArray *cb(ds->GetPolys());
   if(cb)
     {
-      MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> subMesh(BuildMeshFromCellArray(cb,coords,2,INTERP_KERNEL::NORM_POLYGON));
+      MCAuto<MEDCouplingUMesh> subMesh(BuildMeshFromCellArray(cb,coords,2,INTERP_KERNEL::NORM_POLYGON));
       if((const MEDCouplingUMesh *)subMesh)
         {
-          std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > cellFs(AddPartFields2(offset,offset+subMesh->getNumberOfCells(),ds->GetCellData()));
+          std::vector<MCAuto<DataArray> > cellFs(AddPartFields2(offset,offset+subMesh->getNumberOfCells(),ds->GetCellData()));
           offset+=subMesh->getNumberOfCells();
           ms.push_back(MicroField(subMesh,cellFs));
         }
@@ -639,11 +639,11 @@ void ConvertFromPolyData(MEDFileData *ret, vtkPolyData *ds, const std::vector<in
   vtkCellArray *ca(ds->GetStrips());
   if(ca)
     {
-      MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids;
-      MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> subMesh(BuildMeshFromCellArrayTriangleStrip(ca,coords,ids));
+      MCAuto<DataArrayInt> ids;
+      MCAuto<MEDCouplingUMesh> subMesh(BuildMeshFromCellArrayTriangleStrip(ca,coords,ids));
       if((const MEDCouplingUMesh *)subMesh)
         {
-          std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > cellFs(AddPartFields(ids,ds->GetCellData()));
+          std::vector<MCAuto<DataArray> > cellFs(AddPartFields(ids,ds->GetCellData()));
           offset+=subMesh->getNumberOfCells();
           ms.push_back(MicroField(subMesh,cellFs));
         }
@@ -657,14 +657,14 @@ void ConvertFromUnstructuredGrid(MEDFileData *ret, vtkUnstructuredGrid *ds, cons
   if(!ds || !ret)
     throw MZCException("ConvertFromUnstructuredGrid : internal error !");
   //
-  MEDCouplingAutoRefCountObjectPtr<MEDFileMeshes> meshes(MEDFileMeshes::New());
+  MCAuto<MEDFileMeshes> meshes(MEDFileMeshes::New());
   ret->setMeshes(meshes);
-  MEDCouplingAutoRefCountObjectPtr<MEDFileFields> fields(MEDFileFields::New());
+  MCAuto<MEDFileFields> fields(MEDFileFields::New());
   ret->setFields(fields);
   //
-  MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> umesh(MEDFileUMesh::New());
+  MCAuto<MEDFileUMesh> umesh(MEDFileUMesh::New());
   meshes->pushMesh(umesh);
-  MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coords(BuildCoordsFrom(ds));
+  MCAuto<DataArrayDouble> coords(BuildCoordsFrom(ds));
   umesh->setCoords(coords);
   umesh->setName(GetMeshNameWithContext(context));
   vtkIdType nbCells(ds->GetNumberOfCells());
@@ -682,7 +682,7 @@ void ConvertFromUnstructuredGrid(MEDFileData *ret, vtkUnstructuredGrid *ds, cons
     throw MZCException("ConvertFromUnstructuredGrid : internal error 2");
   const unsigned char *ctPtr(ct->GetPointer(0));
   std::map<int,int> m(ComputeMapOfType());
-  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> lev(DataArrayInt::New()) ;  lev->alloc(nbCells,1);
+  MCAuto<DataArrayInt> lev(DataArrayInt::New()) ;  lev->alloc(nbCells,1);
   int *levPtr(lev->getPointer());
   for(vtkIdType i=0;i<nbCells;i++)
     {
@@ -700,14 +700,14 @@ void ConvertFromUnstructuredGrid(MEDFileData *ret, vtkUnstructuredGrid *ds, cons
     }
   int dummy(0);
   int meshDim(lev->getMaxValue(dummy));
-  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> levs(lev->getDifferentValues());
+  MCAuto<DataArrayInt> levs(lev->getDifferentValues());
   std::vector< MicroField > ms;
   vtkIdTypeArray *faces(ds->GetFaces()),*faceLoc(ds->GetFaceLocations());
   for(const int *curLev=levs->begin();curLev!=levs->end();curLev++)
     {
-      MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m0(MEDCouplingUMesh::New("",*curLev));
+      MCAuto<MEDCouplingUMesh> m0(MEDCouplingUMesh::New("",*curLev));
       m0->setCoords(coords); m0->allocateCells();
-      MEDCouplingAutoRefCountObjectPtr<DataArrayInt> cellIdsCurLev(lev->getIdsEqual(*curLev));
+      MCAuto<DataArrayInt> cellIdsCurLev(lev->findIdsEqual(*curLev));
       for(const int *cellId=cellIdsCurLev->begin();cellId!=cellIdsCurLev->end();cellId++)
         {
           std::map<int,int>::iterator it(m.find(ctPtr[*cellId]));
@@ -740,7 +740,7 @@ void ConvertFromUnstructuredGrid(MEDFileData *ret, vtkUnstructuredGrid *ds, cons
               m0->insertNextCell(ct,conn.size(),&conn[0]);
             }
         }
-      std::vector<MEDCouplingAutoRefCountObjectPtr<DataArray> > cellFs(AddPartFields(cellIdsCurLev,ds->GetCellData()));
+      std::vector<MCAuto<DataArray> > cellFs(AddPartFields(cellIdsCurLev,ds->GetCellData()));
       ms.push_back(MicroField(m0,cellFs));
     }
   AssignSingleGTMeshes(ret,ms);
@@ -760,7 +760,7 @@ vtkMEDWriter::~vtkMEDWriter()
 vtkInformationDataObjectMetaDataKey *GetMEDReaderMetaDataIfAny()
 {
   static const char ZE_KEY[]="vtkMEDReader::META_DATA";
-  ParaMEDMEM::GlobalDict *gd(ParaMEDMEM::GlobalDict::GetInstance());
+  MEDCoupling::GlobalDict *gd(MEDCoupling::GlobalDict::GetInstance());
   if(!gd->hasKey(ZE_KEY))
     return 0;
   std::string ptSt(gd->value(ZE_KEY));
@@ -1036,7 +1036,7 @@ int vtkMEDWriter::RequestData(vtkInformation *request, vtkInformationVector **in
       vtkDataObject *input(vtkDataObject::SafeDownCast(inputInfo->Get(vtkDataObject::DATA_OBJECT())));
       if(!input)
         throw MZCException("Not recognized data object in input of the MEDWriter ! Maybe not implemented yet !");
-      MEDCouplingAutoRefCountObjectPtr<MEDFileData> mfd(MEDFileData::New());
+      MCAuto<MEDFileData> mfd(MEDFileData::New());
       WriteMEDFileFromVTKGDS(mfd,input);
       PutFamGrpInfoIfAny(mfd,meshName,groups,fams);
       mfd->write(this->FileName,this->IsTouched?0:2); this->IsTouched=true;
index 71285d52bdf13cfba643ef44136551d00c4c899f..6662a411df5b12772a6ee6878f648f9b864f0c6b 100644 (file)
@@ -117,9 +117,9 @@ assert(c.isEqualWithoutConsideringStr(c1[:,:2],1e-12))
 fs2=ml.MEDFileFields(fname3)
 assert(len(fs2)==2)
 assert(mm2.getSpaceDimension()==3) ; assert(mm2.getCoords()[:,2].isUniform(0.,0.))
-m2_0=mm2[0].deepCpy() ; m2_0.changeSpaceDimension(2,0.) ; m2_0.getCoords().setInfoOnComponents(mm[0].getCoords().getInfoOnComponents())
+m2_0=mm2[0].deepCopy() ; m2_0.changeSpaceDimension(2,0.) ; m2_0.getCoords().setInfoOnComponents(mm[0].getCoords().getInfoOnComponents())
 assert(m2_0.isEqual(mm[0],1e-12))
-m2_1=mm2[-1].deepCpy() ; m2_1.changeSpaceDimension(2,0.) ; m2_1.getCoords().setInfoOnComponents(mm[0].getCoords().getInfoOnComponents())
+m2_1=mm2[-1].deepCopy() ; m2_1.changeSpaceDimension(2,0.) ; m2_1.getCoords().setInfoOnComponents(mm[0].getCoords().getInfoOnComponents())
 assert(m2_1.isEqual(mm[-1],1e-12))
 f2_0=mfd2.getFields()[fieldName0][0].getFieldOnMeshAtLevel(ml.ON_CELLS,0,mm2) ; f2_0.setMesh(m2_0)
 assert(f1ts0.getFieldOnMeshAtLevel(ml.ON_CELLS,0,mm).isEqual(f2_0,1e-12,1e-12))
@@ -143,11 +143,11 @@ test4vtp.CellArrayStatus = ['F0', 'FamilyIdCell']
 SaveData(fname5,proxy=test4vtp,WriteAllTimeSteps=1)
 ### test content of fname5
 mfd5=ml.MEDFileData(fname5)
-m5=mfd5.getMeshes()[0][0].deepCpy()
+m5=mfd5.getMeshes()[0][0].deepCopy()
 assert(m5.getSpaceDimension()==3) # 
 m5.setName(mm.getName()) ; m5.changeSpaceDimension(2,0.) ; m5.getCoords().setInfoOnComponents(mm[0].getCoords().getInfoOnComponents())
-bary5=m5.getBarycenterAndOwner()
-bary=mm[0].getBarycenterAndOwner()
+bary5=m5.computeCellCenterOfMass()
+bary=mm[0].computeCellCenterOfMass()
 a,b=bary5.areIncludedInMe(bary,1e-12) ; assert(a)
 a,c=mm[0].getCoords().areIncludedInMe(m5.getCoords(),1e-12) ; assert(a)
 m5.renumberNodes(c,len(c))#c.invertArrayO2N2N2O(len(c)))
@@ -222,10 +222,10 @@ m10.setCoordsAt(1,ml.DataArrayDouble([1,2,3,4]))
 m10.setCoordsAt(2,ml.DataArrayDouble([3,5,6,7,8]))
 f10=ml.MEDCouplingFieldDouble(ml.ON_CELLS) ; f10.setMesh(m10)
 f10.setName(FieldName10)
-f10.setArray(ml.DataArrayInt.Range(0,m10.getNumberOfCells(),1).convertToDblArr()) ; f10.checkCoherency()
+f10.setArray(ml.DataArrayInt.Range(0,m10.getNumberOfCells(),1).convertToDblArr()) ; f10.checkConsistencyLight()
 f10_n=ml.MEDCouplingFieldDouble(ml.ON_NODES) ; f10_n.setMesh(m10)
 f10_n.setName(FieldName10_n)
-f10_n.setArray(ml.DataArrayInt.Range(0,m10.getNumberOfNodes(),1).convertToDblArr()) ; f10_n.checkCoherency()
+f10_n.setArray(ml.DataArrayInt.Range(0,m10.getNumberOfNodes(),1).convertToDblArr()) ; f10_n.checkConsistencyLight()
 ml.MEDCouplingFieldDouble.WriteVTK(fname8_vtr,[f10,f10_n])
 test10vtr=XMLRectilinearGridReader(FileName=[fname8_vtr])
 SaveData(fname8,proxy=test10vtr,WriteAllTimeSteps=1)
index d87491772c68571a58d5330838c391020f80e87f..492d3c0b16b957032089f8c351e02130c080dbd0 100644 (file)
 
 IF(PARAVIEW_BUILD_QT_GUI)
    
+    INCLUDE(UseQtExt)
     # Custom object panel for the reader and 
     # custom display panel for line chart view
-    QT4_WRAP_UI(CLIENT_UI_SRCS
+    QT_WRAP_UIC(CLIENT_UI_SRCS
         Resources/UI/TableReaderPanel.ui
        Resources/UI/CustomXYChartDisplayPanel.ui
     )
 
-    QT4_WRAP_CPP(MOC_SRCS 
+    QT_WRAP_MOC(MOC_SRCS 
        pqTableReaderPanel.h
        pqTableTo3DPanel.h
        pqCustomChartDisplayPanelImplementation.h
index 69acb2283529ab3292672db066ee0e442d00d997..d67405bf3a6515ba366f6ee8fe17781734afb382 100755 (executable)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(UseQtExt)
+
 # create a plugin with a custom view that shows up in ParaView's multi-view
 # manager.  this plugin also contains a custom display panel
 
 # moc the Qt based .h files
-QT4_WRAP_CPP(MOC_SRCS MyView.h MyDisplay.h MyViewActiveOptions.h MyViewOptions.h)
+QT_WRAP_MOC(MOC_SRCS MyView.h MyDisplay.h MyViewActiveOptions.h MyViewOptions.h)
 
 # invoke macro to create sources for our custom view and display panel
 ADD_PARAVIEW_VIEW_MODULE(
index fc8b22f1fe34456fe59bd6b5b34967acc58f5278..f8f8f4d4cc152595c378e7bfdb40e7bfed724479 100644 (file)
@@ -20,7 +20,7 @@
 SET(TEST_NAMES A0 A1)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME 2DVIEWER_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_2DVIEWER_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 5e8a5d0258870c1ae04e873005eb3b989c2478df..a4da690c9907fc6a07ece35a8a24c8efcc6fa8b1 100644 (file)
@@ -20,7 +20,7 @@
 SET(TEST_NAMES A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME 3DVIEWER_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_3DVIEWER_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index fc91ae937e14c33be94e1804d66dd6d9fc50aa48..ec2970accdfd42afee873cab92aec8eaf18eaea8 100644 (file)
@@ -21,7 +21,7 @@ SET(TEST_NAMES A0 A1 A2 A4 A7 A8 B2 B5 B6 C0 C1 C3 C8 D1 D2 D6 D9
   E0 E4 E7 E8 F2 F5 F6 G0 G3 G4 G8 H1 H2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME ANIMATION_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_ANIMATION_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 30fd32aa67e4c73ba01c999c3cefd5c5a94616ba..24a7bb1dad26b9ae252ca73d199aa03fd478953a 100644 (file)
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2
   E0 E1 E2 E3 E4 E5 E6 E7 E8 E9
-  F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+  F1 F2 F3 F4 F5 F6 F8 F9 G0 G1 G2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME CUTLINES_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_CUTLINES_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 24e9306442d3646e888bd01138b6ee65d3fd5741..34821935545d286ee4e8b0488651e056be7fd65a 100644 (file)
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3
   E0 E1 E2 E3 E4 E5 E6 E7 E8 E9
-  F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+  F1 F2 F3 F4 F5 F6 F8 F9 G0 G1 G2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME CUTPLANES_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_CUTPLANES_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 52a4d368868ea447d9275c0a25e66e6062f93c63..52d0d956d80e2a7c2bbecc9ebe2cf49f1d3e6d4c 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4
-  E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9)
+  E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F8 F9)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME DEFORMEDSHAPE_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_DEFORMEDSHAPE_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 68ae14356c74289ec02b759209e74a0a56529383..6fe8b70cebd86d8f46068831c30c6799e48b48d9 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A3 A4 A5 A6 A7 A9 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9
-  C0 C1 C2 C3 C4 C5 C6 C7 C8 C9)
+  C0 C1 C2 C3 C4 C6 C7 C8 C9)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME GAUSSPOINTS_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_GAUSSPOINTS_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 8e40a87778580912cda4d488a938ec6d59bb720b..7364f7f79c1f4f6be5cef34251dd8b44cb85bdc3 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 C0 C1 C2)
+SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B4 B5 B6 B7 B8 B9 C0 C1 C2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME IMPORTMEDFIELD_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_IMPORTMEDFIELD_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 5027046b634658bbf6e476434de8512d05289acb..546ec0a4ab2803c60f975cd57abc62c511b43da0 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2
-  E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+  E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F8 F9 G0 G1 G2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME ISOSURFACES_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_ISOSURFACES_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index cce48ed801a545c0bbe7bae30cdd9f47413f0bca..e0de497cf541251dc8c1a636c835139eb288e89f 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9
-  F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G3 G4 G5 G6 G7 G8 G9
+  F1 F2 F3 F4 F5 F6 F8 F9 G0 G1 G3 G4 G5 G6 G7 G8 G9
   H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 I0 I1 I2 I3 I4 I5 I6 I7 I8 I9
   J0 J1 J2 J3 J4 J5 J6 J7 J8 J9 K0 K1 K2 K3 K4 K5 K6 K7 K8 K9 L0 L1)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME MESH_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_MESH_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index e3ba23b17736e2763876bc24c6c360c94838eb8b..85446403ebd0b52ad5ae0c1d7df824311e80588f 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9
-  F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+  F1 F2 F3 F4 F5 F6 F8 F9 G0 G1 G2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME PLOT3D_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_PLOT3D_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 7e3abdb8b5c2f29c2f22fe6aa11ea001a77f176d..069b10029c6c923c3ed577e8f52e57d82af130e7 100644 (file)
@@ -20,7 +20,7 @@
 SET(TEST_NAMES A1 A3 A4 A5 A6 A7 A8 A9 B0 B1 B4 B5 B6 B7 B8 B9 C3 C6 C7)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME SWIGSCRIPTS_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_SWIGSCRIPTS_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index c7f1010ccd7c368d692ff41e63036c6dab55bde2..d64dca586213ee85e9742c958251c94bf84fd161 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9
-  F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+  F1 F2 F3 F4 F5 F6 F8 F9 G0 G1 G2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME SCALARMAP_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_SCALARMAP_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 98167316d8a29c23eca37f1535afbd90632ca54e..cf9c13517da875e17244cf1141c2f2dcbf027e38 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9
-  F1 F2 F3 F4 F5 F6 F7 F8)
+  F1 F2 F3 F4 F5 F6 F8)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME DEFORMEDSHAPESCALARMAP_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_DEFORMEDSHAPESCALARMAP_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 3403c9e52965d40b50fd0ff184a891dd559dcfd2..8b4915dafbce82eb6ea6b07f5ed9cea776aa64d0 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4
-  E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0)
+  E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F8 F9 G0)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME STREAMLINES_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_STREAMLINES_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index b866aaf9fb097df6a21f38842558d0f348753172..b7ee5790cff6b91bb90ca6d2b3a3bd59d5ecce54 100644 (file)
@@ -20,7 +20,7 @@
 SET(TEST_NAMES A0 A2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME TABLES_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_TABLES_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 0c0f275bade39ba5e0717139a9d92245fdeda0cb..02c9113c76844066be718ceeca8fa481d328abf8 100644 (file)
 #
 
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9
-  F1 F2 F3 F4 F5 F6 F7 F8 F9)
+  F1 F2 F3 F4 F5 F6 F8 F9)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME VECTORS_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_VECTORS_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index ccf08684dbad7c7038547a640bc0d32ec04efa25..7d4ccb8a002c2afbb19423d43acd505662126af3 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A9 B1 C3 C4 C5 C6 C7 C8 C9
-  D0 D1 D3 D5 D6 D7 E0)
+SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A9 B1 C3 C5 C6 C9
+  D1 D3 D6 D7 E0)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME BUGS_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_BUGS_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 124f9eeab304e5896b7e5dad6c35625bb0aa867b..a244a334627aa1857b47f7b91c75ce46105784a5 100644 (file)
@@ -20,7 +20,7 @@
 SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B3 B4 B5)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME DUMPSTUDY_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_DUMPSTUDY_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 43d1705065290fa41e1ec8517878428b856ce130..ce264536a423a7b71fe7a9dc9ff49a37527dcbf5 100644 (file)
@@ -20,7 +20,7 @@
 SET(TEST_NAMES A1 A2 A3 A4 A6 A9 B1 B2)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME IMPS_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_IMPS_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index 93876df5a354148cbbfe51184acfdebf2442465c..1ebd7f8395e80cda2e2745302012c29cdea37416 100644 (file)
@@ -20,7 +20,7 @@
 SET(TEST_NAMES A1 A2 A4 A5 B0)
 
 FOREACH(tfile ${TEST_NAMES})
-  SET(TEST_NAME UNITED_${tfile})
+  SET(TEST_NAME ${COMPONENT_NAME}_UNITED_${tfile})
   ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
 ENDFOREACH()
index e6984c241294e087d4643090ce8b4df2841961ad..5c48d05b58961582a0e31cb4ee39f8ca2fe711a9 100644 (file)
@@ -25,7 +25,12 @@ SET(CMAKE_BUILD_TYPE "Debug")
 OPTION(LIGHTPARAVIS_WITH_GUI "Build GUI test app" ON)
 
 # Package detection
-FIND_PACKAGE(Qt4 REQUIRED)
+IF (NOT SALOME_GUI_BUILD_WITH_QT5)
+  FIND_PACKAGE(Qt4 REQUIRED)
+ELSE()
+  FIND_PACKAGE(Qt5Core)
+  FIND_PACKAGE(Qt5Gui)
+ENDIF()
 LIST(APPEND CMAKE_PREFIX_PATH "$ENV{PARAVIEW_ROOT_DIR}")
 FIND_PACKAGE(ParaView REQUIRED)
 
index 8af5fee69279e075a030e82d941b0e6a8734e833..a4b18ca2bcc8717bc6a61239a2e7eb2b60b369e6 100644 (file)
@@ -18,6 +18,8 @@
 #
 # Author: Adrien Bruneton (CEA)
 
+INCLUDE(UseQtExt)
+
 SET(pl_HEADERS
     PLMainWindow.hxx
     PLViewTab.hxx
@@ -47,7 +49,6 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON)
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
 INCLUDE_DIRECTORIES(${PARAVIEW_INCLUDE_DIRS})
 
-INCLUDE(${QT_USE_FILE})
 ADD_DEFINITIONS(${QT_DEFINITIONS})
 
 # Generate resources that will embedded 
@@ -59,11 +60,11 @@ GENERATE_QT_RESOURCE_FROM_FILES(
     "/LightPara/Configuration"
     "${PROJECT_SOURCE_DIR}/gui/xml/ParaViewReaders.xml")
 
-QT4_ADD_RESOURCES(rcs_sources
+QT_ADD_RESOURCES(rcs_sources
     ${ui_resources}
     )
-QT4_WRAP_UI(pl_FORMS_HEADERS ${pl_FORMS})
-QT4_WRAP_CPP(pl_HEADERS_MOC  ${pl_HEADERS})
+QT_WRAP_UIC(pl_FORMS_HEADERS ${pl_FORMS})
+QT_WRAP_MOC(pl_HEADERS_MOC  ${pl_HEADERS})
 
 ADD_EXECUTABLE(paraLight
     ${pl_SOURCES}