fix CoincidentElements::IsSatisfy() for polyhedrons

This commit is contained in:
eap 2012-02-28 13:32:04 +00:00
parent 7468bfdc0b
commit ce9cd12e09

View File

@ -2161,11 +2161,12 @@ bool CoincidentElements::IsSatisfy( long theElementId )
{ {
if ( e->GetType() != GetType() ) return false; if ( e->GetType() != GetType() ) return false;
set< const SMDS_MeshNode* > elemNodes( e->begin_nodes(), e->end_nodes() ); set< const SMDS_MeshNode* > elemNodes( e->begin_nodes(), e->end_nodes() );
const int nbNodes = e->NbNodes();
SMDS_ElemIteratorPtr invIt = (*elemNodes.begin())->GetInverseElementIterator( GetType() ); SMDS_ElemIteratorPtr invIt = (*elemNodes.begin())->GetInverseElementIterator( GetType() );
while ( invIt->more() ) while ( invIt->more() )
{ {
const SMDS_MeshElement* e2 = invIt->next(); const SMDS_MeshElement* e2 = invIt->next();
if ( e2 == e || e2->NbNodes() != (int)elemNodes.size() ) continue; if ( e2 == e || e2->NbNodes() != nbNodes ) continue;
bool sameNodes = true; bool sameNodes = true;
for ( size_t i = 0; i < elemNodes.size() && sameNodes; ++i ) for ( size_t i = 0; i < elemNodes.size() && sameNodes; ++i )