-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include "MED_Wrapper.hxx"
#include "SMDS_IteratorOnIterators.hxx"
#include "SMDS_MeshElement.hxx"
-#include "SMDS_PolyhedralVolumeOfNodes.hxx"
#include "SMDS_SetIterator.hxx"
#include "SMESHDS_Mesh.hxx"
for ( int iG = 0; iG < SMDSEntity_Last; ++iG )
{
SMDSAbs_EntityType geom = (SMDSAbs_EntityType) iG;
- SMDSAbs_ElementType t = SMDS_MeshCell::toSmdsType( geom );
+ SMDSAbs_ElementType t = SMDS_MeshCell::ElemType( geom );
if ( t != _elemType ) continue;
nbElems = mesh->GetMeshInfo().NbElements( geom );
if ( !myMesh )
return addMessage("Supporting mesh not set", /*isFatal=*/true );
- MED::PWrapper medFile = MED::CrWrapperW( myFile );
+ int version = -1, major, minor, release;
+ if ( MED::GetMEDVersion( myFile, major, minor, release ))
+ version = major * 10 + minor;
+
+ MED::PWrapper medFile = MED::CrWrapperW( myFile, version );
MED::PMeshInfo meshInfo;
if ( myMeshId > 0 )
{
( !myMeshName.empty() && meshInfo->GetName() != myMeshName ))
{
myMeshId = -1;
- return addMessage("Specified mesh not found in the file", /*isFatal=*/true );
+ return addMessage("DriverMED_W_Field: Specified mesh not found in the file", /*isFatal=*/true );
}
// create a field
return DRS_OK;
}
-namespace DriverMED // Implemetation of fuctions declared in DriverMED.hxx
+namespace DriverMED // Implementation of functions declared in DriverMED.hxx
{
//================================================================================
/*!