]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Acceleration is also for MEDReader now
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 12 Oct 2018 11:18:10 +0000 (13:18 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 12 Oct 2018 11:18:10 +0000 (13:18 +0200)
src/MEDLoader/MEDFileEntities.cxx
src/MEDLoader/MEDFileFieldInternal.cxx

index ec3348a62d24db0f128ab7ac0c793c13d93d1652..a3ef490d56e141e1ffab99d87281d3702d7de60d 100644 (file)
@@ -33,7 +33,7 @@ MEDFileStaticEntities::MEDFileStaticEntities(const std::vector< std::pair<TypeOf
 MEDFileEntities *MEDFileEntities::BuildFrom(const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> > *entities)
 {
   if(!entities)
-    return new MEDFileAllStaticEntites;
+    return nullptr;
   else
     return new MEDFileStaticEntities(*entities);
 }
@@ -41,7 +41,7 @@ MEDFileEntities *MEDFileEntities::BuildFrom(const std::vector< std::pair<TypeOfF
 MEDFileEntities *MEDFileEntities::BuildFrom(const MEDFileStructureElements& se)
 {
   if(se.getNumberOf()==0)
-    return new MEDFileAllStaticEntites;
+    return nullptr;
   else
     return new MEDFileAllStaticEntitiesPlusDyn(&se);
 }
index 83e395db9aaf305b4559d25fa0c0de6dab512ec7..24b51dd181103ca6d9c11cff40353e480b1d8a59 100644 (file)
@@ -1823,35 +1823,6 @@ MEDFileFieldPerMeshPerType::MEDFileFieldPerMeshPerType(med_idt fid, MEDFileField
           _field_pm_pt_pd[i++]=MEDFileFieldPerMeshPerTypePerDisc::NewOnRead(this,MEDFileMesh::ConvertFromMEDFileEntity(it.second),j,pd);
         }
     }
-  /*INTERP_KERNEL::AutoPtr<char> pflName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
-  INTERP_KERNEL::AutoPtr<char> locName=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
-  med_geometry_type mgeoti;
-  med_entity_type menti(ConvertIntoMEDFileType(type,geoType,mgeoti));
-  _field_pm_pt_pd.resize(nbProfiles);
-  for(int i=0;i<nbProfiles;i++)
-    {
-      _field_pm_pt_pd[i]=MEDFileFieldPerMeshPerTypePerDisc::NewOnRead(this,type,i,pd);
-    }
-  if(type==ON_CELLS)
-    {
-      int nbProfiles2(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_NODE_ELEMENT,mgeoti,pflName,locName));
-      for(int i=0;i<nbProfiles2;i++)
-        _field_pm_pt_pd.push_back(MEDFileFieldPerMeshPerTypePerDisc::NewOnRead(this,ON_GAUSS_NE,i,pd));
-    }
-  if(!_field_pm_pt_pd.empty() || type!=ON_CELLS)
-    return ;
-  // dark side of the force.
-  {
-    int nbProfiles1(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_FACE,mgeoti,pflName,locName));
-    int nbProfiles2(MEDfieldnProfile(fid,nasc.getName().c_str(),getIteration(),getOrder(),MED_DESCENDING_EDGE,mgeoti,pflName,locName));
-    if(nbProfiles1==0 && nbProfiles2==0)
-      return ;// OK definitely nothing in field
-    menti=nbProfiles1>=nbProfiles2?MED_DESCENDING_FACE:MED_DESCENDING_EDGE;//not enough words to describe the beauty
-    nbProfiles=std::max(nbProfiles1,nbProfiles2);
-    _field_pm_pt_pd.resize(nbProfiles);
-    for(int i=0;i<nbProfiles;i++)
-      _field_pm_pt_pd[i]=MEDFileFieldPerMeshPerTypePerDisc::NewOnRead(this,ON_CELLS,i,pd);
-      }*/
 }
 
 MCAuto<MEDFileFieldPerMeshPerType> MEDFileFieldPerMeshPerType::Aggregate(int &start, const std::vector<std::pair<int,const MEDFileFieldPerMeshPerType *> >& pms, const std::vector< std::vector< std::pair<int,int> > >& dts, INTERP_KERNEL::NormalizedCellType gt, MEDFileFieldPerMesh *father, std::vector<std::pair< int, std::pair<int,int> > >& extractInfo)