Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[modules/smesh.git]
/
src
/
DriverMED
/
DriverMED_W_Field.cxx
diff --git
a/src/DriverMED/DriverMED_W_Field.cxx
b/src/DriverMED/DriverMED_W_Field.cxx
index 475730607f7bd165db443d66a87c01f2b7d43455..041d1e8dd7c090e458bdb93102fc33eec717268d 100644
(file)
--- a/
src/DriverMED/DriverMED_W_Field.cxx
+++ b/
src/DriverMED/DriverMED_W_Field.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
21
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-33,7
+33,6
@@
#include "MED_Wrapper.hxx"
#include "SMDS_IteratorOnIterators.hxx"
#include "SMDS_MeshElement.hxx"
#include "MED_Wrapper.hxx"
#include "SMDS_IteratorOnIterators.hxx"
#include "SMDS_MeshElement.hxx"
-#include "SMDS_PolyhedralVolumeOfNodes.hxx"
#include "SMDS_SetIterator.hxx"
#include "SMESHDS_Mesh.hxx"
#include "SMDS_SetIterator.hxx"
#include "SMESHDS_Mesh.hxx"
@@
-91,7
+90,7
@@
bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh,
}
// find out "MED order" of elements - sort elements by geom type
}
// find out "MED order" of elements - sort elements by geom type
-
int
nbElems;
+
smIdType
nbElems;
if ( _nbElemsByGeom.empty() || _elemType != type )
{
_elemType = type;
if ( _nbElemsByGeom.empty() || _elemType != type )
{
_elemType = type;
@@
-101,7
+100,7
@@
bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh,
for ( int iG = 0; iG < SMDSEntity_Last; ++iG )
{
SMDSAbs_EntityType geom = (SMDSAbs_EntityType) iG;
for ( int iG = 0; iG < SMDSEntity_Last; ++iG )
{
SMDSAbs_EntityType geom = (SMDSAbs_EntityType) iG;
- SMDSAbs_ElementType
t = SMDS_MeshCell::toSmds
Type( geom );
+ SMDSAbs_ElementType
t = SMDS_MeshCell::Elem
Type( geom );
if ( t != _elemType ) continue;
nbElems = mesh->GetMeshInfo().NbElements( geom );
if ( t != _elemType ) continue;
nbElems = mesh->GetMeshInfo().NbElements( geom );
@@
-120,7
+119,7
@@
bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh,
if ( _nbElemsByGeom.size() == 1 )
_nbElemsByGeom.push_back( std::make_pair( SMDSEntity_0D, 0));
_nbElemsByGeom.push_back( std::make_pair( SMDSEntity_Node,
if ( _nbElemsByGeom.size() == 1 )
_nbElemsByGeom.push_back( std::make_pair( SMDSEntity_0D, 0));
_nbElemsByGeom.push_back( std::make_pair( SMDSEntity_Node,
- nodes.size() + _nbElemsByGeom.back().second ));
+
nodes.size() + _nbElemsByGeom.back().second ));
}
}
}
}
@@
-157,7
+156,7
@@
bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh,
else
_dblValues.reserve( nbElems * nbComps );
else
_dblValues.reserve( nbElems * nbComps );
- return nbElems
*
nbComps;
+ return nbElems
&&
nbComps;
}
//================================================================================
}
//================================================================================
@@
-254,7
+253,11
@@
Driver_Mesh::Status DriverMED_W_Field::Perform()
if ( !myMesh )
return addMessage("Supporting mesh not set", /*isFatal=*/true );
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 )
{
MED::PMeshInfo meshInfo;
if ( myMeshId > 0 )
{
@@
-277,7
+280,7
@@
Driver_Mesh::Status DriverMED_W_Field::Perform()
( !myMeshName.empty() && meshInfo->GetName() != myMeshName ))
{
myMeshId = -1;
( !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
}
// create a field
@@
-358,7
+361,7
@@
Driver_Mesh::Status DriverMED_W_Field::Perform()
return DRS_OK;
}
return DRS_OK;
}
-namespace DriverMED // Impleme
tation of fu
ctions declared in DriverMED.hxx
+namespace DriverMED // Impleme
ntation of fun
ctions declared in DriverMED.hxx
{
//================================================================================
/*!
{
//================================================================================
/*!
@@
-393,6
+396,7
@@
namespace DriverMED // Implemetation of fuctions declared in DriverMED.hxx
theVec[ SMDSEntity_TriQuad_Hexa ] = MED::eHEXA27 ;
theVec[ SMDSEntity_Penta ] = MED::ePENTA6 ;
theVec[ SMDSEntity_Quad_Penta ] = MED::ePENTA15 ;
theVec[ SMDSEntity_TriQuad_Hexa ] = MED::eHEXA27 ;
theVec[ SMDSEntity_Penta ] = MED::ePENTA6 ;
theVec[ SMDSEntity_Quad_Penta ] = MED::ePENTA15 ;
+ theVec[ SMDSEntity_BiQuad_Penta ] = MED::ePENTA18 ;
theVec[ SMDSEntity_Hexagonal_Prism ] = MED::eOCTA12 ;
theVec[ SMDSEntity_Polyhedra ] = MED::ePOLYEDRE;
//theVec[ SMDSEntity_Quad_Polyhedra ] = MED::ePOLYEDRE; // !!
theVec[ SMDSEntity_Hexagonal_Prism ] = MED::eOCTA12 ;
theVec[ SMDSEntity_Polyhedra ] = MED::ePOLYEDRE;
//theVec[ SMDSEntity_Quad_Polyhedra ] = MED::ePOLYEDRE; // !!