From ce66305970d73f2f30f79ad0f85336dac41f914c Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 8 Apr 2015 18:46:19 +0300 Subject: [PATCH] 0052673: Viscous Layers hypothesis is not taken into account by NETGEN 3D algo --- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 17 ++++++++++++----- src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx | 8 ++++---- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 433c7bf..5936524 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -1373,7 +1373,7 @@ void NETGENPlugin_Mesher::AddIntVerticesInSolids(const netgen::OCCGeometry& ofstream py(DUMP_TRIANGLES_SCRIPT); py << "import SMESH"<< endl << "from salome.smesh import smeshBuilder"<& nodeVec) (COMPERR_BAD_INPUT_MESH, "Some edges multiple times in surface mesh"); SMESH_File file("test.out"); vector two(2); + vector three1(3), three2(3); const char* badEdgeStr = " multiple times in surface mesh"; const int badEdgeStrLen = strlen( badEdgeStr ); + while( !file.eof() ) { if ( strncmp( file, "Edge ", 5 ) == 0 && @@ -3270,7 +3272,6 @@ NETGENPlugin_Mesher::ReadErrors(const vector& nodeVec) // openelement 18 with open element 126 // 41 36 38 // 69 70 72 - vector three1(3), three2(3); file.getLine(); const char* pos = file; bool ok = ( strncmp( file, "openelement ", 12 ) == 0 ); @@ -3301,6 +3302,12 @@ NETGENPlugin_Mesher::ReadErrors(const vector& nodeVec) ++file; } } + +#ifdef _DEBUG_ + size_t nbBadElems = err->myBadElements.size(); + nbBadElems = 0; +#endif + return err; } diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 228e9bf..b16e00b 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -162,14 +162,15 @@ bool NETGENPlugin_NETGEN_3D::CheckHypothesis (SMESH_Mesh& aMesh, { if ( !_hypMaxElementVolume ) _hypMaxElementVolume = dynamic_cast< const StdMeshers_MaxElementVolume*> ( *h ); - // if ( !_viscousLayersHyp ) several _viscousLayersHyp's allowed + if ( !_viscousLayersHyp ) // several _viscousLayersHyp's allowed _viscousLayersHyp = dynamic_cast< const StdMeshers_ViscousLayers*> ( *h ); if ( ! _hypParameters ) _hypParameters = dynamic_cast< const NETGENPlugin_Hypothesis*> ( *h ); if ( *h != _hypMaxElementVolume && *h != _viscousLayersHyp && - *h != _hypParameters) + *h != _hypParameters && + !dynamic_cast< const StdMeshers_ViscousLayers*>(*h)) // several VL hyps allowed aStatus = HYP_INCOMPATIBLE; } if ( _hypMaxElementVolume && _hypParameters ) @@ -467,9 +468,8 @@ bool NETGENPlugin_NETGEN_3D::compute(SMESH_Mesh& aMesh, try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 OCC_CATCH_SIGNALS; -#endif + #ifdef NETGEN_V5 ngMesh->CalcLocalH(netgen::mparam.grading); err = netgen::OCCGenerateMesh(occgeo, ngMesh, netgen::mparam, startWith, endWith); -- 2.30.2