fix after review. Build completed

This commit is contained in:
Viktor UZLOV 2021-02-10 16:59:04 +03:00
parent e0662f4678
commit a9c899c3a0
42 changed files with 195 additions and 194 deletions

View File

@ -2092,7 +2092,7 @@ double MultiConnection2D::GetValue( long theElementId )
if (!anIter) break;
const SMDS_MeshNode *aNode, *aNode0 = 0;
NCollection_Map< smIdType > aMap, aMapPrev;
NCollection_Map< smIdType, smIdHasher > aMap, aMapPrev;
for (i = 0; i <= len; i++) {
aMapPrev = aMap;
@ -3131,7 +3131,7 @@ bool ConnectedElements::IsSatisfy( long theElementId )
while ( nIt->more() )
{
const SMDS_MeshNode* n = static_cast< const SMDS_MeshNode* >( nIt->next() );
if ( checkedNodeIDs.insert( n->GetID()) )
if ( checkedNodeIDs.insert( n->GetID()).second )
nodeQueue.push_back( n );
}
}
@ -3281,7 +3281,7 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr )
TColStd_SequenceOfInteger anIntSeq;
TColStd_SequenceOfAsciiString aStrSeq;
TColStd_MapIteratorOfMapOfInteger anIter( myIds );
TIDsMap::Iterator anIter( myIds );
for ( ; anIter.More(); anIter.Next() )
{
int anId = anIter.Key();
@ -3290,19 +3290,19 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr )
aStrSeq.Append( aStr );
}
for ( int i = 1, n = myMin.Length(); i <= n; i++ )
for ( smIdType i = 1, n = myMin.size(); i <= n; i++ )
{
int aMinId = myMin( i );
int aMaxId = myMax( i );
smIdType aMinId = myMin[i];
smIdType aMaxId = myMax[i];
TCollection_AsciiString aStr;
if ( aMinId != IntegerFirst() )
aStr += aMinId;
aStr += FromIdType<int>(aMinId);
aStr += "-";
if ( aMaxId != IntegerLast() )
aStr += aMaxId;
aStr += FromIdType<int>(aMaxId);
// find position of the string in result sequence and insert string in it
if ( anIntSeq.Length() == 0 )
@ -3351,8 +3351,8 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr )
//=======================================================================
bool RangeOfIds::SetRangeStr( const TCollection_AsciiString& theStr )
{
myMin.Clear();
myMax.Clear();
myMin.clear();
myMax.clear();
myIds.Clear();
TCollection_AsciiString aStr = theStr;
@ -3390,8 +3390,8 @@ bool RangeOfIds::SetRangeStr( const TCollection_AsciiString& theStr )
(!aMaxStr.IsEmpty() && !aMaxStr.IsIntegerValue()) )
return false;
myMin.Append( aMinStr.IsEmpty() ? IntegerFirst() : aMinStr.IntegerValue() );
myMax.Append( aMaxStr.IsEmpty() ? IntegerLast() : aMaxStr.IntegerValue() );
myMin.push_back( aMinStr.IsEmpty() ? IntegerFirst() : aMinStr.IntegerValue() );
myMax.push_back( aMaxStr.IsEmpty() ? IntegerLast() : aMaxStr.IntegerValue() );
}
}
@ -3440,8 +3440,8 @@ bool RangeOfIds::IsSatisfy( long theId )
if ( myIds.Contains( theId ) )
return true;
for ( int i = 1, n = myMin.Length(); i <= n; i++ )
if ( theId >= myMin( i ) && theId <= myMax( i ) )
for ( int i = 1, n = myMin.size(); i <= n; i++ )
if ( theId >= myMin[i] && theId <= myMax[i] )
return true;
return false;
@ -4199,7 +4199,7 @@ void ElementsOnSurface::process( const SMDS_MeshElement* theElemPtr )
}
}
if ( isSatisfy )
myIds.Add( heElemPtr->GetID() );
myIds.Add( theElemPtr->GetID() );
}
bool ElementsOnSurface::isOnSurface( const SMDS_MeshNode* theNode )

View File

@ -58,7 +58,7 @@ class ShapeAnalysis_Surface;
class gp_Pln;
class gp_Pnt;
typedef NCollection_Map< smIdType > TIDsMap;
typedef NCollection_Map< smIdType, smIdHasher > TIDsMap;
namespace SMESH{
namespace Controls{

View File

@ -2495,7 +2495,7 @@ void SMESH_ActorDef::UpdateDistribution()
SMESH_VisualObjDef::TEntityList elems;
if ( dynamic_cast<SMESH_SubMeshObj*>(myVisualObj.get()))
dynamic_cast<SMESH_SubMeshObj*>(myVisualObj.get())->GetEntities( fun->GetType(), elems );
std::vector<int> elemIds; elemIds.reserve( elems.size() );
std::vector<smIdType> elemIds; elemIds.reserve( elems.size() );
for ( SMESH_VisualObjDef::TEntityList::iterator e = elems.begin(); e != elems.end(); ++e)
elemIds.push_back( (*e)->GetID());
vtkLookupTable* lookupTable = static_cast<vtkLookupTable*>(myScalarBarActor->GetLookupTable());
@ -2681,7 +2681,7 @@ SPlot2d_Histogram* SMESH_ActorDef::UpdatePlot2Histogram()
SMESH_VisualObjDef::TEntityList elems;
if ( dynamic_cast<SMESH_SubMeshObj*>(myVisualObj.get()))
dynamic_cast<SMESH_SubMeshObj*>(myVisualObj.get())->GetEntities( fun->GetType(), elems );
std::vector<int> elemIds;
std::vector<smIdType> elemIds;
for ( SMESH_VisualObjDef::TEntityList::iterator e = elems.begin(); e != elems.end(); ++e)
elemIds.push_back( (*e)->GetID());

View File

@ -157,7 +157,7 @@ namespace SMESH
}
}
std::map<SMDSAbs_ElementType,int> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
std::map<SMDSAbs_ElementType,smIdType> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
std::map<SMDSAbs_ElementType,smIdType> entities;
entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_0DElement,
theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0));

View File

