0021457: [CEA] import check_mesh stability

in Transform(), reverse elements only if needed
This commit is contained in:
eap 2012-01-10 14:36:48 +00:00
parent 5acab3d327
commit e8b482055b

View File

@ -24,16 +24,13 @@
// Created : Mon Apr 12 16:10:22 2004 // Created : Mon Apr 12 16:10:22 2004
// Author : Edward AGAPOV (eap) // Author : Edward AGAPOV (eap)
#define CHRONODEF
#include "SMESH_MeshEditor.hxx" #include "SMESH_MeshEditor.hxx"
#include "SMDS_FaceOfNodes.hxx" #include "SMDS_FaceOfNodes.hxx"
#include "SMDS_VolumeTool.hxx" #include "SMDS_VolumeTool.hxx"
#include "SMDS_EdgePosition.hxx" #include "SMDS_EdgePosition.hxx"
#include "SMDS_PolyhedralVolumeOfNodes.hxx"
#include "SMDS_FacePosition.hxx" #include "SMDS_FacePosition.hxx"
#include "SMDS_SpacePosition.hxx" #include "SMDS_SpacePosition.hxx"
//#include "SMDS_QuadraticFaceOfNodes.hxx"
#include "SMDS_MeshGroup.hxx" #include "SMDS_MeshGroup.hxx"
#include "SMDS_LinearEdge.hxx" #include "SMDS_LinearEdge.hxx"
#include "SMDS_Downward.hxx" #include "SMDS_Downward.hxx"
@ -5599,6 +5596,7 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
// Replicate or reverse elements // Replicate or reverse elements
std::vector<int> iForw;
for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ ) for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ )
{ {
const SMDS_MeshElement* elem = *itElem; const SMDS_MeshElement* elem = *itElem;
@ -5700,7 +5698,9 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
// Regular elements // Regular elements
const std::vector<int>& i = SMDS_MeshCell::reverseSmdsOrder( elem->GetEntityType() ); while ( iForw.size() < nbNodes ) iForw.push_back( iForw.size() );
const std::vector<int>& iRev = SMDS_MeshCell::reverseSmdsOrder( elem->GetEntityType() );
const std::vector<int>& i = needReverse ? iRev : iForw;
// find transformed nodes // find transformed nodes
vector<const SMDS_MeshNode*> nodes(nbNodes); vector<const SMDS_MeshNode*> nodes(nbNodes);