- SUPPORT *sup=new SUPPORT(&mesh,"dummy",MED_CELL);
- FIELD<double>* f=mesh.getVolume(sup);
- const double *tabS=f->getValue();
- std::copy(tabS,tabS+mesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS),tab)
- delete sup;
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> vol=mesh->getMeasureField(true);
+ std::copy(vol->getArray()->begin(),vol->getArray()->end(),tab);