@ -491,10 +491,10 @@ void SMESH_VisualObjDef::buildElemPrs()
// function : GetEdgeNodes
// purpose : Retrieve ids of nodes from edge of elements ( edge is numbered from 0 )
//=================================================================================
bool SMESH_VisualObjDef::GetEdgeNodes( const int theElemId,
const int theEdgeNum,
int& theNodeId1,
int& theNodeId2 ) const
bool SMESH_VisualObjDef::GetEdgeNodes( const smIdType theElemId,
const int theEdgeNum,
smIdType& theNodeId1,
smIdType& theNodeId2 ) const
{
const SMDS_Mesh* aMesh = GetMesh();
if ( aMesh == 0 )
@ -681,7 +681,7 @@ bool SMESH_MeshObj::NulData()
// function : GetElemDimension
// purpose : Get dimension of element
//=================================================================================
int SMESH_MeshObj::GetElemDimension( const int theObjId )
int SMESH_MeshObj::GetElemDimension( const smIdType theObjId )
{
const SMDS_MeshElement* anElem = myClient->FindElement( theObjId );
if ( anElem == 0 )
@ -703,7 +703,7 @@ int SMESH_MeshObj::GetElemDimension( const int theObjId )
// function : GetEntities
// purpose : Get entities of specified type. Return number of entities
//=================================================================================
int SMESH_MeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
smIdType SMESH_MeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
{
switch ( theType )
{
@ -742,7 +742,7 @@ int SMESH_MeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
}
}
int SMESH_MeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityList& theObjs ) const
smIdType SMESH_MeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityList& theObjs ) const
{
theObjs.clear();
@ -834,7 +834,7 @@ SMESH_SubMeshObj::~SMESH_SubMeshObj()
// function : GetElemDimension
// purpose : Get dimension of element
//=================================================================================
int SMESH_SubMeshObj::GetElemDimension( const int theObjId )
int SMESH_SubMeshObj::GetElemDimension( const smIdType theObjId )
{
return myMeshObj == 0 ? 0 : myMeshObj->GetElemDimension( theObjId );
}
@ -962,7 +962,7 @@ static int getPointers( const SMDSAbs_ElementType theRequestType,
// function : GetEntities
// purpose : Get entities of specified type. Return number of entities
//=================================================================================
int SMESH_GroupObj::GetNbEntities( const SMDSAbs_ElementType theType) const
smIdType SMESH_GroupObj::GetNbEntities( const SMDSAbs_ElementType theType) const
{
if(SMDSAbs_ElementType(myGroupServer->GetType()) == theType) {
return myGroupServer->Size();
@ -973,7 +973,7 @@ int SMESH_GroupObj::GetNbEntities( const SMDSAbs_ElementType theType) const
return 0;
}
int SMESH_GroupObj::GetEntities( const SMDSAbs_ElementType theType, TEntityList& theResList ) const
smIdType SMESH_GroupObj::GetEntities( const SMDSAbs_ElementType theType, TEntityList& theResList ) const
{
theResList.clear();
SMDS_Mesh* aMesh = myMeshObj->GetMesh();
@ -1028,7 +1028,7 @@ SMESH_subMeshObj::~SMESH_subMeshObj()
// function : GetEntities
// purpose : Get entities of specified type. Return number of entities
//=================================================================================
int SMESH_subMeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
smIdType SMESH_subMeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
{
switch ( theType )
{
@ -1053,7 +1053,7 @@ int SMESH_subMeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
}
}
int SMESH_subMeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityList& theResList ) const
smIdType SMESH_subMeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityList& theResList ) const
{
theResList.clear();

View File

@ -45,6 +45,7 @@
#include "SMDSAbs_ElementType.hxx"
#include <SALOMEconfig.h>
#include <smIdType.hxx>
#include CORBA_SERVER_HEADER(SMESH_Mesh)
class SMDS_Mesh;

View File

@ -160,7 +160,7 @@ public:
virtual bool Update( int theIsClear = true );
virtual void UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor );
virtual int GetElemDimension( const smidtype theObjId );
virtual int GetElemDimension( const smIdType theObjId );
virtual SMDS_Mesh* GetMesh() const { return myMeshObj->GetMesh(); }
virtual SMESH::SMESH_Mesh_ptr GetMeshServer() { return myMeshObj->GetMeshServer(); }
@ -181,8 +181,8 @@ public:
SMESH_GroupObj( SMESH::SMESH_GroupBase_ptr, SMESH_MeshObj* );
virtual ~SMESH_GroupObj();
virtual smidtype GetNbEntities( const SMDSAbs_ElementType) const;
virtual smidtype GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
virtual smIdType GetNbEntities( const SMDSAbs_ElementType) const;
virtual smIdType GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
virtual bool IsNodePrs() const;
virtual SMDSAbs_ElementType GetElementType() const;
@ -206,8 +206,8 @@ public:
SMESH_MeshObj* );
virtual ~SMESH_subMeshObj();
virtual smIdtype GetNbEntities( const SMDSAbs_ElementType) const;
virtual smIdtype GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
virtual smIdType GetNbEntities( const SMDSAbs_ElementType) const;
virtual smIdType GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
virtual bool IsNodePrs() const;
protected:

View File

@ -1917,7 +1917,7 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap)
bool ret = true;
if (_subShape.ShapeType() == TopAbs_VERTEX) {
vector<int> aVec(SMDSEntity_Last,0);
vector<smIdType> aVec(SMDSEntity_Last,0);
aVec[SMDSEntity_Node] = 1;
aResMap.insert(make_pair(this,aVec));
return ret;
@ -1944,7 +1944,7 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap)
SMESH_subMesh* sm = smIt->next();
int dim = SMESH_Gen::GetShapeDim( sm->GetSubShape() );
if (dim < dimToCheck) break; // the rest subMeshes are all of less dimension
const vector<int> & nbs = aResMap[ sm ];
const vector<smIdType> & nbs = aResMap[ sm ];
subMeshEvaluated = (std::accumulate( nbs.begin(), nbs.end(), 0 ) > 0 );
}
if ( !subMeshEvaluated )
@ -1954,7 +1954,7 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap)
if ( IsMeshComputed() )
{
vector<int> & nbEntities = aResMap[ this ];
vector<smIdType> & nbEntities = aResMap[ this ];
nbEntities.resize( SMDSEntity_Last, 0 );
if ( SMESHDS_SubMesh* sm = GetSubMeshDS() )
{
@ -1968,7 +1968,7 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap)
{
ret = algo->Evaluate((*_father), _subShape, aResMap);
}
aResMap.insert( make_pair( this,vector<int>(0)));
aResMap.insert( make_pair( this,vector<smIdType>(0)));
}
return ret;

View File

