From: abd Date: Wed, 9 Apr 2008 09:02:06 +0000 (+0000) Subject: first executable version X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee9052e3b516a5fbdd016f62d56d27fade190f1a;p=modules%2Fsmesh.git first executable version --- diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index a8f371a4b..569981c31 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -51,6 +51,8 @@ #include "SMDS_QuadraticFaceOfNodes.hxx" #include "SMDS_QuadraticEdge.hxx" +using namespace std; + /* AUXILIARY METHODS diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index e500ed3ad..64b1c0502 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -49,6 +49,7 @@ static int MYDEBUG = 0; #define _EDF_NODE_IDS_ using namespace MED; +using namespace std; void DriverMED_R_SMESHDS_Mesh diff --git a/src/SMDS/SMDS_MeshInfo.hxx b/src/SMDS/SMDS_MeshInfo.hxx index d980de9b3..a7694837b 100644 --- a/src/SMDS/SMDS_MeshInfo.hxx +++ b/src/SMDS/SMDS_MeshInfo.hxx @@ -56,8 +56,8 @@ private: int myNbPrisms , myNbQuadPrisms ; int myNbPolyhedrons; - vector myNb; // pointers to myNb... fields - vector myShift; // shift to get an index in myNb by elem->NbNodes() + std::vector myNb; // pointers to myNb... fields + std::vector myShift; // shift to get an index in myNb by elem->NbNodes() }; inline SMDS_MeshInfo::SMDS_MeshInfo(): diff --git a/src/SMESH/SMESH_2D_Algo.cxx b/src/SMESH/SMESH_2D_Algo.cxx index ade8abfb7..108fd7bef 100644 --- a/src/SMESH/SMESH_2D_Algo.cxx +++ b/src/SMESH/SMESH_2D_Algo.cxx @@ -26,7 +26,6 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_2D_Algo.hxx" #include "SMESH_Gen.hxx" @@ -36,6 +35,7 @@ using namespace std; #include #include +using namespace std; //============================================================================= /*! * diff --git a/src/SMESH/SMESH_Block.hxx b/src/SMESH/SMESH_Block.hxx index c5bbc1e2f..14d727012 100644 --- a/src/SMESH/SMESH_Block.hxx +++ b/src/SMESH/SMESH_Block.hxx @@ -115,10 +115,10 @@ class SMESH_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives // ShapeIndex( ID_Ex00 ) == 0 // ShapeIndex( ID_Ex10 ) == 1 - static void GetFaceEdgesIDs (const int faceID, vector< int >& edgeVec ); + static void GetFaceEdgesIDs (const int faceID, std::vector< int >& edgeVec ); // return edges IDs of a face in the order u0, u1, 0v, 1v - static void GetEdgeVertexIDs (const int edgeID, vector< int >& vertexVec ); + static void GetEdgeVertexIDs (const int edgeID, std::vector< int >& vertexVec ); // return vertex IDs of an edge static int GetCoordIndOnEdge (const int theEdgeID) @@ -161,7 +161,7 @@ class SMESH_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives bool LoadMeshBlock(const SMDS_MeshVolume* theVolume, const int theNode000Index, const int theNode001Index, - vector& theOrderedNodes); + std::vector& theOrderedNodes); // prepare to work with theVolume and // return nodes in theVolume corners in the order of TShapeID enum @@ -225,7 +225,7 @@ public: // return coordinates of a point in shell static bool ShellPoint(const gp_XYZ& theParams, - const vector& thePointOnShape, + const std::vector& thePointOnShape, gp_XYZ& thePoint ); // computes coordinates of a point in shell by points on sub-shapes // and point parameters. @@ -377,7 +377,7 @@ public: gp_XYZ myParam; // the best parameters guess double myValues[ 4 ]; // values computed at myParam: square distance and 3 derivatives - typedef pair TxyzPair; + typedef std::pair TxyzPair; TxyzPair my3x3x3GridNodes[ 27 ]; // to compute the first param guess bool myGridComputed; }; diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index 3005f678e..27b00b49c 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -244,8 +244,8 @@ protected: std::list _subMeshesUsingHypothesisList; SMESHDS_Document * _myDocument; SMESHDS_Mesh * _myMeshDS; - map _mapSubMesh; - map _mapGroup; + std::map _mapSubMesh; + std::map _mapGroup; SMESH_Gen * _gen; bool _isAutoColor; diff --git a/src/SMESH/SMESH_MeshEditor.hxx b/src/SMESH/SMESH_MeshEditor.hxx index fd5facec2..c70d40956 100644 --- a/src/SMESH/SMESH_MeshEditor.hxx +++ b/src/SMESH/SMESH_MeshEditor.hxx @@ -313,9 +313,9 @@ public: */ SMESH_NodeSearcher* GetNodeSearcher(); - int SimplifyFace (const vector faceNodes, - vector& poly_nodes, - vector& quantities) const; + int SimplifyFace (const std::vector faceNodes, + std::vector& poly_nodes, + std::vector& quantities) const; // Split face, defined by , into several faces by repeating nodes. // Is used by MergeNodes() @@ -478,8 +478,8 @@ public: * \param nReplaceMap - output map of corresponding nodes * \retval Sew_Error - is a success or not */ - static Sew_Error FindMatchingNodes(set& theSide1, - set& theSide2, + static Sew_Error FindMatchingNodes(std::set& theSide1, + std::set& theSide2, const SMDS_MeshNode* theFirstNode1, const SMDS_MeshNode* theFirstNode2, const SMDS_MeshNode* theSecondNode1, diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 5b74f1ded..7468c24c2 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -50,6 +50,8 @@ #define RETURN_BAD_RESULT(msg) { MESSAGE(msg); return false; } +using namespace std; + //================================================================================ /*! * \brief Constructor diff --git a/src/SMESH/SMESH_MesherHelper.hxx b/src/SMESH/SMESH_MesherHelper.hxx index 41544a3f4..7f05b08fc 100644 --- a/src/SMESH/SMESH_MesherHelper.hxx +++ b/src/SMESH/SMESH_MesherHelper.hxx @@ -36,9 +36,9 @@ #include -typedef pair NLink; -typedef map NLinkNodeMap; -typedef map::iterator ItNLinkNode; +typedef std::pair NLink; +typedef std::map NLinkNodeMap; +typedef std::map::iterator ItNLinkNode; /*! * \brief It helps meshers to add elements diff --git a/src/SMESH/SMESH_OctreeNode.hxx b/src/SMESH/SMESH_OctreeNode.hxx index 4feb86842..84f678333 100644 --- a/src/SMESH/SMESH_OctreeNode.hxx +++ b/src/SMESH/SMESH_OctreeNode.hxx @@ -49,7 +49,7 @@ class SMESH_OctreeNode : public SMESH_Octree{ public: // Constructor - SMESH_OctreeNode (const set& theNodes, const int maxLevel = -1, + SMESH_OctreeNode (const std::set& theNodes, const int maxLevel = -1, const int maxNbNodes = 5 , const double minBoxSize = 0.); //============================= @@ -66,19 +66,20 @@ public: virtual const bool isInside(const SMDS_MeshNode * Node, const double precision = 0. ); // Return in Result a list of Nodes potentials to be near Node - void NodesAround( const SMDS_MeshNode * Node , list* Result, + void NodesAround( const SMDS_MeshNode * Node , + std::list* Result, const double precision = 0. ); // Return in theGroupsOfNodes a list of group of nodes close to each other within theTolerance // Search for all the nodes in nodes - void FindCoincidentNodes ( set* nodes, + void FindCoincidentNodes ( std::set* nodes, const double theTolerance, - list< list< const SMDS_MeshNode*> >* theGroupsOfNodes); + std::list< std::list< const SMDS_MeshNode*> >* theGroupsOfNodes); // Static method that return in theGroupsOfNodes a list of group of nodes close to each other within // theTolerance search for all the nodes in nodes - static void FindCoincidentNodes ( set nodes, - list< list< const SMDS_MeshNode*> >* theGroupsOfNodes, + static void FindCoincidentNodes ( std::set nodes, + std::list< std::list< const SMDS_MeshNode*> >* theGroupsOfNodes, const double theTolerance = 0.00001, const int maxLevel = -1, const int maxNbNodes = 5); /*! @@ -114,15 +115,15 @@ protected: // Return in result a list of nodes closed to Node and remove it from SetOfNodes void FindCoincidentNodes( const SMDS_MeshNode * Node, - set* SetOfNodes, - list* Result, + std::set* SetOfNodes, + std::list* Result, const double precision); // The max number of nodes a leaf box can contain int myMaxNbNodes; // The set of nodes inside the box of the Octree (Empty if Octree is not a leaf) - set myNodes; + std::set myNodes; // The number of nodes I have inside the box int myNbNodes; diff --git a/src/SMESH/SMESH_Pattern.hxx b/src/SMESH/SMESH_Pattern.hxx index df1ccd0eb..fe40a5152 100644 --- a/src/SMESH/SMESH_Pattern.hxx +++ b/src/SMESH/SMESH_Pattern.hxx @@ -246,51 +246,51 @@ private: bool setShapeToMesh(const TopoDS_Shape& theShape); // Set a shape to be meshed. Return True if meshing is possible - list< TPoint* > & getShapePoints(const TopoDS_Shape& theShape); + std::list< TPoint* > & getShapePoints(const TopoDS_Shape& theShape); // Return list of points located on theShape. // A list of edge-points include vertex-points (for 2D pattern only). // A list of face-points doesnt include edge-points. // A list of volume-points doesnt include face-points. - list< TPoint* > & getShapePoints(const int theShapeID); + std::list< TPoint* > & getShapePoints(const int theShapeID); // Return list of points located on the shape bool findBoundaryPoints(); // If loaded from file, find points to map on edges and faces and // compute their parameters - void arrangeBoundaries (list< list< TPoint* > >& boundaryPoints); + void arrangeBoundaries (std::list< std::list< TPoint* > >& boundaryPoints); // if there are several wires, arrange boundaryPoints so that // the outer wire goes first and fix inner wires orientation; // update myKeyPointIDs to correspond to the order of key-points // in boundaries; sort internal boundaries by the nb of key-points - void computeUVOnEdge( const TopoDS_Edge& theEdge, const list< TPoint* > & ePoints ); + void computeUVOnEdge( const TopoDS_Edge& theEdge, const std::list< TPoint* > & ePoints ); // compute coordinates of points on theEdge - bool compUVByIsoIntersection (const list< list< TPoint* > >& boundaryPoints, + bool compUVByIsoIntersection (const std::list< std::list< TPoint* > >& boundaryPoints, const gp_XY& theInitUV, gp_XY& theUV, bool & theIsDeformed); // compute UV by intersection of iso-lines found by points on edges - bool compUVByElasticIsolines(const list< list< TPoint* > >& boundaryPoints, - const list< TPoint* >& pointsToCompute); + bool compUVByElasticIsolines(const std::list< std::list< TPoint* > >& boundaryPoints, + const std::list< TPoint* >& pointsToCompute); // compute UV as nodes of iso-poly-lines consisting of // segments keeping relative size as in the pattern - double setFirstEdge (list< TopoDS_Edge > & theWire, int theFirstEdgeID); + double setFirstEdge (std::list< TopoDS_Edge > & theWire, int theFirstEdgeID); // choose the best first edge of theWire; return the summary distance // between point UV computed by isolines intersection and // eventual UV got from edge p-curves - typedef list< list< TopoDS_Edge > > TListOfEdgesList; + typedef std::list< std::list< TopoDS_Edge > > TListOfEdgesList; bool sortSameSizeWires (TListOfEdgesList & theWireList, const TListOfEdgesList::iterator& theFromWire, const TListOfEdgesList::iterator& theToWire, const int theFirstEdgeID, - list< list< TPoint* > >& theEdgesPointsList ); + std::list< std::list< TPoint* > >& theEdgesPointsList ); // sort wires in theWireList from theFromWire until theToWire, // the wires are set in the order to correspond to the order // of boundaries; after sorting, edges in the wires are put @@ -352,7 +352,7 @@ private: // all functions assure that shapes are indexed so that first go // ordered vertices, then ordered edge, then faces and maybe a shell TopTools_IndexedMapOfOrientedShape myShapeIDMap; - std::map< int, list< TPoint* > > myShapeIDToPointsMap; + std::map< int, std::list< TPoint* > > myShapeIDToPointsMap; // for the 2d case: // nb of key-points in each of pattern boundaries diff --git a/src/SMESH/SMESH_subMesh.hxx b/src/SMESH/SMESH_subMesh.hxx index 9770d6da0..a82567391 100644 --- a/src/SMESH/SMESH_subMesh.hxx +++ b/src/SMESH/SMESH_subMesh.hxx @@ -75,7 +75,7 @@ class SMESH_EXPORT SMESH_subMesh SMESH_subMesh *GetFirstToCompute(); - const map < int, SMESH_subMesh * >& DependsOn(); + const std::map < int, SMESH_subMesh * >& DependsOn(); //const map < int, SMESH_subMesh * >&Dependants(); /*! * \brief Return iterator on the submeshes this one depends on @@ -274,7 +274,7 @@ protected: SMESH_Mesh * _father; int _Id; - map < int, SMESH_subMesh * >_mapDepend; + std::map < int, SMESH_subMesh * >_mapDepend; bool _dependenceAnalysed; int _algoState; diff --git a/src/SMESHDS/SMESHDS_Mesh.hxx b/src/SMESHDS/SMESHDS_Mesh.hxx index dac69c020..1cc122d46 100644 --- a/src/SMESHDS/SMESHDS_Mesh.hxx +++ b/src/SMESHDS/SMESHDS_Mesh.hxx @@ -438,9 +438,9 @@ private: void addNodeToSubmesh( const SMDS_MeshNode* aNode, int Index ) { //Update or build submesh - map::iterator it = myShapeIndexToSubMesh.find( Index ); + std::map::iterator it = myShapeIndexToSubMesh.find( Index ); if ( it == myShapeIndexToSubMesh.end() ) - it = myShapeIndexToSubMesh.insert( make_pair(Index, new SMESHDS_SubMesh() )).first; + it = myShapeIndexToSubMesh.insert( std::make_pair(Index, new SMESHDS_SubMesh() )).first; it->second->AddNode( aNode ); // add aNode to submesh }