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
Merge branch 'rnv/win_swig_generation' of salome:modules/smesh into rnv/win_swig_gene...
[modules/smesh.git]
/
src
/
SMESH_I
/
SMESH_PreMeshInfo.cxx
diff --git
a/src/SMESH_I/SMESH_PreMeshInfo.cxx
b/src/SMESH_I/SMESH_PreMeshInfo.cxx
index 21fe1513eef3b5612d5a5e9faadf626840060d57..3d8980ff9a3751a9efc1b144ceb9b4ba705bcf1d 100644
(file)
--- a/
src/SMESH_I/SMESH_PreMeshInfo.cxx
+++ b/
src/SMESH_I/SMESH_PreMeshInfo.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
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
@@
-35,6
+35,7
@@
#include "SMDS_VertexPosition.hxx"
#include "SMESHDS_Group.hxx"
#include "SMESHDS_GroupOnFilter.hxx"
#include "SMDS_VertexPosition.hxx"
#include "SMESHDS_Group.hxx"
#include "SMESHDS_GroupOnFilter.hxx"
+#include "SMESHDS_Mesh.hxx"
#include "SMESH_Gen_i.hxx"
#include "SMESH_Group_i.hxx"
#include "SMESH_Mesh_i.hxx"
#include "SMESH_Gen_i.hxx"
#include "SMESH_Group_i.hxx"
#include "SMESH_Mesh_i.hxx"
@@
-54,6
+55,7
@@
#include CORBA_SERVER_HEADER(SALOME_Session)
#include CORBA_SERVER_HEADER(SALOME_Session)
+using namespace std;
#define MYDEBUGOUT(msg) //std::cout << msg << std::endl;
#define MYDEBUGOUT(msg) //std::cout << msg << std::endl;
@@
-62,7
+64,7
@@
namespace
enum { GroupOnFilter_OutOfDate = -1 };
// a map to count not yet loaded meshes
enum { GroupOnFilter_OutOfDate = -1 };
// a map to count not yet loaded meshes
- static map< int, int > theStudyIDToMeshCounter;
+ static
std::
map< int, int > theStudyIDToMeshCounter;
//================================================================================
/*!
//================================================================================
/*!
@@
-72,8
+74,8
@@
namespace
void meshInfoLoaded( SMESH_Mesh_i* mesh )
{
void meshInfoLoaded( SMESH_Mesh_i* mesh )
{
- map< int, int >::iterator id2counter =
- theStudyIDToMeshCounter.insert( make_pair( (int) mesh->GetStudyId(), 0 )).first;
+
std::
map< int, int >::iterator id2counter =
+ theStudyIDToMeshCounter.insert(
std::
make_pair( (int) mesh->GetStudyId(), 0 )).first;
id2counter->second++;
}
//================================================================================
id2counter->second++;
}
//================================================================================
@@
-88,7
+90,7
@@
namespace
{
if ( --theStudyIDToMeshCounter[ (int) mesh->GetStudyId() ] == 0 )
{
{
if ( --theStudyIDToMeshCounter[ (int) mesh->GetStudyId() ] == 0 )
{
- string tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile );
+ st
d::st
ring tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile );
SALOMEDS::ListOfFileNames_var aFiles = new SALOMEDS::ListOfFileNames;
aFiles->length(2);
SALOMEDS::ListOfFileNames_var aFiles = new SALOMEDS::ListOfFileNames;
aFiles->length(2);
@@
-109,7
+111,7
@@
namespace
class SignalToGUI
{
class SignalToGUI
{
- st
ring
_messagePrefix;
+ st
d::string
_messagePrefix;
SALOME::Session_var _session;
public:
SignalToGUI( SMESH_Mesh_i* mesh )
SALOME::Session_var _session;
public:
SignalToGUI( SMESH_Mesh_i* mesh )
@@
-127,7
+129,7
@@
namespace
_messagePrefix = "SMESH/mesh_loading/";
_messagePrefix += meshEntry.in();
_messagePrefix = "SMESH/mesh_loading/";
_messagePrefix += meshEntry.in();
- string msgToGUI = _messagePrefix + "/";
+ st
d::st
ring msgToGUI = _messagePrefix + "/";
msgToGUI += SMESH_Comment( mesh->NbNodes() );
msgToGUI += "/";
msgToGUI += SMESH_Comment( mesh->NbElements() );
msgToGUI += SMESH_Comment( mesh->NbNodes() );
msgToGUI += "/";
msgToGUI += SMESH_Comment( mesh->NbElements() );
@@
-140,7
+142,7
@@
namespace
{
if ( !_messagePrefix.empty() )
{
{
if ( !_messagePrefix.empty() )
{
- string msgToGUI = _messagePrefix + "/stop";
+ st
d::st
ring msgToGUI = _messagePrefix + "/stop";
_session->emitMessageOneWay( msgToGUI.c_str());
_messagePrefix.clear();
}
_session->emitMessageOneWay( msgToGUI.c_str());
_messagePrefix.clear();
}
@@
-173,7
+175,7
@@
namespace
SMDS_PositionPtr vertexPosition() const { return SMDS_PositionPtr( new SMDS_VertexPosition); }
SMDS_PositionPtr defaultPosition() const { return SMDS_SpacePosition::originSpacePosition(); }
typedef SMDS_PositionPtr (PositionCreator:: * FmakePos)() const;
SMDS_PositionPtr vertexPosition() const { return SMDS_PositionPtr( new SMDS_VertexPosition); }
SMDS_PositionPtr defaultPosition() const { return SMDS_SpacePosition::originSpacePosition(); }
typedef SMDS_PositionPtr (PositionCreator:: * FmakePos)() const;
- vector<FmakePos> myFuncTable;
+
std::
vector<FmakePos> myFuncTable;
};
//================================================================================
};
//================================================================================
@@
-182,12
+184,12
@@
namespace
*/
//================================================================================
*/
//================================================================================
- vector<int> getSimpleSubMeshIds( SMESHDS_Mesh* meshDS, int shapeId )
+
std::
vector<int> getSimpleSubMeshIds( SMESHDS_Mesh* meshDS, int shapeId )
{
{
- vector<int> ids;
+
std::
vector<int> ids;
- list<TopoDS_Shape> shapeQueue( 1, meshDS->IndexToShape( shapeId ));
- list<TopoDS_Shape>::iterator shape = shapeQueue.begin();
+
std::
list<TopoDS_Shape> shapeQueue( 1, meshDS->IndexToShape( shapeId ));
+
std::
list<TopoDS_Shape>::iterator shape = shapeQueue.begin();
for ( ; shape != shapeQueue.end(); ++shape )
{
if ( shape->IsNull() ) continue;
for ( ; shape != shapeQueue.end(); ++shape )
{
if ( shape->IsNull() ) continue;
@@
-222,10
+224,10
@@
namespace
*/
//================================================================================
*/
//================================================================================
- typedef map< MED::EGeometrieElement, SMDSAbs_EntityType > Tmed2smeshElemTypeMap;
+ typedef
std::
map< MED::EGeometrieElement, SMDSAbs_EntityType > Tmed2smeshElemTypeMap;
const Tmed2smeshElemTypeMap& med2smeshElemTypeMap()
{
const Tmed2smeshElemTypeMap& med2smeshElemTypeMap()
{
- static
map< MED::EGeometrieElement, SMDSAbs_EntityType>
med2smeshTypes;
+ static
Tmed2smeshElemTypeMap
med2smeshTypes;
if ( med2smeshTypes.empty() )
{
for ( int iG = 0; iG < SMDSEntity_Last; ++iG )
if ( med2smeshTypes.empty() )
{
for ( int iG = 0; iG < SMDSEntity_Last; ++iG )
@@
-233,7
+235,7
@@
namespace
SMDSAbs_EntityType smdsType = (SMDSAbs_EntityType) iG;
MED::EGeometrieElement medType =
(MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType );
SMDSAbs_EntityType smdsType = (SMDSAbs_EntityType) iG;
MED::EGeometrieElement medType =
(MED::EGeometrieElement) DriverMED::GetMedGeoType( smdsType );
- med2smeshTypes.insert( make_pair( medType, smdsType ));
+ med2smeshTypes.insert(
std::
make_pair( medType, smdsType ));
}
}
return med2smeshTypes;
}
}
return med2smeshTypes;
@@
-254,7
+256,7
@@
namespace
// change at insertion of new items in the middle.
//const vector<MED::EGeometrieElement>& medTypes = mesh2medElemType();
// change at insertion of new items in the middle.
//const vector<MED::EGeometrieElement>& medTypes = mesh2medElemType();
- vector<int> data;
+
std::
vector<int> data;
for ( size_t i = 0; i < meshInfo->length(); ++i )
if ( meshInfo[i] > 0 )
for ( size_t i = 0; i < meshInfo->length(); ++i )
if ( meshInfo[i] > 0 )
@@
-298,7
+300,7
@@
void SMESH_PreMeshInfo::hdf2meshInfo( const std::string& name,
// // array->GetDim( datasetSize );
// int size = dataset->GetSize();
// // array->GetDim( datasetSize );
// int size = dataset->GetSize();
- vector<int> info( SMDSEntity_Last * 2, 0 );
+
std::
vector<int> info( SMDSEntity_Last * 2, 0 );
dataset->ReadFromDisk( &info[0] );
dataset->CloseOnDisk();
dataset->ReadFromDisk( &info[0] );
dataset->CloseOnDisk();
@@
-429,7
+431,7
@@
bool SMESH_PreMeshInfo::readPreInfoFromHDF()
group_i->changePreMeshInfo() = newInstance();
if ( SMESHDS_GroupBase* group = group_i->GetGroupDS() )
{
group_i->changePreMeshInfo() = newInstance();
if ( SMESHDS_GroupBase* group = group_i->GetGroupDS() )
{
- const string name = group->GetStoreName();
+ const st
d::st
ring name = group->GetStoreName();
group_i->changePreMeshInfo()->hdf2meshInfo( name, infoHdfGroup );
}
}
group_i->changePreMeshInfo()->hdf2meshInfo( name, infoHdfGroup );
}
}
@@
-499,7
+501,7
@@
void SMESH_PreMeshInfo::readGroupInfo()
if ( _mesh->_mapGroups.empty() ) return;
// make SMESH_PreMeshInfo of groups
if ( _mesh->_mapGroups.empty() ) return;
// make SMESH_PreMeshInfo of groups
- map< string, SMESH_PreMeshInfo* > name2GroupInfo;
+ map< st
d::st
ring, SMESH_PreMeshInfo* > name2GroupInfo;
map<int, SMESH::SMESH_GroupBase_ptr>::const_iterator i2group = _mesh->_mapGroups.begin();
for ( ; i2group != _mesh->_mapGroups.end(); ++i2group )
{
map<int, SMESH::SMESH_GroupBase_ptr>::const_iterator i2group = _mesh->_mapGroups.begin();
for ( ; i2group != _mesh->_mapGroups.end(); ++i2group )
{
@@
-510,8
+512,8
@@
void SMESH_PreMeshInfo::readGroupInfo()
group_i->changePreMeshInfo() = info;
if ( SMESHDS_Group* group = dynamic_cast< SMESHDS_Group* >( group_i->GetGroupDS() ))
{
group_i->changePreMeshInfo() = info;
if ( SMESHDS_Group* group = dynamic_cast< SMESHDS_Group* >( group_i->GetGroupDS() ))
{
- string name = group->GetStoreName();
- name2GroupInfo.insert( make_pair( name, info ));
+ st
d::st
ring name = group->GetStoreName();
+ name2GroupInfo.insert(
std::
make_pair( name, info ));
info->_isInfoOk = true;
}
}
info->_isInfoOk = true;
}
}
@@
-534,8
+536,8
@@
void SMESH_PreMeshInfo::readGroupInfo()
vector< SMESH_PreMeshInfo* >& grInfoVec = famId2grInfo[ medFamInfo->GetId() ];
for ( int iG = 0; iG < nbGroups; ++iG )
{
vector< SMESH_PreMeshInfo* >& grInfoVec = famId2grInfo[ medFamInfo->GetId() ];
for ( int iG = 0; iG < nbGroups; ++iG )
{
- const string grName = medFamInfo->GetGroupName( iG );
- map< string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.find( grName );
+ const st
d::st
ring grName = medFamInfo->GetGroupName( iG );
+ map< st
d::st
ring, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.find( grName );
if ( n2i != name2GroupInfo.end() )
grInfoVec.push_back( n2i->second );
}
if ( n2i != name2GroupInfo.end() )
grInfoVec.push_back( n2i->second );
}
@@
-560,14
+562,14
@@
void SMESH_PreMeshInfo::readGroupInfo()
f2infos = famId2grInfo.find( famNums[i] );
if ( f2infos == famId2grInfo.end() )
f2infos = famId2grInfo.insert
f2infos = famId2grInfo.find( famNums[i] );
if ( f2infos == famId2grInfo.end() )
f2infos = famId2grInfo.insert
- ( make_pair( famNums[i], vector< SMESH_PreMeshInfo*>())).first;
+ (
std::
make_pair( famNums[i], vector< SMESH_PreMeshInfo*>())).first;
}
vector< SMESH_PreMeshInfo* >& infoVec = f2infos->second ;
for ( size_t j = 0; j < infoVec.size(); ++j )
infoVec[j]->_elemCounter++;
}
// pass _elemCounter to a real elem type
}
vector< SMESH_PreMeshInfo* >& infoVec = f2infos->second ;
for ( size_t j = 0; j < infoVec.size(); ++j )
infoVec[j]->_elemCounter++;
}
// pass _elemCounter to a real elem type
- map< string, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.begin();
+ map< st
d::st
ring, SMESH_PreMeshInfo* >::iterator n2i = name2GroupInfo.begin();
for ( ; n2i != name2GroupInfo.end(); ++n2i )
{
SMESH_PreMeshInfo* info = n2i->second;
for ( ; n2i != name2GroupInfo.end(); ++n2i )
{
SMESH_PreMeshInfo* info = n2i->second;
@@
-618,7
+620,7
@@
void SMESH_PreMeshInfo::readSubMeshInfo()
for ( int isNode = 0; isNode < 2; ++isNode )
{
for ( int isNode = 0; isNode < 2; ++isNode )
{
- string aDSName( isNode ? "Node Submeshes" : "Element Submeshes");
+ st
d::st
ring aDSName( isNode ? "Node Submeshes" : "Element Submeshes");
if ( aGroup->ExistInternalObject( (char*) aDSName.c_str() ))
{
// read sub-mesh id of all nodes or elems
if ( aGroup->ExistInternalObject( (char*) aDSName.c_str() ))
{
// read sub-mesh id of all nodes or elems
@@
-893,7
+895,7
@@
void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const
SMDS_ElemIteratorPtr eIt = meshDS->elementsIterator();
for ( int isNode = 0; isNode < 2; ++isNode )
{
SMDS_ElemIteratorPtr eIt = meshDS->elementsIterator();
for ( int isNode = 0; isNode < 2; ++isNode )
{
- string aDSName( isNode ? "Node Submeshes" : "Element Submeshes");
+ st
d::st
ring aDSName( isNode ? "Node Submeshes" : "Element Submeshes");
if ( aGroup->ExistInternalObject( (char*) aDSName.c_str() ))
{
HDFdataset* aDataset = new HDFdataset( (char*) aDSName.c_str(), aGroup );
if ( aGroup->ExistInternalObject( (char*) aDSName.c_str() ))
{
HDFdataset* aDataset = new HDFdataset( (char*) aDSName.c_str(), aGroup );
@@
-919,7
+921,7
@@
void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const
#endif
nbElems = elemSet.size();
}
#endif
nbElems = elemSet.size();
}
- // add elements to submeshes
+ // add elements to sub
-
meshes
TIDSortedElemSet::iterator iE = elemSet.begin();
for ( size_t i = 0; i < nbElems; ++i, ++iE )
{
TIDSortedElemSet::iterator iE = elemSet.begin();
for ( size_t i = 0; i < nbElems; ++i, ++iE )
{