From a7bfd07363ded3af71ef785e65541b7d830ae47b Mon Sep 17 00:00:00 2001
From: Franjo Juretic <franjo.juretic@c-fields.com>
Date: Mon, 1 Jun 2015 15:41:11 +0200
Subject: [PATCH] Information about points in the boundary layer

---
 .../refineBoundaryLayers.C                    | 30 +++++++++++++++++++
 .../refineBoundaryLayers.H                    |  7 +++++
 2 files changed, 37 insertions(+)

diff --git a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C
index 835ffc0a..0e757a73 100644
--- a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C
+++ b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C
@@ -372,6 +372,36 @@ void refineBoundaryLayers::refineLayers()
     Info << "Finished refining boundary layers" << endl;
 }
 
+void refineBoundaryLayers::pointsInBndLayer(labelLongList& layerPoints)
+{
+    layerPoints.clear();
+
+    boolList pointInLayer(mesh_.points().size(), false);
+
+    forAll(newVerticesForSplitEdge_, seI)
+    {
+        forAllRow(newVerticesForSplitEdge_, seI, i)
+            pointInLayer[newVerticesForSplitEdge_(seI, i)] = true;
+    }
+
+    forAll(pointInLayer, pointI)
+        if( pointInLayer[pointI] )
+            layerPoints.append(pointI);
+}
+
+void refineBoundaryLayers::pointsInBndLayer(const word subsetName)
+{
+    label sId = mesh_.pointSubsetIndex(subsetName);
+    if( sId < 0 )
+        sId = mesh_.addPointSubset(subsetName);
+
+    forAll(newVerticesForSplitEdge_, seI)
+    {
+        forAllRow(newVerticesForSplitEdge_, seI, i)
+            mesh_.addPointToSubset(sId, newVerticesForSplitEdge_(seI, i));
+    }
+}
+
 void refineBoundaryLayers::readSettings
 (
     const dictionary& meshDict,
diff --git a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.H b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.H
index 6a3bbd24..40487b8d 100644
--- a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.H
+++ b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.H
@@ -401,6 +401,13 @@ public:
         //- performs refinement based on the given settings
         void refineLayers();
 
+    // Post information
+        //- provide the list of points in the boundary layer
+        void pointsInBndLayer(labelLongList&);
+
+        //- create a subset containing points in the boundary layer
+        void pointsInBndLayer(const word subsetName="pointsInBndLayer");
+
     // Static member functions
         //- read the settings from dictionary
         static void readSettings(const dictionary&, refineBoundaryLayers&);
-- 
GitLab