From: eap Date: Wed, 7 Nov 2007 09:39:20 +0000 (+0000) Subject: PAL16202 (Propagation 1D on edges group) X-Git-Tag: V4_1_0rc2~60 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4f65b594f797e8ecdd689021c145331a78652d48;p=modules%2Fsmesh.git PAL16202 (Propagation 1D on edges group) remove useless includes --- diff --git a/src/SMESH/SMESH_2D_Algo.cxx b/src/SMESH/SMESH_2D_Algo.cxx index 84d0db491..ade8abfb7 100644 --- a/src/SMESH/SMESH_2D_Algo.cxx +++ b/src/SMESH/SMESH_2D_Algo.cxx @@ -26,13 +26,15 @@ // Module : SMESH // $Header$ +using namespace std; #include "SMESH_2D_Algo.hxx" #include "SMESH_Gen.hxx" -#include #include "utilities.h" -using namespace std; +#include +#include +#include //============================================================================= /*! diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 57b7d3ecf..29f896bf8 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -29,6 +29,7 @@ #include "SMESH_Gen.hxx" #include "SMESH_subMesh.hxx" #include "SMESH_HypoFilter.hxx" +#include "SMESHDS_Document.hxx" #include "SMDS_MeshElement.hxx" #include "SMDS_MeshNode.hxx" @@ -309,7 +310,7 @@ static bool checkMissing(SMESH_Gen* aGen, int shapeDim = SMESH_Gen::GetShapeDim( aSubMesh->GetSubShape() ); if (aTopAlgoDim > shapeDim) { - INFOS( "ERROR: " << shapeDim << "D algorithm is missing" ); + MESSAGE( "ERROR: " << shapeDim << "D algorithm is missing" ); ret = false; theErrors.push_back( SMESH_Gen::TAlgoStateError() ); theErrors.back().Set( SMESH_Hypothesis::HYP_MISSING, shapeDim, true ); @@ -328,16 +329,16 @@ static bool checkMissing(SMESH_Gen* aGen, SMESH_Hypothesis::Hypothesis_Status status; algo->CheckHypothesis( aMesh, aSubMesh->GetSubShape(), status ); if ( status == SMESH_Hypothesis::HYP_BAD_PARAMETER ) { - INFOS( "ERROR: hypothesis of " << (IsGlobalHypothesis ? "Global " : "Local ") - << "<" << algo->GetName() << "> has a bad parameter value"); + MESSAGE( "ERROR: hypothesis of " << (IsGlobalHypothesis ? "Global " : "Local ") + << "<" << algo->GetName() << "> has a bad parameter value"); errName = status; } else if ( status == SMESH_Hypothesis::HYP_BAD_GEOMETRY ) { - INFOS( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ") - << "<" << algo->GetName() << "> assigned to mismatching geometry"); + MESSAGE( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ") + << "<" << algo->GetName() << "> assigned to mismatching geometry"); errName = status; } else { - INFOS( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ") - << "<" << algo->GetName() << "> misses some hypothesis"); + MESSAGE( "ERROR: " << (IsGlobalHypothesis ? "Global " : "Local ") + << "<" << algo->GetName() << "> misses some hypothesis"); } if (IsGlobalHypothesis) globalChecked[ algo->GetDim() ] = true; diff --git a/src/SMESH/SMESH_Gen.hxx b/src/SMESH/SMESH_Gen.hxx index 1aa8e9684..f642500ec 100644 --- a/src/SMESH/SMESH_Gen.hxx +++ b/src/SMESH/SMESH_Gen.hxx @@ -42,12 +42,12 @@ #include "SMESH_3D_Algo.hxx" #include "SMESH_Mesh.hxx" -#include "SMESHDS_Document.hxx" - #include #include +class SMESHDS_Document; + typedef SMESH_Hypothesis::Hypothesis_Status TAlgoStateErrorName; typedef struct studyContextStruct diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 8c2eec106..79995e3e4 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -46,28 +46,31 @@ #include "utilities.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include +#include #include #include +#include #include -#include +#include +#include #include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -2753,12 +2756,7 @@ static void sweepElement(SMESHDS_Mesh* aMesh, // Loop on elem nodes: // find new nodes and detect same nodes indices int nbNodes = elem->NbNodes(); - //---PR - //list::const_iterator itNN[ nbNodes ]; - vector::const_iterator> itNN( nbNodes ); - itNN.reserve(nbNodes); - //---PR - //const SMDS_MeshNode* prevNod[ nbNodes ], *nextNod[ nbNodes ]; + vector < list< const SMDS_MeshNode* >::const_iterator > itNN( nbNodes ); vector prevNod( nbNodes ); vector nextNod( nbNodes ); vector midlNod( nbNodes ); @@ -4098,7 +4096,7 @@ void SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems, const_cast< SMDS_MeshNode* > ( node )->SetPosition ( SMDS_SpacePosition::originSpacePosition() ); } - nodeMap.insert( TNodeNodeMap::value_type( node, newNode )); + nodeMap.insert( make_pair( node, newNode )); // keep inverse elements if ( !theCopy && needReverse ) { @@ -4561,10 +4559,7 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) int aShapeId = FindShape( elem ); set nodeSet; - //const SMDS_MeshNode* curNodes[ nbNodes ], *uniqueNodes[ nbNodes ]; - const SMDS_MeshNode** curNodes = new const SMDS_MeshNode*[ nbNodes ]; - const SMDS_MeshNode** uniqueNodes = new const SMDS_MeshNode*[ nbNodes ]; - + vector< const SMDS_MeshNode*> curNodes( nbNodes ), uniqueNodes( nbNodes ); int iUnique = 0, iCur = 0, nbRepl = 0; vector iRepl( nbNodes ); @@ -5042,7 +5037,7 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) } else { // Change regular element or polygon - aMesh->ChangeElementNodes( elem, uniqueNodes, nbUniqueNodes ); + aMesh->ChangeElementNodes( elem, & uniqueNodes[0], nbUniqueNodes ); } } else { @@ -5050,14 +5045,13 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) rmElemIds.push_back( elem->GetID() ); } - delete curNodes; - delete uniqueNodes; } // loop on elements // Remove equal nodes and bad elements Remove( rmNodeIds, true ); Remove( rmElemIds, false ); + } @@ -5609,13 +5603,11 @@ SMESH_MeshEditor::Sew_Error const SMDS_MeshElement* elem = invElemIt->next(); // prepare data for a loop on links coming to prevSideNode, of a face or a volume int iPrevNode, iNode = 0, nbNodes = elem->NbNodes(); - //const SMDS_MeshNode* faceNodes[ nbNodes ]; - const SMDS_MeshNode** faceNodes = new const SMDS_MeshNode*[ nbNodes ]; + vector< const SMDS_MeshNode* > faceNodes( nbNodes, (const SMDS_MeshNode*)0 ); bool isVolume = volume.Set( elem ); - const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : faceNodes; + const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : & faceNodes[0]; if ( isVolume ) // --volume hasVolumes = true; - //else if ( nbNodes > 2 ) { // --face else if ( elem->GetType()==SMDSAbs_Face ) { // --face // retrieve all face nodes and find iPrevNode - an index of the prevSideNode if(elem->IsQuadratic()) { @@ -5632,7 +5624,7 @@ SMESH_MeshEditor::Sew_Error else { SMDS_ElemIteratorPtr nIt = elem->nodesIterator(); while ( nIt->more() ) { - nodes[ iNode ] = static_cast( nIt->next() ); + nodes[ iNode ] = cast2Node( nIt->next() ); if ( nodes[ iNode++ ] == prevSideNode ) iPrevNode = iNode - 1; } @@ -5682,7 +5674,6 @@ SMESH_MeshEditor::Sew_Error } } } - delete faceNodes; } // loop on inverse elements of prevSideNode if ( !sideNode ) { diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index dcb255db2..5b74f1ded 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -35,11 +35,13 @@ #include #include #include +#include +#include #include +#include #include +#include #include -#include -#include #include #include diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index 6c7a4acef..4d3fe36f6 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -36,10 +36,12 @@ #include #include #include -#include +//#include #include #include +#include #include +#include #include #include #include @@ -47,7 +49,6 @@ #include #include #include -#include #include #include #include