LOG("getFieldDouble: field "<<fieldHandler->fieldname<<" loaded from file "<<filepath);
TypeOfField type = (TypeOfField)fieldHandler->type;
int meshDimRelToMax = 0;
- MCAuto<MEDCouplingFieldDouble> myField = ReadField(type,
+ MCAuto<MEDCouplingField> myFieldTmpp(ReadField(type,
filepath,
meshName,
meshDimRelToMax,
std::string(fieldHandler->fieldname),
fieldHandler->iteration,
- fieldHandler->order);
+ fieldHandler->order));
+ MCAuto<MEDCouplingFieldDouble> myField(DynamicCast<MEDCouplingField,MEDCouplingFieldDouble>(myFieldTmpp));
myField->setMesh(myMesh);
_fieldDoubleMap[fieldHandler->id] = myField.retn();
return myField;
{
if(!_field)
{
- MCAuto<MEDCouplingFieldDouble> tmp(ReadField(type,fname.c_str(),mname.c_str(),0,fieldName.c_str(),_iteration,_order));
+ MCAuto<MEDCouplingField> tmpp(ReadField(type,fname.c_str(),mname.c_str(),0,fieldName.c_str(),_iteration,_order));
+ MCAuto<MEDCouplingFieldDouble> tmp(DynamicCast<MEDCouplingField,MEDCouplingFieldDouble>(tmpp));
_field=tmp.retn();
}
return _field;