Salome HOME
IPAL53702: Quadrangle mapping does not use some boundary nodes
authoreap <eap@opencascade.com>
Tue, 24 Jan 2017 16:31:19 +0000 (19:31 +0300)
committereap <eap@opencascade.com>
Tue, 24 Jan 2017 16:31:19 +0000 (19:31 +0300)
IPAL53864: Viscous Layers 2D fails and is uneven at some points
    Fix failure but non-uniform thickness remains

src/SMESH_SWIG/smeshBuilder.py
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_ViscousLayers2D.cxx

index 1b5f9ecfc739e314b7d9f64fb96640990e992d96..f289a5fe7ed72eebc569d9026d39fcc631b1ccfd 100644 (file)
@@ -1787,27 +1787,29 @@ class Mesh:
             pass
         pass
 
             pass
         pass
 
-    ## Export the mesh in a file in MED format and chooses the \a version of MED format
+    ## Export the mesh in a file in MED format
     ## allowing to overwrite the file if it exists or add the exported data to its contents
     #  @param f is the file name
     #  @param auto_groups boolean parameter for creating/not creating
     #  the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
     ## allowing to overwrite the file if it exists or add the exported data to its contents
     #  @param f is the file name
     #  @param auto_groups boolean parameter for creating/not creating
     #  the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
-    #  the typical use is auto_groups=false.
-    #  @param version MED format version(MED_V2_1 or MED_V2_2)
+    #  the typical use is auto_groups=False.
+    #  @param version MED format version (MED_V2_1 or MED_V2_2,
+    #                 the latter meaning any current version). The parameter is
+    #                 obsolete since MED_V2_1 is no longer supported.
     #  @param overwrite boolean parameter for overwriting/not overwriting the file
     #  @param meshPart a part of mesh (group, sub-mesh) to export instead of the mesh
     #  @param overwrite boolean parameter for overwriting/not overwriting the file
     #  @param meshPart a part of mesh (group, sub-mesh) to export instead of the mesh
-    #  @param autoDimension: if @c True (default), a space dimension of a MED mesh can be either
+    #  @param autoDimension if @c True (default), a space dimension of a MED mesh can be either
     #         - 1D if all mesh nodes lie on OX coordinate axis, or
     #         - 2D if all mesh nodes lie on XOY coordinate plane, or
     #         - 1D if all mesh nodes lie on OX coordinate axis, or
     #         - 2D if all mesh nodes lie on XOY coordinate plane, or
-    #         - 3D in the rest cases.
+    #         - 3D in the rest cases.<br>
     #         If @a autoDimension is @c False, the space dimension is always 3.
     #         If @a autoDimension is @c False, the space dimension is always 3.
-    #  @param fields list of GEOM fields defined on the shape to mesh.
-    #  @param geomAssocFields each character of this string means a need to export a 
+    #  @param fields list of GEOM fields defined on the shape to mesh.
+    #  @param geomAssocFields each character of this string means a need to export a 
     #         corresponding field; correspondence between fields and characters is following:
     #         corresponding field; correspondence between fields and characters is following:
-    #         - 'v' stands for _vertices_ field;
-    #         - 'e' stands for _edges_ field;
-    #         - 'f' stands for _faces_ field;
-    #         - 's' stands for _solids_ field.
+    #         - 'v' stands for "_vertices _" field;
+    #         - 'e' stands for "_edges _" field;
+    #         - 'f' stands for "_faces _" field;
+    #         - 's' stands for "_solids _" field.
     #  @ingroup l2_impexp
     def ExportMED(self, f, auto_groups=0, version=MED_V2_2,
                   overwrite=1, meshPart=None, autoDimension=True, fields=[], geomAssocFields=''):
     #  @ingroup l2_impexp
     def ExportMED(self, f, auto_groups=0, version=MED_V2_2,
                   overwrite=1, meshPart=None, autoDimension=True, fields=[], geomAssocFields=''):
@@ -1906,22 +1908,23 @@ class Mesh:
             meshPart = self.mesh
         self.mesh.ExportGMF(meshPart, f, True)
 
             meshPart = self.mesh
         self.mesh.ExportGMF(meshPart, f, True)
 
-    ## Deprecated, used only for compatibility! Please, use ExportToMEDX() method instead.
-    #  Export the mesh in a file in MED format and chooses the \a version of MED format
-    ## allowing to overwrite the file if it exists or add the exported data to its contents
+    ## Deprecated, used only for compatibility! Please, use ExportMED() method instead.
+    #  Export the mesh in a file in MED format
+    #  allowing to overwrite the file if it exists or add the exported data to its contents
     #  @param f the file name
     #  @param f the file name
