- med_int ncomp=MEDfieldnComponent(fid,i+1);
- INTERP_KERNEL::AutoPtr<char> comp=new char[ncomp*MED_SNAME_SIZE+1];
- INTERP_KERNEL::AutoPtr<char> unit=new char[ncomp*MED_SNAME_SIZE+1];
- INTERP_KERNEL::AutoPtr<char> dt_unit=new char[MED_LNAME_SIZE+1];
- med_int nbPdt;
- MEDfieldInfo(fid,i+1,nomcha,maa_ass,&localmesh,&typcha,comp,unit,dt_unit,&nbPdt);
- std::string curFieldName=MEDLoaderBase::buildStringFromFortran(nomcha,MED_NAME_SIZE+1);
- std::string curMeshName=MEDLoaderBase::buildStringFromFortran(maa_ass,MED_NAME_SIZE+1);
- if(curMeshName==meshName)
- {
- if(curFieldName==fieldName)
- {
- int profilesize,nbi;
- if(nbPdt>0)
- {
- bool found=false;
- for(int ii=0;ii<nbPdt && !found;ii++)
- {
- MEDfieldComputingStepInfo(fid,nomcha,1,&numdt,&numo,&dt);
- med_int nbOfVal=MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_NODE,MED_NONE,1,MED_COMPACT_PFLMODE,
- pflname,&profilesize,locname,&nbi);
- if(nbOfVal>0)
- {
- ret.push_back(ON_NODES);
- found=true;
- }
- }
- }
- bool found=false;
- for(int j=0;j<MED_N_CELL_FIXED_GEO && !found;j++)
- {
- if(nbPdt>0)
- {
- MEDfieldComputingStepInfo(fid,nomcha,1,&numdt,&numo,&dt);
- med_int nbOfVal=MEDfieldnValueWithProfile(fid,nomcha,numdt,numo,MED_CELL,typmai[j],1,MED_COMPACT_PFLMODE,
- pflname,&profilesize,locname,&nbi);
- if(nbOfVal>0)
- {
- found=true;
- ret.push_back(ON_CELLS);
- }
- }
- }
- }
- }