const DataArray *arr=getOrCreateAndGetArray();
if(!arr)
throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::writeLL : no array set !");
+ if(!arr->isAllocated())
+ throw INTERP_KERNEL::Exception("MEDFileFieldPerMeshPerTypePerDisc::writeLL : the array to be written is not allocated !");
const DataArrayDouble *arrD=dynamic_cast<const DataArrayDouble *>(arr);
const DataArrayInt *arrI=dynamic_cast<const DataArrayInt *>(arr);
const unsigned char *locToWrite=0;
throw INTERP_KERNEL::Exception("MEDFileIntFieldMultiTSWithoutSDA::appendFieldNoProfileSBT : input field is NULL !");
if(!_time_steps.empty())
checkCoherencyOfTinyInfo(field,arr);
- MEDFileField1TSWithoutSDA *objC=new MEDFileField1TSWithoutSDA;
+ MEDFileAnyTypeField1TSWithoutSDA *objC=createNew1TSWithoutSDAEmptyInstance();
MCAuto<MEDFileAnyTypeField1TSWithoutSDA> obj(objC);
objC->setFieldProfile(field,arr,mesh,meshDimRelToMax,profile,glob,*this);
copyTinyInfoFrom(field,arr);