]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
feedback from first MEDReader users. Management of cartesian mesh only MED file....
authorgeay <anthony.geay@cea.fr>
Wed, 12 Mar 2014 07:25:21 +0000 (08:25 +0100)
committergeay <anthony.geay@cea.fr>
Wed, 12 Mar 2014 07:25:21 +0000 (08:25 +0100)
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx
src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx
src/Plugins/MEDReader/TODO.txt

index a6c603c2e1774ff81d99cca20db9554f0eb53460..5b5a2893de3ed6da179fc48981921a0e75a997b2 100644 (file)
@@ -1311,44 +1311,57 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED
   for(int i=0;i<ms->getNumberOfMeshes();i++)
     {
       MEDFileMesh *mm(ms->getMeshAtPos(i));
-      MEDFileUMesh *mmu(dynamic_cast<MEDFileUMesh *>(mm));
-      if(!mmu)
-        continue;
       std::vector<int> levs(mm->getNonEmptyLevels());
       ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileField1TS> f1tsMultiLev(ParaMEDMEM::MEDFileField1TS::New());
-      for(std::vector<int>::const_iterator it=levs.begin();it!=levs.end();it++)
-        {
-          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));
-              f->setMesh(m);
-              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());
-             arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
-              arr->iota();
-              f->setArray(arr);
-              f->setName(mm->getName());
-              f1tsMultiLev->setFieldNoProfileSBT(f);
-            }
-        }
-      if(levs.empty())
-        {
-          std::vector<int> levsExt(mm->getNonEmptyLevelsExt());
-          if(levsExt.size()==levs.size()+1)
-            {
-              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingMesh> m(mm->getGenMeshAtLevel(1));
-              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDouble> f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_NODES));
-              f->setMesh(m);
-              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(m->getNumberOfNodes());
-             arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
-              arr->iota(); f->setArray(arr);
-              f->setName(mm->getName());
-              f1tsMultiLev->setFieldNoProfileSBT(f);
-            }
-          else
-            continue;
-        }
+      MEDFileUMesh *mmu(dynamic_cast<MEDFileUMesh *>(mm));
+      if(mmu)
+       {
+         for(std::vector<int>::const_iterator it=levs.begin();it!=levs.end();it++)
+           {
+             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));
+                 f->setMesh(m);
+                 ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());
+                 arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
+                 arr->iota();
+                 f->setArray(arr);
+                 f->setName(mm->getName());
+                 f1tsMultiLev->setFieldNoProfileSBT(f);
+               }
+           }
+         if(levs.empty())
+           {
+             std::vector<int> levsExt(mm->getNonEmptyLevelsExt());
+             if(levsExt.size()==levs.size()+1)
+               {
+                 ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingMesh> m(mm->getGenMeshAtLevel(1));
+                 ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDouble> f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_NODES));
+                 f->setMesh(m);
+                 ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(m->getNumberOfNodes());
+                 arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
+                 arr->iota(); f->setArray(arr);
+                 f->setName(mm->getName());
+                 f1tsMultiLev->setFieldNoProfileSBT(f);
+               }
+             else
+               continue;
+           }
+       }
+      else
+       {
+         ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingMesh> m(mm->getGenMeshAtLevel(0));
+         ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDouble> f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS));
+         f->setMesh(m);
+         ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());
+         arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
+         arr->iota();
+         f->setArray(arr);
+         f->setName(mm->getName());
+         f1tsMultiLev->setFieldNoProfileSBT(f);
+       }
       //
       ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFieldMultiTS> fmtsMultiLev(ParaMEDMEM::MEDFileFieldMultiTS::New());
       fmtsMultiLev->pushBackTimeStep(f1tsMultiLev);
index ed70bd528bedea8e35b5c2c3d0dd2e89053168e2..17d7bb4617a8f56cadd9944ceb7dd0798d7f27af 100644 (file)
@@ -464,12 +464,9 @@ int pqMEDReaderPanel::getMaxNumberOfTS() const
   int ret(0);
   for(std::vector<pqTreeWidgetItemObject *>::const_iterator it=_all_lev4.begin();it!=_all_lev4.end();it++)
     {
-      if((*it)->property("checked").toInt())
-        {
-          QTreeWidgetItem *obj((*it)->QTreeWidgetItem::parent()->QTreeWidgetItem::parent()->QTreeWidgetItem::parent());
-          pqTreeWidgetItemObject *objC(dynamic_cast<pqTreeWidgetItemObject *>(obj));
-          ret=std::max(ret,objC->property("NbOfTS").toInt());
-        }
+      QTreeWidgetItem *obj((*it)->QTreeWidgetItem::parent()->QTreeWidgetItem::parent()->QTreeWidgetItem::parent());
+      pqTreeWidgetItemObject *objC(dynamic_cast<pqTreeWidgetItemObject *>(obj));
+      ret=std::max(ret,objC->property("NbOfTS").toInt());
     }
   return ret;
 }
index d491643821514ffadcafea20dad39ec38c819a1f..193cada4197f26da2f1329f8c4257c266b2d748a 100644 (file)
@@ -13,7 +13,6 @@ UC : ForMEDReader16.med, then extractgroup, then return to MEDReader properties
 Known bug :
 -----------
 
-- Extract cell type + Extract Group
 
 Warning for users :
 -------------------
@@ -49,3 +48,11 @@ when in STANDALONE mode.
 0 - protect ExtractGroup against throw
 
 0 - protect ExctractCellType against throw
+
+0 - Extract cell type + Extract Group
+
+0 - bug client side when the field having the max number of TS is not first.
+
+0 - ELGA arrays choice of GaussPoints filter
+
+0 - Manage file containing only cartesian meshes.
\ No newline at end of file