diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.C b/src/postProcessing/functionObjects/field/streamLine/streamLine.C index 30d8052513..ab815a8df8 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.C @@ -34,6 +34,7 @@ License #include "globalIndex.H" #include "mapDistribute.H" #include "interpolationCellPoint.H" +#include "PatchTools.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -41,6 +42,57 @@ defineTypeNameAndDebug(Foam::streamLine, 0); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +Foam::autoPtr +Foam::streamLine::wallPatch() const +{ + const fvMesh& mesh = dynamic_cast(obr_); + + const polyBoundaryMesh& patches = mesh.boundaryMesh(); + + label nFaces = 0; + + forAll(patches, patchI) + { + //if (!polyPatch::constraintType(patches[patchI].type())) + if (isA(patches[patchI])) + { + nFaces += patches[patchI].size(); + } + } + + labelList addressing(nFaces); + + nFaces = 0; + + forAll(patches, patchI) + { + //if (!polyPatch::constraintType(patches[patchI].type())) + if (isA(patches[patchI])) + { + const polyPatch& pp = patches[patchI]; + + forAll(pp, i) + { + addressing[nFaces++] = pp.start()+i; + } + } + } + + return autoPtr + ( + new indirectPrimitivePatch + ( + IndirectList + ( + mesh.faces(), + addressing + ), + mesh.points() + ) + ); +} + + void Foam::streamLine::track() { const Time& runTime = obr_.time(); @@ -72,7 +124,7 @@ void Foam::streamLine::track() label nSeeds = returnReduce(particles.size(), sumOp