From 7d2db6738301b172024e1ce6165b78aa7b61bf37 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Wed, 7 Nov 2012 09:00:11 +0000
Subject: [PATCH] ENH: motorBike: enable feature snapping. add patchSummary

---
 .../simpleFoam/motorBike/Allrun               |  2 ++
 .../motorBike/system/snappyHexMeshDict        | 33 ++++++++++++++-----
 2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allrun b/tutorials/incompressible/simpleFoam/motorBike/Allrun
index 714dba48dc3..d3466dcfab5 100755
--- a/tutorials/incompressible/simpleFoam/motorBike/Allrun
+++ b/tutorials/incompressible/simpleFoam/motorBike/Allrun
@@ -6,6 +6,7 @@ cd ${0%/*} || exit 1    # run from this directory
 
 # copy motorbike surface from resources folder
 cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
+runApplication surfaceFeatureExtract
 
 runApplication blockMesh
 
@@ -19,6 +20,7 @@ runParallel snappyHexMesh 6 -overwrite
 ls -d processor* | xargs -i rm -rf ./{}/0 $1
 ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1
 
+runParallel patchSummary 6
 runParallel potentialFoam 6 -noFunctionObjects -writep
 runParallel `getApplication` 6
 
diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict
index 68819f01c42..517ef75b9c0 100644
--- a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict
+++ b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict
@@ -90,10 +90,10 @@ castellatedMeshControls
     // This is a featureEdgeMesh, read from constant/triSurface for now.
     features
     (
-        //{
-        //    file "someLine.eMesh";
-        //    level 2;
-        //}
+        {
+            file "motorBike.eMesh";
+            level 0;
+        }
     );
 
 
@@ -189,10 +189,21 @@ snapControls
     //  before upon reaching a correct mesh.
     nRelaxIter 5;
 
-    //- Highly experimental and wip: number of feature edge snapping
-    //  iterations. Leave out altogether to disable.
-    //  Do not use here since mesh resolution too low and baffles present
-    //nFeatureSnapIter 10;
+    // Feature snapping
+
+        //- Number of feature edge snapping iterations.
+        //  Leave out altogether to disable.
+        nFeatureSnapIter 10;
+
+        //- Detect (geometric only) features by sampling the surface
+        //  (default=false).
+        implicitFeatureSnap false;
+
+        //- Use castellatedMeshControls::features (default = true)
+        explicitFeatureSnap true;
+
+        //- Detect points on multiple surfaces (only for explicitFeatureSnap)
+        multiRegionFeatureSnap true;
 }
 
 
@@ -239,7 +250,11 @@ addLayersControls
 
     //- When not to extrude surface. 0 is flat surface, 90 is when two faces
     //  make straight angle.
-    featureAngle 30;
+    featureAngle 60;
+
+    //- At non-patched sides allow mesh to slip if extrusion direction makes
+    //  angle larger than slipFeatureAngle.
+    slipFeatureAngle 30;
 
     //- Maximum number of snapping relaxation iterations. Should stop
     //  before upon reaching a correct mesh.
-- 
GitLab