X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Penta_3D.cxx;h=413ec1f7e5ae6eddf72c322eda9ebbbb322e8e28;hp=29c935a64042f4f12735af016e75e944de6bfba5;hb=386c76ea033aef391a39dfc3b015ed081ed49fd5;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6 diff --git a/src/StdMeshers/StdMeshers_Penta_3D.cxx b/src/StdMeshers/StdMeshers_Penta_3D.cxx index 29c935a64..413ec1f7e 100644 --- a/src/StdMeshers/StdMeshers_Penta_3D.cxx +++ b/src/StdMeshers/StdMeshers_Penta_3D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -33,12 +33,14 @@ #include "SMDS_MeshElement.hxx" #include "SMDS_VolumeOfNodes.hxx" #include "SMDS_VolumeTool.hxx" +#include "SMESHDS_Mesh.hxx" #include "SMESHDS_SubMesh.hxx" +#include "SMESH_Comment.hxx" #include "SMESH_Mesh.hxx" +#include "SMESH_MeshAlgos.hxx" #include "SMESH_MesherHelper.hxx" #include "SMESH_subMesh.hxx" #include "SMESH_subMeshEventListener.hxx" -#include "SMESH_Comment.hxx" #include #include @@ -359,7 +361,7 @@ void StdMeshers_Penta_3D::MakeNodes() // set XYZ on horizontal edges and get node columns of faces: // 2 columns for each face, between which a base node is located vector* nColumns[8]; - double ratio[ NB_WALL_FACES ]; // base node position between columns [0.-1.] + double ratio[ NB_WALL_FACES ] = {0,0,0,0}; // base node position between columns [0.-1.] if ( createNode ) { for ( k = 0; k < NB_WALL_FACES ; ++k ) { ratio[ k ] = SetHorizEdgeXYZ (aBNXYZ, wallFaceID[ k ], @@ -656,7 +658,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh() } // // 2. Make pentahedrons - int aID0, k , aJ[3]; + int aID0, k , aJ[4]; vector aN; // SMDS_ElemIteratorPtr itf, aItNodes; @@ -673,7 +675,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh() int nbFaceNodes = pE0->NbNodes(); if(myCreateQuadratic) nbFaceNodes = nbFaceNodes/2; - if ( aN.size() < nbFaceNodes * 2 ) + if ( (int) aN.size() < nbFaceNodes * 2 ) aN.resize( nbFaceNodes * 2 ); // for ( k=0; kNbNodes(); if(myCreateQuadratic) aNbNodes = aNbNodes/2; - if ( aNodes1.size() < aNbNodes ) + if ( (int) aNodes1.size() < aNbNodes ) aNodes1.resize( aNbNodes ); // k = aNbNodes-1; // reverse a face @@ -1366,7 +1368,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes, // find the other edges of theFace and orientation of e1 TopoDS_Edge e1, e2, eTop; - bool rev1, CumOri = false; + bool rev1 = false, CumOri = false; TopExp_Explorer exp( theFace, TopAbs_EDGE ); int nbEdges = 0; for ( ; exp.More(); exp.Next() ) { @@ -1475,7 +1477,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes, nVec.resize( vsize, nullNode ); loadedNodes.insert( nVec[ 0 ] = node ); } - if ( theIJNodes.size() != hsize ) { + if ( (int) theIJNodes.size() != hsize ) { MESSAGE( "Wrong node positions on theBaseEdge" ); return false; } @@ -1533,7 +1535,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes, const SMDS_MeshElement* face = 0; do { // look for a face by 2 nodes - face = SMESH_MeshEditor::FindFaceInSet( n1, n2, allFaces, foundFaces ); + face = SMESH_MeshAlgos::FindFaceInSet( n1, n2, allFaces, foundFaces ); if ( face ) { int nbFaceNodes = face->NbNodes(); if ( (!myCreateQuadratic && nbFaceNodes>4) ||