+ mfm->setJoints( joints );
+ }
+
+ return mfm;
+}
+
+MEDCoupling::MEDCouplingFieldDouble* MeshCollectionDriver::getField(std::string key, std::string description, MEDCoupling::DataArrayDouble* data, MEDCoupling::MEDFileMesh* mfm, int idomain) const
+{
+ std::string desc=description;
+ if (MyGlobals::_Verbose>20)
+ std::cout << "proc " << MyGlobals::_Rank << " : write field " << desc << std::endl;
+ std::string meshName, fieldName;
+ int typeField, DT, IT, entity;
+ FieldShortDescriptionToData(desc, fieldName, typeField, entity, DT, IT);
+ double time=StrToDouble(ExtractFromDescription(desc, "time="));
+ int typeData=StrToInt(ExtractFromDescription(desc, "typeData="));
+ std::string entityName=ExtractFromDescription(desc, "entityName=");
+ MEDCoupling::MEDCouplingFieldDouble* field=0;
+ if (typeData!=6)
+ {
+ std::cout << "WARNING : writeMedFile : typeData " << typeData << " not implemented for fields\n";
+ }
+ if (entityName=="MED_CELL")
+ {
+ //there is a field of idomain to write
+ field=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
+ }
+ if (entityName=="MED_NODE_ELEMENT")
+ {
+ //there is a field of idomain to write
+ field=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_GAUSS_NE,MEDCoupling::ONE_TIME);
+ }
+ if (!field)
+ {
+ std::cout << "WARNING : writeMedFile : entityName " << entityName << " not implemented for fields\n";
+ }
+ if (field && typeData==6)
+ {
+ field->setName(fieldName);
+ field->setMesh(mfm->getMeshAtLevel(0));
+ MEDCoupling::DataArrayDouble *da=data;