diff --git a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C index 835ffc0a200882d70debd968728036efdaa6c955..0e757a73fd7594687f5cba10a77af1f93bafbf04 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 6a3bbd24667ebfd7dd9dcfe9cc8ff3dcba55b179..40487b8d6cac0ed638d27cc999569d5aaf263b74 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&);