@ -45,7 +45,7 @@ SMESHDS_Group::SMESHDS_Group (const int theID,
//purpose :
//=======================================================================
int SMESHDS_Group::Extent() const
smIdType SMESHDS_Group::Extent() const
{
return myGroup.Extent();
}
@ -66,7 +66,7 @@ bool SMESHDS_Group::IsEmpty()
*/
//=============================================================================
bool SMESHDS_Group::Contains (const int theID)
bool SMESHDS_Group::Contains (const smIdType theID)
{
const SMDS_MeshElement* aElem = findInMesh (theID);
if (aElem)
@ -92,7 +92,7 @@ bool SMESHDS_Group::Contains (const SMDS_MeshElement* elem)
*/
//=============================================================================
bool SMESHDS_Group::Add (const int theID)
bool SMESHDS_Group::Add (const smIdType theID)
{
return Add( findInMesh( theID ));
}
@ -121,7 +121,7 @@ bool SMESHDS_Group::Add (const SMDS_MeshElement* aElem )
*/
//=============================================================================
bool SMESHDS_Group::Remove (const int theID)
bool SMESHDS_Group::Remove (const smIdType theID)
{
bool removed = false;
if ( const SMDS_MeshElement* aElem = findInMesh( theID ))

View File

@ -75,7 +75,7 @@ smIdType SMESHDS_GroupBase::GetID (const int theIndex)
*/
//=============================================================================
const SMDS_MeshElement* SMESHDS_GroupBase::findInMesh (const int theID) const
const SMDS_MeshElement* SMESHDS_GroupBase::findInMesh (const smIdType theID) const
{
SMDSAbs_ElementType aType = GetType();
const SMDS_MeshElement* aElem = NULL;
@ -107,10 +107,10 @@ void SMESHDS_GroupBase::resetIterator()
//purpose :
//=======================================================================
int SMESHDS_GroupBase::Extent() const
smIdType SMESHDS_GroupBase::Extent() const
{
SMDS_ElemIteratorPtr it = GetElements();
int nb = 0;
smIdType nb = 0;
if ( it )
for ( ; it->more(); it->next() )
nb++;
@ -136,7 +136,7 @@ bool SMESHDS_GroupBase::IsEmpty()
//purpose :
//=======================================================================
bool SMESHDS_GroupBase::Contains (const int theID)
bool SMESHDS_GroupBase::Contains (const smIdType theID)
{
if ( SMDS_ElemIteratorPtr it = GetElements() ) {
while ( it->more() )

View File

@ -79,7 +79,7 @@ void SMESHDS_GroupOnFilter::SetPredicate( const SMESH_PredicatePtr& thePredicate
*/
//================================================================================
int SMESHDS_GroupOnFilter::Extent() const
smIdType SMESHDS_GroupOnFilter::Extent() const
{
update();
return std::accumulate( myMeshInfo.begin(), myMeshInfo.end(), 0 );
@ -120,7 +120,7 @@ bool SMESHDS_GroupOnFilter::IsEmpty()
*/
//================================================================================
bool SMESHDS_GroupOnFilter::Contains (const int theID)
bool SMESHDS_GroupOnFilter::Contains (const smIdType theID)
{
return myPredicate && myPredicate->IsSatisfy( theID );
}
@ -288,7 +288,7 @@ SMDS_ElemIteratorPtr SMESHDS_GroupOnFilter::GetElements() const
*/
//================================================================================
std::vector< int > SMESHDS_GroupOnFilter::GetMeshInfo() const
std::vector< smIdType > SMESHDS_GroupOnFilter::GetMeshInfo() const
{
update();
return myMeshInfo;
@ -325,11 +325,11 @@ int SMESHDS_GroupOnFilter::getElementIds( void* ids, size_t idSize ) const
me->myMeshInfo.assign( SMDSEntity_Last, 0 );
me->myMeshInfo[ firstOkElem->GetEntityType() ]++;
(*(smidtype*) curID) = firstOkElem->GetID();
(*(smIdType*) curID) = firstOkElem->GetID();
for ( curID += idSize; elIt->more(); curID += idSize )
{
const SMDS_MeshElement* e = elIt->next();
(*(smIdtype*) curID) = e->GetID();
(*(smIdType*) curID) = e->GetID();
me->myMeshInfo[ e->GetEntityType() ]++;
}
}

View File

@ -47,7 +47,7 @@ class SMESHDS_EXPORT SMESHDS_GroupOnFilter: public SMESHDS_GroupBase, SMDS_Eleme
SMESH_PredicatePtr GetPredicate() const { return myPredicate; }
std::vector< int > GetMeshInfo() const;
std::vector< smIdType > GetMeshInfo() const;
template< typename IDTYPE >
smIdType GetElementIds( IDTYPE* ids ) const

View File

@ -132,7 +132,7 @@ SMDS_ElemIteratorPtr SMESHDS_GroupOnGeom::GetElements() const
//purpose :
//=======================================================================
bool SMESHDS_GroupOnGeom::Contains (const int theID)
bool SMESHDS_GroupOnGeom::Contains (const smIdType theID)
{
return mySubMesh->Contains( findInMesh( theID ));
}

View File

@ -1216,7 +1216,7 @@ namespace
SMESH::Controls::NumericalFunctor* aNumFun =
dynamic_cast<SMESH::Controls::NumericalFunctor*>( aFunctor.get() );
if ( aNumFun ) {
std::vector<int> elements;
std::vector<SMESH::smIdType> elements;
SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIO);
if ( mesh->_is_nil() ) {
SMESH::SMESH_IDSource_var idSource =

View File

@ -45,7 +45,7 @@ void SMESHGUI_PreVisualObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& th
if ( theFunctor ) theFunctor->SetMesh( GetMesh() );
}
int SMESHGUI_PreVisualObj::GetElemDimension( const int theObjId )
int SMESHGUI_PreVisualObj::GetElemDimension( const smIdType theObjId )
{
if ( const SMDS_MeshElement* anElem = myMesh->FindElement( theObjId ))
{
@ -62,7 +62,7 @@ int SMESHGUI_PreVisualObj::GetElemDimension( const int theObjId )
return -1;
}
int SMESHGUI_PreVisualObj::GetNbEntities( const SMDSAbs_ElementType theType ) const
smIdType SMESHGUI_PreVisualObj::GetNbEntities( const SMDSAbs_ElementType theType ) const
{
return myMesh->GetMeshInfo().NbElements( theType );
}
@ -77,10 +77,10 @@ SMESH::SMESH_Mesh_ptr SMESHGUI_PreVisualObj::GetMeshServer()
// purpose : Retrieve ids of nodes from edge of elements ( edge is numbered from 1 )
//=================================================================================
bool SMESHGUI_PreVisualObj::GetEdgeNodes( const int theElemId,
const int theEdgeNum,
int& theNodeId1,
int& theNodeId2 ) const
bool SMESHGUI_PreVisualObj::GetEdgeNodes( const smIdType theElemId,
const int theEdgeNum,
smIdType& theNodeId1,
smIdType& theNodeId2 ) const
{
const SMDS_MeshElement* e = myMesh->FindElement( theElemId );
if ( !e || e->GetType() != SMDSAbs_Face )

View File

@ -51,13 +51,13 @@ class SMESHGUI_EXPORT SMESHGUI_PreVisualObj : public SMESH_VisualObj
virtual bool Update( int theIsClear );
virtual bool NulData() { return false; }
virtual void UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor );
virtual int GetElemDimension( const int theObjId );
virtual int GetNbEntities( const SMDSAbs_ElementType theType) const;
virtual int GetElemDimension( const smIdType theObjId );
virtual smIdType GetNbEntities( const SMDSAbs_ElementType theType) const;
virtual bool IsValid() const;
virtual bool GetEdgeNodes( const int theElemId,
const int theEdgeNum,
int& theNodeId1,
int& theNodeId2 ) const;
virtual bool GetEdgeNodes( const smIdType theElemId,
const int theEdgeNum,
smIdType& theNodeId1,
smIdType& theNodeId2 ) const;
virtual vtkIdType GetNodeObjId( int theVTKID );
virtual vtkIdType GetNodeVTKId( int theObjID );

View File

@ -1226,8 +1226,8 @@ namespace SMESH
int GetEdgeNodes(SVTK_Selector* theSelector,
const TVisualObjPtr& theVisualObject,
int& theId1,
int& theId2)
smIdType& theId1,
smIdType& theId2)
{
const SALOME_ListIO& selected = theSelector->StoredIObjects();
@ -1243,9 +1243,9 @@ namespace SMESH
if ( aMapIndex.Extent() != 2 )
return -1;
int anObjId = -1, anEdgeNum = -1;
for ( int i = 1; i <= aMapIndex.Extent(); i++ ) {
int aVal = aMapIndex( i );
smIdType anObjId = -1, anEdgeNum = -1;
for ( smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
smIdType aVal = aMapIndex( i );
if ( aVal > 0 )
anObjId = aVal;
else
@ -1343,7 +1343,7 @@ namespace SMESH
}
int GetEdgeNodes( LightApp_SelectionMgr* theMgr, int& theId1, int& theId2 )
int GetEdgeNodes( LightApp_SelectionMgr* theMgr, smIdType& theId1, smIdType& theId2 )
{
SALOME_ListIO selected; theMgr->selectedObjects( selected );
@ -1363,9 +1363,9 @@ namespace SMESH
if ( aMapIndex.Extent() != 2 )
return -1;
int anObjId = -1, anEdgeNum = -1;
for ( int i = 1; i <= aMapIndex.Extent(); i++ ) {
int aVal = aMapIndex( i );
smIdType anObjId = -1, anEdgeNum = -1;
for ( smIdType i = 1; i <= aMapIndex.Extent(); i++ ) {
smIdType aVal = aMapIndex( i );
if ( aVal > 0 )
anObjId = aVal;
else

View File

@ -169,7 +169,7 @@ SMESHGUI_EXPORT
const Handle(SALOME_InteractiveObject)&,
QString& );
SMESHGUI_EXPORT
int GetEdgeNodes( SVTK_Selector*, const TVisualObjPtr&, int&, int& );
int GetEdgeNodes( SVTK_Selector*, const TVisualObjPtr&, smIdType&, smIdType& );
//----------------------------------------------------------------------------
SMESHGUI_EXPORT
@ -189,7 +189,7 @@ SMESHGUI_EXPORT
const bool = true );
SMESHGUI_EXPORT
int GetEdgeNodes( LightApp_SelectionMgr*, int&, int& );
int GetEdgeNodes( LightApp_SelectionMgr*, smIdType&, smIdType& );
SMESHGUI_EXPORT
void SetControlsPrecision( const long );

View File

@ -380,10 +380,10 @@ namespace
*/
//================================================================================
void findGroups( const SMDS_MeshElement * theFace,
TGroupVec & theGroupsToUpdate,
NCollection_DataMap< smIdType, TGroupVec > & theFaceID2Groups,
TGroupVec & theWorkGroups )
void findGroups( const SMDS_MeshElement * theFace,
TGroupVec & theGroupsToUpdate,
NCollection_DataMap< smIdType, TGroupVec, smIdHasher > & theFaceID2Groups,
TGroupVec & theWorkGroups )
{
theWorkGroups.clear();
for ( size_t i = 0; i < theGroupsToUpdate.size(); ++i )
@ -583,7 +583,7 @@ SMESH_MeshAlgos::MakeSlot( SMDS_ElemIteratorPtr theSegmentIt,
std::vector< SMESH_NodeXYZ > facePoints(4);
std::vector< Intersector::TFace > cutFacePoints;
NCollection_DataMap< smIdType, TGroupVec > faceID2Groups;
NCollection_DataMap< smIdType, TGroupVec, smIdHasher > faceID2Groups;
TGroupVec groupVec;
std::vector< gp_Ax1 > planeNormalVec(2);

View File

@ -228,7 +228,7 @@ SMESH::Histogram* NumericalFunctor_i::GetHistogram(CORBA::Short nbIntervals, COR
{
std::vector<int> nbEvents;
std::vector<double> funValues;
std::vector<int> elements;
std::vector<SMESH::smIdType> elements;
myNumericalFunctorPtr->GetHistogram(nbIntervals,nbEvents,funValues,elements,0,isLogarithmic);
SMESH::Histogram_var histogram = new SMESH::Histogram;
@ -255,9 +255,9 @@ SMESH::Histogram* NumericalFunctor_i::GetLocalHistogram(CORBA::Short
{
SMESH::Histogram_var histogram = new SMESH::Histogram;
std::vector<int> nbEvents;
std::vector<double> funValues;
std::vector<int> elements;
std::vector<int> nbEvents;
std::vector<double> funValues;
std::vector<SMESH::smIdType> elements;
SMDS_ElemIteratorPtr elemIt;
if ( SMESH::DownCast< SMESH_GroupOnFilter_i* >( object ) ||

View File

@ -2372,7 +2372,7 @@ SMESH::smIdType_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
/*CORBA::Boolean ret =*/ myGen.Evaluate( myLocMesh, myLocShape, aResMap);
MapShapeNbElemsItr anIt = aResMap.begin();
for(; anIt!=aResMap.end(); anIt++) {
const vector<int>& aVec = (*anIt).second;
const vector<smIdType>& aVec = (*anIt).second;
for ( i = SMESH::Entity_Node; i < (int)aVec.size(); i++ ) {
int nbElem = aVec[i];
if ( nbElem < 0 ) // algo failed, check that it has reported a message

View File

@ -286,7 +286,7 @@ public:
* returns statistic of mesh elements
* Result array of number enityties
*/
SMESH::long_array* Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
SMESH::smIdType_array* Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr theShapeObject);
// Returns true if mesh contains enough data to be computed

View File

@ -209,7 +209,7 @@ SMESH::ElementType SMESH_GroupBase_i::GetType()
*/
//=============================================================================
CORBA::smIdType SMESH_GroupBase_i::Size()
SMESH::smIdType SMESH_GroupBase_i::Size()
{
if ( myPreMeshInfo )
return GetType() == SMESH::NODE ? myPreMeshInfo->NbNodes() : myPreMeshInfo->NbElements();
@ -361,7 +361,7 @@ SMESH::smIdType SMESH_Group_i::Remove( const SMESH::smIdType_array& theIDs )
*/
//=============================================================================
typedef bool (SMESHDS_Group::*TFunChangeGroup)(const int);
typedef bool (SMESHDS_Group::*TFunChangeGroup)(const smIdType);
CORBA::Long
ChangeByPredicate( SMESH::Predicate_i* thePredicate,
@ -938,7 +938,7 @@ SMESH::smIdType_array* SMESH_GroupOnFilter_i::GetMeshInfo()
if ( g->GetType() != SMDSAbs_Node )
{
std::vector< int > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo();
std::vector< SMESH::smIdType > nbElems = static_cast< SMESHDS_GroupOnFilter* >( g )->GetMeshInfo();
for ( size_t i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
if ( i < nbElems.size() )
aRes[i] = nbElems[ i ];

View File

@ -93,7 +93,7 @@ public:
SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::smIdType_array& IDsOfElements,
SMESH::ElementType type);
static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, int& nbIds );
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, smIdType& nbIds );
/*!
* \brief Generates the unique group name

View File

@ -1121,32 +1121,32 @@ bool StdMeshers_CompositeHexa_3D::Evaluate(SMESH_Mesh& theMesh,
lessComplexSide = & *face;
// Get an 1D size of lessComplexSide
int nbSeg1 = 0;
smIdType nbSeg1 = 0;
vector<TopoDS_Edge> edges;
if ( !lessComplexSide->GetHoriEdges(edges) )
return false;
for ( size_t i = 0; i < edges.size(); ++i )
{
const vector<int>& nbElems = aResMap[ theMesh.GetSubMesh( edges[i] )];
const vector<smIdType>& nbElems = aResMap[ theMesh.GetSubMesh( edges[i] )];
if ( !nbElems.empty() )
nbSeg1 += Max( nbElems[ SMDSEntity_Edge ], nbElems[ SMDSEntity_Quad_Edge ]);
nbSeg1 += std::max( nbElems[ SMDSEntity_Edge ], nbElems[ SMDSEntity_Quad_Edge ]);
}
// Get an 1D size of a box side orthogonal to lessComplexSide
int nbSeg2 = 0;
smIdType nbSeg2 = 0;
_QuadFaceGrid* ortoSide =
lessComplexSide->FindAdjacentForSide( Q_LEFT, boxFaceContainer, B_UNDEFINED );
edges.clear();
if ( !ortoSide || !ortoSide->GetHoriEdges(edges) ) return false;
for ( size_t i = 0; i < edges.size(); ++i )
{
const vector<int>& nbElems = aResMap[ theMesh.GetSubMesh( edges[i] )];
const vector<smIdType>& nbElems = aResMap[ theMesh.GetSubMesh( edges[i] )];
if ( !nbElems.empty() )
nbSeg2 += Max( nbElems[ SMDSEntity_Edge ], nbElems[ SMDSEntity_Quad_Edge ]);
nbSeg2 += std::max( nbElems[ SMDSEntity_Edge ], nbElems[ SMDSEntity_Quad_Edge ]);
}
// Get an 2D size of a box side orthogonal to lessComplexSide
int nbFaces = 0, nbQuadFace = 0;
smIdType nbFaces = 0, nbQuadFace = 0;
list< TopoDS_Face > sideFaces;
if ( ortoSide->IsComplex() )
for ( _QuadFaceGrid::TChildIterator child = ortoSide->GetChildren(); child.more(); )
@ -1157,7 +1157,7 @@ bool StdMeshers_CompositeHexa_3D::Evaluate(SMESH_Mesh& theMesh,
list< TopoDS_Face >::iterator f = sideFaces.begin();
for ( ; f != sideFaces.end(); ++f )
{
const vector<int>& nbElems = aResMap[ theMesh.GetSubMesh( *f )];
const vector<smIdType>& nbElems = aResMap[ theMesh.GetSubMesh( *f )];
if ( !nbElems.empty() )
{
nbFaces = nbElems[ SMDSEntity_Quadrangle ];
@ -1166,8 +1166,8 @@ bool StdMeshers_CompositeHexa_3D::Evaluate(SMESH_Mesh& theMesh,
}
// Fill nb of elements
vector<int> aResVec(SMDSEntity_Last,0);
int nbSeg3 = ( nbFaces + nbQuadFace ) / nbSeg2;
vector<smIdType> aResVec(SMDSEntity_Last,0);
smIdType nbSeg3 = ( nbFaces + nbQuadFace ) / nbSeg2;
aResVec[SMDSEntity_Node] = (nbSeg1-1) * (nbSeg2-1) * (nbSeg3-1);
aResVec[SMDSEntity_Hexa] = nbSeg1 * nbFaces;
aResVec[SMDSEntity_Quad_Hexa] = nbSeg1 * nbQuadFace;

View File

@ -1200,7 +1200,7 @@ bool StdMeshers_HexaFromSkin_3D::Evaluate(SMESH_Mesh & aMesh,
bool secondOrder = aMesh.NbFaces( ORDER_QUADRATIC );
int entity = secondOrder ? SMDSEntity_Quad_Hexa : SMDSEntity_Hexa;
vector<int>& nbByType = aResMap[ aMesh.GetSubMesh( aShape )];
vector<smIdType>& nbByType = aResMap[ aMesh.GetSubMesh( aShape )];
if ( entity >= (int) nbByType.size() )
nbByType.resize( SMDSEntity_Last, 0 );

View File

@ -988,7 +988,7 @@ bool StdMeshers_Hexa_3D::Evaluate(SMESH_Mesh & aMesh,
TopoDS_Shape aFace = aFaces.Value(i+1);
SMESH_Algo *algo = _gen->GetAlgo(aMesh, aFace);
if( !algo ) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
@ -1001,8 +1001,8 @@ bool StdMeshers_Hexa_3D::Evaluate(SMESH_Mesh & aMesh,
if (algoName == "Quadrangle_2D") {
MapShapeNbElemsItr anIt = aResMap.find(meshFaces[i]);
if( anIt == aResMap.end() ) continue;
std::vector<int> aVec = (*anIt).second;
int nbtri = Max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
std::vector<smIdType> aVec = (*anIt).second;
smIdType nbtri = std::max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
if( nbtri == 0 )
isAllQuad = true;
}
@ -1022,8 +1022,8 @@ bool StdMeshers_Hexa_3D::Evaluate(SMESH_Mesh & aMesh,
if( sm ) {
MapShapeNbElemsItr anIt = aResMap.find(sm);
if( anIt == aResMap.end() ) continue;
std::vector<int> aVec = (*anIt).second;
nb1d += Max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
std::vector<smIdType> aVec = (*anIt).second;
nb1d += std::max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
if(IsFirst) {
IsQuadratic = (aVec[SMDSEntity_Quad_Edge] > aVec[SMDSEntity_Edge]);
IsFirst = false;
@ -1051,16 +1051,16 @@ bool StdMeshers_Hexa_3D::Evaluate(SMESH_Mesh & aMesh,
if( i == OppNum ) continue;
MapShapeNbElemsItr anIt = aResMap.find( meshFaces[i-1] );
if( anIt == aResMap.end() ) continue;
std::vector<int> aVec = (*anIt).second;
nb2d += Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
std::vector<smIdType> aVec = (*anIt).second;
nb2d += std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
}
MapShapeNbElemsItr anIt = aResMap.find( meshFaces[0] );
std::vector<int> aVec = (*anIt).second;
int nb2d_face0 = Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
int nb0d_face0 = aVec[SMDSEntity_Node];
std::vector<smIdType> aVec = (*anIt).second;
smIdType nb2d_face0 = std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
smIdType nb0d_face0 = aVec[SMDSEntity_Node];
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
if(IsQuadratic) {
aResVec[SMDSEntity_Quad_Hexa] = nb2d_face0 * ( nb2d/nb1d );

View File

@ -1310,7 +1310,7 @@ bool StdMeshers_Import_1D::Evaluate(SMESH_Mesh & theMesh,
if ( srcGroups.empty() )
return error("Invalid source groups");
vector<int> aVec(SMDSEntity_Last,0);
vector<smIdType> aVec(SMDSEntity_Last,0);
bool toCopyMesh, toCopyGroups;
_sourceHyp->GetCopySourceMesh(toCopyMesh, toCopyGroups);

View File

@ -823,7 +823,7 @@ bool StdMeshers_Import_1D2D::Evaluate(SMESH_Mesh & theMesh,
if ( srcGroups.empty() )
return error("Invalid source groups");
vector<int> aVec(SMDSEntity_Last,0);
vector<smIdType> aVec(SMDSEntity_Last,0);
bool toCopyMesh, toCopyGroups;
_sourceHyp->GetCopySourceMesh(toCopyMesh, toCopyGroups);
@ -913,7 +913,7 @@ bool StdMeshers_Import_1D2D::Evaluate(SMESH_Mesh & theMesh,
{
TopoDS_Edge geomEdge = TopoDS::Edge( exp.Current() );
SMESH_subMesh* sm = theMesh.GetSubMesh( geomEdge );
vector<int>& edgeVec = aResMap[sm];
vector<smIdType>& edgeVec = aResMap[sm];
if ( edgeVec.empty() )
{
edgeVec.resize(SMDSEntity_Last,0);

View File

@ -318,7 +318,7 @@ bool StdMeshers_MEFISTO_2D::Evaluate(SMESH_Mesh & aMesh,
TopoDS_Edge E = TopoDS::Edge(exp.Current());
MapShapeNbElemsItr anIt = aResMap.find( aMesh.GetSubMesh(E) );
if( anIt == aResMap.end() ) continue;
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
int nbe = Max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
NbSeg += nbe;
if(IsFirst) {
@ -339,7 +339,7 @@ bool StdMeshers_MEFISTO_2D::Evaluate(SMESH_Mesh & aMesh,
}
}
if(NbSeg<1) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
@ -361,7 +361,7 @@ bool StdMeshers_MEFISTO_2D::Evaluate(SMESH_Mesh & aMesh,
(int)( anArea/(tmpLength*tmpLength*sqrt(3.)/4) );
int nbNodes = (int) ( nbFaces*3 - (NbSeg-1)*2 ) / 6;
std::vector<int> aVec(SMDSEntity_Last);
std::vector<smIdType> aVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i] = 0;
if(IsQuadratic) {
aVec[SMDSEntity_Quad_Triangle] = nbFaces;

View File

@ -1870,16 +1870,16 @@ bool StdMeshers_Penta_3D::Evaluate(SMESH_Mesh& aMesh,
NumBase = 0;
break;
}
std::vector<int> aVec = (*anIt).second;
int nbtri = Max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
int nbqua = Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
std::vector<smIdType> aVec = (*anIt).second;
smIdType nbtri = std::max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
smIdType nbqua = std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
if( nbtri>0 && nbqua==0 ) {
NumBase = i;
}
}
if(NumBase==0) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
@ -1897,8 +1897,8 @@ bool StdMeshers_Penta_3D::Evaluate(SMESH_Mesh& aMesh,
if( sm ) {
MapShapeNbElemsItr anIt = aResMap.find(sm);
if( anIt == aResMap.end() ) continue;
std::vector<int> aVec = (*anIt).second;
nb1d += Max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
std::vector<smIdType> aVec = (*anIt).second;
nb1d += std::max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
}
}
// find face opposite to base face
@ -1923,14 +1923,14 @@ bool StdMeshers_Penta_3D::Evaluate(SMESH_Mesh& aMesh,
if( i==OppNum || i==NumBase ) continue;
MapShapeNbElemsItr anIt = aResMap.find( meshFaces[i-1] );
if( anIt == aResMap.end() ) continue;
std::vector<int> aVec = (*anIt).second;
nb2d += Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
std::vector<smIdType> aVec = (*anIt).second;
nb2d += std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
}
MapShapeNbElemsItr anIt = aResMap.find( meshFaces[NumBase-1] );
std::vector<int> aVec = (*anIt).second;
int nb2d_face0 = Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
int nb0d_face0 = aVec[SMDSEntity_Node];
std::vector<smIdType> aVec = (*anIt).second;
smIdType nb2d_face0 = std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
smIdType nb0d_face0 = aVec[SMDSEntity_Node];
anIt = aResMap.find( meshFaces[OppNum-1] );
for(i=SMDSEntity_Node; i<SMDSEntity_Last; i++)
@ -1939,7 +1939,7 @@ bool StdMeshers_Penta_3D::Evaluate(SMESH_Mesh& aMesh,
SMESH_MesherHelper aTool (aMesh);
bool _quadraticMesh = aTool.IsQuadraticSubMesh(aShape);
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
if(_quadraticMesh) {
aResVec[SMDSEntity_Quad_Penta] = nb2d_face0 * ( nb2d/nb1d );

View File

@ -136,7 +136,7 @@ bool StdMeshers_PolygonPerFace_2D::Evaluate(SMESH_Mesh& theMesh,
nbQuadSegs += sm2vec->second.at( SMDSEntity_Quad_Edge );
}
std::vector<int> aVec( SMDSEntity_Last, 0 );
std::vector<smIdType> aVec( SMDSEntity_Last, 0 );
switch ( nbLinSegs + nbQuadSegs ) {
case 3:
aVec[ nbQuadSegs ? SMDSEntity_Quad_Triangle : SMDSEntity_Triangle ] = 1;

View File

@ -577,7 +577,7 @@ bool StdMeshers_PolyhedronPerSolid_3D::Evaluate(SMESH_Mesh& theMesh,
case TopAbs_FACE:
{
myFaceMesher->Evaluate( theMesh, shape, theResMap );
std::vector<int> & quantities = theResMap[ sm ];
std::vector<smIdType> & quantities = theResMap[ sm ];
_quadraticMesh = ( !quantities.empty() &&
( quantities[ SMDSEntity_Quad_Triangle ] +
quantities[ SMDSEntity_Quad_Quadrangle ] +
@ -587,7 +587,7 @@ bool StdMeshers_PolyhedronPerSolid_3D::Evaluate(SMESH_Mesh& theMesh,
case TopAbs_SOLID:
{
std::vector<int> & quantities = theResMap[ sm ];
std::vector<smIdType> & quantities = theResMap[ sm ];
quantities.resize( SMDSEntity_Last, 0 );
SMESH_MesherHelper helper( theMesh );

View File

@ -2146,9 +2146,9 @@ bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
if( anIt==aResMap.end() )
return toSM( error( "Submesh can not be evaluated"));
std::vector<int> aVec = (*anIt).second;
int nbtri = Max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
int nbqua = Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
std::vector<smIdType> aVec = (*anIt).second;
smIdType nbtri = std::max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
smIdType nbqua = std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
if( nbtri==0 && nbqua>0 ) {
NbQFs++;
}
@ -2158,7 +2158,7 @@ bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
}
if(NbQFs<4) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = theMesh.GetSubMesh(theShape);
aResMap.insert(std::make_pair(sm,aResVec));
@ -2168,7 +2168,7 @@ bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
if(NumBase==0) NumBase = 1; // only quads => set 1 faces as base
// find number of 1d elems for base face
int nb1d = 0;
smIdType nb1d = 0;
TopTools_MapOfShape Edges1;
for (TopExp_Explorer exp(aFaces.Value(NumBase), TopAbs_EDGE); exp.More(); exp.Next()) {
Edges1.Add(exp.Current());
@ -2176,8 +2176,8 @@ bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
if( sm ) {
MapShapeNbElemsItr anIt = aResMap.find(sm);
if( anIt == aResMap.end() ) continue;
std::vector<int> aVec = (*anIt).second;
nb1d += Max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
std::vector<smIdType> aVec = (*anIt).second;
nb1d += std::max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
}
}
// find face opposite to base face
@ -2197,25 +2197,25 @@ bool StdMeshers_Prism_3D::Evaluate(SMESH_Mesh& theMesh,
}
}
// find number of 2d elems on side faces
int nb2d = 0;
smIdType nb2d = 0;
for(i=1; i<=6; i++) {
if( i==OppNum || i==NumBase ) continue;
MapShapeNbElemsItr anIt = aResMap.find( meshFaces[i-1] );
if( anIt == aResMap.end() ) continue;
std::vector<int> aVec = (*anIt).second;
nb2d += Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
std::vector<smIdType> aVec = (*anIt).second;
nb2d += std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
}
MapShapeNbElemsItr anIt = aResMap.find( meshFaces[NumBase-1] );
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
bool IsQuadratic = (aVec[SMDSEntity_Quad_Triangle]>aVec[SMDSEntity_Triangle]) ||
(aVec[SMDSEntity_Quad_Quadrangle]>aVec[SMDSEntity_Quadrangle]);
int nb2d_face0_3 = Max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
int nb2d_face0_4 = Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
int nb0d_face0 = aVec[SMDSEntity_Node];
int nb1d_face0_int = ( nb2d_face0_3*3 + nb2d_face0_4*4 - nb1d ) / 2;
smIdType nb2d_face0_3 = std::max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
smIdType nb2d_face0_4 = std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
smIdType nb0d_face0 = aVec[SMDSEntity_Node];
smIdType nb1d_face0_int = ( nb2d_face0_3*3 + nb2d_face0_4*4 - nb1d ) / 2;
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
if(IsQuadratic) {
aResVec[SMDSEntity_Quad_Penta] = nb2d_face0_3 * ( nb2d/nb1d );

View File

@ -448,7 +448,7 @@ bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
int nbNodes = params.size();
std::vector<int> aVec(SMDSEntity_Last);
std::vector<smIdType> aVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i] = 0;
aVec[SMDSEntity_Node] = nbNodes;

View File

@ -251,7 +251,7 @@ bool StdMeshers_Projection_1D2D::Evaluate(SMESH_Mesh& theMesh,
TopAbs_ShapeEnum shapeType = srcSM->GetSubShape().ShapeType();
if ( shapeType == TopAbs_EDGE )
{
std::vector<int> aVec;
std::vector<smIdType> aVec;
SMESHDS_SubMesh* srcSubMeshDS = srcSM->GetSubMeshDS();
if ( srcSubMeshDS && srcSubMeshDS->NbElements() )
{

View File

@ -1796,7 +1796,7 @@ bool StdMeshers_Projection_2D::Evaluate(SMESH_Mesh& theMesh,
// Assure that mesh on a source Face is computed/evaluated
// -------------------------------------------------------
std::vector<int> aVec;
std::vector<smIdType> aVec;
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( srcFace );
if ( srcSubMesh->IsMeshComputed() )

View File

@ -475,7 +475,7 @@ bool StdMeshers_Projection_3D::Evaluate(SMESH_Mesh& aMesh,
return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
std::vector<int> aVec(SMDSEntity_Last);
std::vector<smIdType> aVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i] = 0;
aVec[SMDSEntity_Node] = srcSubMesh->GetSubMeshDS()->NbNodes();

View File

@ -917,7 +917,7 @@ bool StdMeshers_Quadrangle_2D::Evaluate(SMESH_Mesh& aMesh,
std::vector<int> aNbNodes(4);
bool IsQuadratic = false;
if (!checkNbEdgesForEvaluate(aMesh, aFace, aResMap, aNbNodes, IsQuadratic)) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for (int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aFace);
aResMap.insert(std::make_pair(sm,aResVec));
@ -966,7 +966,7 @@ bool StdMeshers_Quadrangle_2D::Evaluate(SMESH_Mesh& aMesh,
//int nbFaces4 = (nbhoriz-1-kdh)*(nbvertic-1-kdv);
int nbFaces4 = (nbhoriz-1)*(nbvertic-1);
std::vector<int> aVec(SMDSEntity_Last,0);
std::vector<smIdType> aVec(SMDSEntity_Last,0);
if (IsQuadratic) {
aVec[SMDSEntity_Quad_Triangle] = nbFaces3;
aVec[SMDSEntity_Quad_Quadrangle] = nbFaces4;
@ -1768,7 +1768,7 @@ bool StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(SMESH_Mesh& aMes
if (anIt==aResMap.end()) {
return false;
}
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
IsQuadratic = (aVec[SMDSEntity_Quad_Edge] > aVec[SMDSEntity_Edge]);
if (nbEdgesInWire.front() == 3) { // exactly 3 edges
if (myTriaVertexID>0) {
@ -1790,7 +1790,7 @@ bool StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(SMESH_Mesh& aMes
SMESH_subMesh * sm = aMesh.GetSubMesh(E1);
MapShapeNbElemsItr anIt = aResMap.find(sm);
if (anIt==aResMap.end()) return false;
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
if (IsQuadratic)
aNbNodes[0] = (aVec[SMDSEntity_Node]-1)/2 + 2;
else
@ -1824,7 +1824,7 @@ bool StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(SMESH_Mesh& aMes
if (anIt==aResMap.end()) {
return false;
}
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
if (IsQuadratic)
aNbNodes[nbSides] = (aVec[SMDSEntity_Node]-1)/2 + 2;
else
@ -1861,7 +1861,7 @@ bool StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(SMESH_Mesh& aMes
if (anIt==aResMap.end()) {
return false;
}
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
if (IsQuadratic)
aNbNodes[nbSides] += (aVec[SMDSEntity_Node]-1)/2 + 1;
else
@ -1902,7 +1902,7 @@ bool StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(SMESH_Mesh& aMes
if (anIt==aResMap.end()) {
return false;
}
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
if (IsQuadratic)
aNbNodes[nbSides] += (aVec[SMDSEntity_Node]-1)/2 + 1;
else
@ -3179,7 +3179,7 @@ bool StdMeshers_Quadrangle_2D::evaluateQuadPref(SMESH_Mesh & aMesh,
nbFaces += (drl+addv)*(nb-1) + (nt-1);
} // end new version implementation
std::vector<int> aVec(SMDSEntity_Last);
std::vector<smIdType> aVec(SMDSEntity_Last);
for (int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i] = 0;
if (IsQuadratic) {
aVec[SMDSEntity_Quad_Quadrangle] = nbFaces;

View File

@ -436,7 +436,7 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
if ( !outerShell.IsSame( It.Value() ))
innerShell = It.Value();
if ( nbShells != 2 ) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
@ -450,7 +450,7 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
if ( !ProjectionUtils::FindSubShapeAssociation( outerShell, &aMesh,
innerShell, &aMesh,
shape2ShapeMap) ) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
@ -466,12 +466,12 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
//FacesOut.Append(exp.Current());
SMESH_subMesh *aSubMesh = aMesh.GetSubMesh(exp.Current());
MapShapeNbElemsItr anIt = aResMap.find(aSubMesh);
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
nb0d_Out += aVec[SMDSEntity_Node];
nb2d_3_Out += Max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
nb2d_4_Out += Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
nb2d_3_Out += std::max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
nb2d_4_Out += std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
}
int nb1d_Out = 0;
smIdType nb1d_Out = 0;
TopTools_MapOfShape tmpMap;
for (TopExp_Explorer exp(outerShell, TopAbs_EDGE); exp.More(); exp.Next()) {
if( tmpMap.Contains( exp.Current() ) )
@ -479,9 +479,9 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
tmpMap.Add( exp.Current() );
SMESH_subMesh *aSubMesh = aMesh.GetSubMesh(exp.Current());
MapShapeNbElemsItr anIt = aResMap.find(aSubMesh);
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
nb0d_Out += aVec[SMDSEntity_Node];
nb1d_Out += Max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
nb1d_Out += std::max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
}
tmpMap.Clear();
for (TopExp_Explorer exp(outerShell, TopAbs_VERTEX); exp.More(); exp.Next()) {
@ -492,18 +492,18 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
}
// get info for inner shell
int nb0d_In=0, nb2d_3_In=0, nb2d_4_In=0;
smIdType nb0d_In=0, nb2d_3_In=0, nb2d_4_In=0;
//TopTools_SequenceOfShape FacesIn;
for (TopExp_Explorer exp(innerShell, TopAbs_FACE); exp.More(); exp.Next()) {
//FacesIn.Append(exp.Current());
SMESH_subMesh *aSubMesh = aMesh.GetSubMesh(exp.Current());
MapShapeNbElemsItr anIt = aResMap.find(aSubMesh);
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
nb0d_In += aVec[SMDSEntity_Node];
nb2d_3_In += Max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
nb2d_4_In += Max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
nb2d_3_In += std::max(aVec[SMDSEntity_Triangle],aVec[SMDSEntity_Quad_Triangle]);
nb2d_4_In += std::max(aVec[SMDSEntity_Quadrangle],aVec[SMDSEntity_Quad_Quadrangle]);
}
int nb1d_In = 0;
smIdType nb1d_In = 0;
tmpMap.Clear();
bool IsQuadratic = false;
bool IsFirst = true;
@ -513,9 +513,9 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
tmpMap.Add( exp.Current() );
SMESH_subMesh *aSubMesh = aMesh.GetSubMesh(exp.Current());
MapShapeNbElemsItr anIt = aResMap.find(aSubMesh);
std::vector<int> aVec = (*anIt).second;
std::vector<smIdType> aVec = (*anIt).second;
nb0d_In += aVec[SMDSEntity_Node];
nb1d_In += Max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
nb1d_In += std::max(aVec[SMDSEntity_Edge],aVec[SMDSEntity_Quad_Edge]);
if(IsFirst) {
IsQuadratic = (aVec[SMDSEntity_Quad_Edge] > aVec[SMDSEntity_Edge]);
IsFirst = false;
@ -532,7 +532,7 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
bool IsOK = (nb0d_Out==nb0d_In) && (nb1d_Out==nb1d_In) &&
(nb2d_3_Out==nb2d_3_In) && (nb2d_4_Out==nb2d_4_In);
if(!IsOK) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
@ -547,7 +547,7 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
}
if ( myDistributionHypo ) {
if ( !myDistributionHypo->GetLayerDistribution() ) {
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
SMESH_subMesh * sm = aMesh.GetSubMesh(aShape);
aResMap.insert(std::make_pair(sm,aResVec));
@ -566,12 +566,12 @@ bool StdMeshers_RadialPrism_3D::Evaluate(SMESH_Mesh& aMesh,
nbLayers = myLayerPositions.size() + 1;
}
std::vector<int> aResVec(SMDSEntity_Last);
std::vector<smIdType> aResVec(SMDSEntity_Last);
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
if(IsQuadratic) {
aResVec[SMDSEntity_Quad_Penta] = nb2d_3_Out * nbLayers;
aResVec[SMDSEntity_Quad_Hexa] = nb2d_4_Out * nbLayers;
int nb1d = ( nb2d_3_Out*3 + nb2d_4_Out*4 ) / 2;
smIdType nb1d = ( nb2d_3_Out*3 + nb2d_4_Out*4 ) / 2;
aResVec[SMDSEntity_Node] = nb0d_Out * ( 2*nbLayers - 1 ) - nb1d * nbLayers;
}
else {

View File

@ -1146,8 +1146,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
if( aResMap.count(sm) )
return false;
vector<int>& aResVec =
aResMap.insert( make_pair(sm, vector<int>(SMDSEntity_Last,0))).first->second;
vector<smIdType>& aResVec =
aResMap.insert( make_pair(sm, vector<smIdType>(SMDSEntity_Last,0))).first->second;
myHelper = new SMESH_MesherHelper( aMesh );
myHelper->SetSubShape( aShape );
@ -1204,23 +1204,23 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
for ( TopExp_Explorer edge( aShape, TopAbs_EDGE ); edge.More() && !isQuadratic ; edge.Next() )
{
sm = aMesh.GetSubMesh( edge.Current() );
vector<int>& nbElems = aResMap[ sm ];
vector<smIdType>& nbElems = aResMap[ sm ];
if ( SMDSEntity_Quad_Edge < (int) nbElems.size() )
isQuadratic = nbElems[ SMDSEntity_Quad_Edge ];
}
int nbCircSegments = 0;
smIdType nbCircSegments = 0;
for ( int iE = 0; iE < circSide->NbEdges(); ++iE )
{
sm = aMesh.GetSubMesh( circSide->Edge( iE ));
vector<int>& nbElems = aResMap[ sm ];
vector<smIdType>& nbElems = aResMap[ sm ];
if ( SMDSEntity_Quad_Edge < (int) nbElems.size() )
nbCircSegments += ( nbElems[ SMDSEntity_Edge ] + nbElems[ SMDSEntity_Quad_Edge ]);
}
int nbQuads = nbCircSegments * ( layerPositions.size() - 1 );
int nbTria = nbCircSegments;
int nbNodes = ( nbCircSegments - 1 ) * ( layerPositions.size() - 2 );
smIdType nbQuads = nbCircSegments * ( layerPositions.size() - 1 );
smIdType nbTria = nbCircSegments;
smIdType nbNodes = ( nbCircSegments - 1 ) * ( layerPositions.size() - 2 );
if ( isQuadratic )
{
nbNodes += (( nbCircSegments - 1 ) * ( layerPositions.size() - 1 ) + // radial
@ -1238,7 +1238,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
if ( linSide1 )
{
// evaluation for linSides
vector<int> aResVec(SMDSEntity_Last, 0);
vector<smIdType> aResVec(SMDSEntity_Last, 0);
if ( isQuadratic ) {
aResVec[SMDSEntity_Node ] = 2 * ( layerPositions.size() - 1 ) + 1;
aResVec[SMDSEntity_Quad_Edge] = layerPositions.size() - 1;

View File

@ -1312,7 +1312,7 @@ bool StdMeshers_Regular_1D::Evaluate(SMESH_Mesh & theMesh,
ASSERT(!VFirst.IsNull());
ASSERT(!VLast.IsNull());
std::vector<int> aVec(SMDSEntity_Last,0);
std::vector<smIdType> aVec(SMDSEntity_Last,0);
double length = EdgeLength( E );
if ( !Curve.IsNull() && length > 0 )