From: akl Date: Mon, 19 Jan 2009 16:14:56 +0000 (+0000) Subject: Fix of 20124 issue (EDF SMESH 920 : "Max element volume" hypothesis is not used)... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ceb1effa03272f30b31253dff500e6e07e7437d5;p=plugins%2Fnetgenplugin.git Fix of 20124 issue (EDF SMESH 920 : "Max element volume" hypothesis is not used): set correct formula of 'maxh' Netgen parameter computation. --- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 165605e..8ab9e6b 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -275,7 +275,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, int Netgen_NbOfNodes = 0; int Netgen_param2ndOrder = 0; double Netgen_paramFine = 1.; - double Netgen_paramSize = _maxElementVolume; + double Netgen_paramSize = pow( 72, 1/6. ) * pow( _maxElementVolume, 1/3. ); double Netgen_point[3]; int Netgen_triangle[3]; @@ -499,7 +499,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, int Netgen_NbOfNodes = 0; int Netgen_param2ndOrder = 0; double Netgen_paramFine = 1.; - double Netgen_paramSize = _maxElementVolume; + double Netgen_paramSize = pow( 72, 1/6. ) * pow( _maxElementVolume, 1/3. ); double Netgen_point[3]; int Netgen_triangle[3]; @@ -600,8 +600,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, { Ng_GetPoint( Netgen_mesh, nodeIndex, Netgen_point ); SMDS_MeshNode * node = aHelper->AddNode(Netgen_point[0], - Netgen_point[1], - Netgen_point[2]); + Netgen_point[1], + Netgen_point[2]); nodeVec.at(nodeIndex) = node; } @@ -610,9 +610,9 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, { Ng_GetVolumeElement(Netgen_mesh, elemIndex, Netgen_tetrahedron); aHelper->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ), - nodeVec.at( Netgen_tetrahedron[1] ), - nodeVec.at( Netgen_tetrahedron[2] ), - nodeVec.at( Netgen_tetrahedron[3] )); + nodeVec.at( Netgen_tetrahedron[1] ), + nodeVec.at( Netgen_tetrahedron[2] ), + nodeVec.at( Netgen_tetrahedron[3] )); } }