]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Maybe SHAPER_V9_1_0RC1
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 29 Aug 2018 09:17:29 +0000 (11:17 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 29 Aug 2018 09:17:29 +0000 (11:17 +0200)
src/MEDCalc/cmp/MEDDataManager_i.cxx
src/MEDCalculator/MEDCalculatorDBSliceField.cxx

index 5a7b017375dcce61595318bd2957e10ba7ee186c..01d5f745fe41dcaadd4c9e8c4282ceefca24c160 100644 (file)
@@ -641,13 +641,14 @@ MEDCouplingFieldDouble * MEDDataManager_i::getFieldDouble(const MEDCALC::FieldHa
   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;
index e2d6e663186db78a59cc50e04d4eda11f791e961..9d18ce73ae643639eca8c9fd90a3dafb95374dcd 100644 (file)
@@ -96,7 +96,8 @@ MEDCouplingFieldDouble *MEDCalculatorDBSliceField::getField(TypeOfField type, co
 {
   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;