From 93e7f659da039c602f5acf8fafd7cdd4ac8e7237 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 3 Feb 2012 11:06:02 +0000 Subject: [PATCH] Acceleration of timesteps access. --- src/MEDLoader/MEDLoader.cxx | 41 ++++++------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/src/MEDLoader/MEDLoader.cxx b/src/MEDLoader/MEDLoader.cxx index 02a8ddffe..2012f6fdb 100644 --- a/src/MEDLoader/MEDLoader.cxx +++ b/src/MEDLoader/MEDLoader.cxx @@ -745,8 +745,6 @@ std::vector< std::pair< std::pair, double> > MEDLoader::GetAllFieldIter med_field_type typcha; med_int numdt=0,numo=0; med_float dt=0.0; - char pflname[MED_NAME_SIZE+1]=""; - char locname[MED_NAME_SIZE+1]=""; INTERP_KERNEL::AutoPtr maa_ass=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE); INTERP_KERNEL::AutoPtr dt_unit=MEDLoaderBase::buildEmptyString(MED_LNAME_SIZE); INTERP_KERNEL::AutoPtr nomcha=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE); @@ -762,34 +760,10 @@ std::vector< std::pair< std::pair, double> > MEDLoader::GetAllFieldIter std::string curFieldName=MEDLoaderBase::buildStringFromFortran(nomcha,MED_NAME_SIZE+1); if(curFieldName==fieldName) { - bool found=false; - int profilesize,nbi; - for(int j=0;j0) - { - found=true; - ret.push_back(std::make_pair(std::make_pair(numdt,numo),dt)); - } - } - } for(int k=0;k0) - { - found=true; - ret.push_back(std::make_pair(std::make_pair(numdt,numo),dt)); - } + ret.push_back(std::make_pair(std::make_pair(numdt,numo),dt)); } } } @@ -825,16 +799,13 @@ double MEDLoader::GetTimeAttachedOnFieldIteration(const char *fileName, const ch if(curFieldName==fieldName) { found=true; - for(int j=0;j