#include <algorithm>
#include <iterator>
+// From MEDLoader.cxx TU:
extern INTERP_KERNEL::NormalizedCellType typmai2[MED_N_CELL_FIXED_GEO];
extern med_geometry_type typmainoeud[1];
extern med_geometry_type typmai3[INTERP_KERNEL::NORM_MAXTYPE];
for(std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> >::const_iterator it=_fields.begin();it!=_fields.end();it++,i++)
{
const MEDFileAnyTypeFieldMultiTSWithoutSDA *cur=(*it);
- std::string chapter(17,'0'+i);
+ std::string chapter(17,(char)('0'+i));
oss << startLine << chapter << std::endl;
if(cur)
{
}
case MED_INT32:
{
- _fields[i]=MEDFileIntFieldMultiTSWithoutSDA::New(fid,fieldName,meshName,typcha,infos,nbOfStep,dtunit,loadAll,ms,entities);
+ _fields[i]=MEDFileInt32FieldMultiTSWithoutSDA::New(fid,fieldName,meshName,typcha,infos,nbOfStep,dtunit,loadAll,ms,entities);
+ break;
+ }
+ case MED_INT64:
+ {
+ _fields[i]=MEDFileInt64FieldMultiTSWithoutSDA::New(fid,fieldName,meshName,typcha,infos,nbOfStep,dtunit,loadAll,ms,entities);
break;
}
case MED_FLOAT32:
{
if(sizeof(med_int)==sizeof(int))
{
- _fields[i]=MEDFileIntFieldMultiTSWithoutSDA::New(fid,fieldName,meshName,typcha,infos,nbOfStep,dtunit,loadAll,ms,entities);
+ _fields[i]=MEDFileInt32FieldMultiTSWithoutSDA::New(fid,fieldName,meshName,typcha,infos,nbOfStep,dtunit,loadAll,ms,entities);
break;
}
}
default:
{
- std::ostringstream oss; oss << "constructor MEDFileFields(fileName) : file \'" << FileNameFromFID(fid) << "\' at pos #" << i << " field has name \'" << fieldName << "\' but the type of field is not in [MED_FLOAT64, MED_INT32, MED_FLOAT32] !";
+ std::ostringstream oss; oss << "constructor MEDFileFields(fileName) : file \'" << FileNameFromFID(fid) << "\' at pos #" << i << " field has name \'" << fieldName << "\' but the type of field is not in [MED_FLOAT64, MED_INT32, MED_FLOAT32, MED_INT64] !";
throw INTERP_KERNEL::Exception(oss.str());
}
}
return 0;
MCAuto<MEDFileAnyTypeFieldMultiTS> ret;
const MEDFileFieldMultiTSWithoutSDA *fmtsC(dynamic_cast<const MEDFileFieldMultiTSWithoutSDA *>(fmts));
- const MEDFileIntFieldMultiTSWithoutSDA *fmtsC2(dynamic_cast<const MEDFileIntFieldMultiTSWithoutSDA *>(fmts));
+ const MEDFileInt32FieldMultiTSWithoutSDA *fmtsC2(dynamic_cast<const MEDFileInt32FieldMultiTSWithoutSDA *>(fmts));
+ const MEDFileInt64FieldMultiTSWithoutSDA *fmtsC4(dynamic_cast<const MEDFileInt64FieldMultiTSWithoutSDA *>(fmts));
const MEDFileFloatFieldMultiTSWithoutSDA *fmtsC3(dynamic_cast<const MEDFileFloatFieldMultiTSWithoutSDA *>(fmts));
if(fmtsC)
ret=MEDFileFieldMultiTS::New(*fmtsC,false);
else if(fmtsC2)
- ret=MEDFileIntFieldMultiTS::New(*fmtsC2,false);
+ ret=MEDFileInt32FieldMultiTS::New(*fmtsC2,false);
+ else if(fmtsC4)
+ ret=MEDFileInt64FieldMultiTS::New(*fmtsC4,false);
else if(fmtsC3)
ret=MEDFileFloatFieldMultiTS::New(*fmtsC3,false);
else
{
- std::ostringstream oss; oss << "MEDFileFields::getFieldAtPos : At pos #" << i << " field is neither double (FLOAT64) nor float (FLOAT32) nor integer (INT32) !";
+ std::ostringstream oss; oss << "MEDFileFields::getFieldAtPos : At pos #" << i << " field is neither double (FLOAT64) nor float (FLOAT32) nor integer (INT32) nor integer (INT64) !";
throw INTERP_KERNEL::Exception(oss.str());
}
ret->shallowCpyGlobs(*this);