From: eap Date: Fri, 30 May 2014 12:11:45 +0000 (+0400) Subject: Regression of SALOME_TESTS/Grids/smesh/viscous_layers_00/A6 X-Git-Tag: V7_5_0a1~80 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c365f36e981a2ebce6a3fd7dc5d3314d6214853a;p=modules%2Fsmesh.git Regression of SALOME_TESTS/Grids/smesh/viscous_layers_00/A6 --- diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.cxx b/src/StdMeshers/StdMeshers_ViscousLayers.cxx index 251cfc377..db9243881 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.cxx @@ -1012,8 +1012,11 @@ namespace } //-------------------------------------------------------------------------------- // DEBUG. Dump intermediate node positions into a python script + // HOWTO use: run python commands written in a console to see + // construction steps of viscous layers #ifdef __myDEBUG ofstream* py; + int theNbFunc; struct PyDump { PyDump() { const char* fname = "/tmp/viscous.py"; @@ -1024,19 +1027,20 @@ namespace << "smesh = smeshBuilder.New(salome.myStudy)" << endl << "meshSO = smesh.GetCurrentStudy().FindObjectID('0:1:2:3')" << endl << "mesh = smesh.Mesh( meshSO.GetObject() )"< nodesToSmooth( smoothNodes.size() ); { + dumpFunction(SMESH_Comment("fixUVOnFace")<first); // debug const bool sortSimplices = isConcaveFace; for ( size_t i = 0; i < smoothNodes.size(); ++i ) { @@ -4907,6 +4920,17 @@ bool _ViscousBuilder::shrink() } } } + // TODO: check effect of this additional smooth + // additional laplacian smooth to increase allowed shrink step + // for ( int st = 1; st; --st ) + // { + // dumpFunction(SMESH_Comment("shrinkFace")<first<<"_st"<<++smooStep); // debug + // for ( size_t i = 0; i < nodesToSmooth.size(); ++i ) + // { + // nodesToSmooth[i].Smooth( badNb,surface,helper,refSign, + // _SmoothNode::LAPLACIAN,/*set3D=*/false); + // } + // } } // while ( shrinked ) // No wrongly shaped faces remain; final smooth. Set node XYZ. @@ -4980,7 +5004,7 @@ bool _ViscousBuilder::prepareEdgeToShrink( _LayerEdge& edge, gp_Vec2d uvDir( srcUV, tgtUV ); double uvLen = uvDir.Magnitude(); uvDir /= uvLen; - edge._normal.SetCoord( uvDir.X(),uvDir.Y(), 0); + edge._normal.SetCoord( uvDir.X(),uvDir.Y(), 0 ); edge._len = uvLen; edge._pos.resize(1); @@ -5210,7 +5234,7 @@ bool _LayerEdge::SetNewLength2d( Handle(Geom_Surface)& surface, const double kSafe = Max( 0.5, 1. - 0.1 * _simplices.size() ); // Select shrinking step such that not to make faces with wrong orientation. - double stepSize = uvLen; + double stepSize = 1e100; for ( size_t i = 0; i < _simplices.size(); ++i ) { // find intersection of 2 lines: curUV-tgtUV and that connecting simplex nodes @@ -5225,7 +5249,7 @@ bool _LayerEdge::SetNewLength2d( Handle(Geom_Surface)& surface, stepSize = Min( step, stepSize ); } gp_Pnt2d newUV; - if ( uvLen - stepSize < _len / 200. ) + if ( uvLen <= stepSize ) { newUV = tgtUV; _pos.clear();