-    #  @param version values are SMESH.MED_V2_1, SMESH.MED_V2_2
+    #  @param version MED format version (MED_V2_1 or MED_V2_2,
+    #                 the latter meaning any current version). The parameter is
+    #                 obsolete since MED_V2_1 is no longer supported.
     #  @param opt boolean parameter for creating/not creating
     #         the groups Group_On_All_Nodes, Group_On_All_Faces, ...
     #  @param overwrite boolean parameter for overwriting/not overwriting the file
     #  @param opt boolean parameter for creating/not creating
     #         the groups Group_On_All_Nodes, Group_On_All_Faces, ...
     #  @param overwrite boolean parameter for overwriting/not overwriting the file
-    #  @param autoDimension: if @c True (default), a space dimension of a MED mesh can be either
+    #  @param autoDimension if @c True (default), a space dimension of a MED mesh can be either
     #         - 1D if all mesh nodes lie on OX coordinate axis, or
     #         - 2D if all mesh nodes lie on XOY coordinate plane, or
     #         - 1D if all mesh nodes lie on OX coordinate axis, or
     #         - 2D if all mesh nodes lie on XOY coordinate plane, or
-    #         - 3D in the rest cases.
-    #
+    #         - 3D in the rest cases.<br>
     #         If @a autoDimension is @c False, the space dimension is always 3.
     #  @ingroup l2_impexp
     #         If @a autoDimension is @c False, the space dimension is always 3.
     #  @ingroup l2_impexp
-    def ExportToMED(self, f, version, opt=0, overwrite=1, autoDimension=True):
+    def ExportToMED(self, f, version=MED_V2_2, opt=0, overwrite=1, autoDimension=True):
         self.mesh.ExportToMEDX(f, opt, version, overwrite, autoDimension)
 
     # Operations with groups:
         self.mesh.ExportToMEDX(f, opt, version, overwrite, autoDimension)
 
     # Operations with groups:
index d72434501ffbeac6ffbcbb37ddab1e37da0cb90c..15a7595d52f81c4490d0cb3aeead52eed098ccb1 100644 (file)
@@ -4523,7 +4523,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
       // move corners to make sides equal by length
       int nbEqualV  = equVerts.size();
       int nbExcessV = nbEqualV - ( 1 + nbC[0] + nbC[1] );
       // move corners to make sides equal by length
       int nbEqualV  = equVerts.size();
       int nbExcessV = nbEqualV - ( 1 + nbC[0] + nbC[1] );
-      if ( nbExcessV > 0 ) // there is nbExcessV vertices that can become corners
+      if ( nbExcessV > 0 ) // there are nbExcessV vertices that can become corners
       {
         // calculate normalized length of each "side" enclosed between neighbor equVerts
         vector< double > accuLength;
       {
         // calculate normalized length of each "side" enclosed between neighbor equVerts
         vector< double > accuLength;
@@ -4584,6 +4584,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face&          theFace,
           if ( iBestEV > iS-1 + nbExcessV )
             iBestEV = iS-1 + nbExcessV;
           theVertices[ iCorner ] = helper.IthVertex( 0, edgeVec[ evVec[ iBestEV ]]);
           if ( iBestEV > iS-1 + nbExcessV )
             iBestEV = iS-1 + nbExcessV;
           theVertices[ iCorner ] = helper.IthVertex( 0, edgeVec[ evVec[ iBestEV ]]);
+          cornerInd  [ iCorner ] = evVec[ iBestEV ];
           refinedCorners.insert( evVec[ iBestEV ]);
           iCorner = helper.WrapIndex( iCorner + 1, cornerInd.size() );
         }
           refinedCorners.insert( evVec[ iBestEV ]);
           iCorner = helper.WrapIndex( iCorner + 1, cornerInd.size() );
         }
index 2de6e474c556a93f01fa94c5d496232c637a5a60..e6f196aaf635f1401d2247d7e15079d3cf44cdcd 100644 (file)
@@ -1263,7 +1263,7 @@ void _ViscousBuilder2D::adjustCommonEdge( _PolyLine& LL, _PolyLine& LR )
           if ( isR )
             LR._lEdges.erase( LR._lEdges.begin()+1, eIt );
           else
           if ( isR )
             LR._lEdges.erase( LR._lEdges.begin()+1, eIt );
           else
-            LL._lEdges.erase( eIt, --LL._lEdges.end() );
+            LL._lEdges.erase( eIt+1, --LL._lEdges.end() );
           // eIt = isR ? L._lEdges.begin()+1 : L._lEdges.end()-2;
           // for ( size_t i = 1; i < iLE; ++i, eIt += dIt )
           //   eIt->_isBlocked = true;
           // eIt = isR ? L._lEdges.begin()+1 : L._lEdges.end()-2;
           // for ( size_t i = 1; i < iLE; ++i, eIt += dIt )
           //   eIt->_isBlocked = true;