diff --git a/src/sampling/Make/files b/src/sampling/Make/files index 17099071a5..649f05523d 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -11,7 +11,7 @@ sampledSet/polyLine/polyLineSet.C sampledSet/face/faceOnlySet.C sampledSet/midPoint/midPointSet.C sampledSet/midPointAndFace/midPointAndFaceSet.C -/* sampledSet/patchSeed/patchSeedSet.C */ +sampledSet/patchSeed/patchSeedSet.C sampledSet/sampledSet/sampledSet.C sampledSet/sampledSets/sampledSets.C sampledSet/sampledSets/sampledSetsGrouping.C diff --git a/src/sampling/sampledSet/patchSeed/patchSeedSet.C b/src/sampling/sampledSet/patchSeed/patchSeedSet.C new file mode 100644 index 0000000000..09da94f70e --- /dev/null +++ b/src/sampling/sampledSet/patchSeed/patchSeedSet.C @@ -0,0 +1,239 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "patchSeedSet.H" +#include "polyMesh.H" +#include "addToRunTimeSelectionTable.H" +#include "treeBoundBox.H" +#include "treeDataFace.H" +#include "Time.H" +#include "meshTools.H" +//#include "Random.H" +// For 'facePoint' helper function only +#include "mappedPatchBase.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(patchSeedSet, 0); + addToRunTimeSelectionTable(sampledSet, patchSeedSet, word); +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::patchSeedSet::calcSamples +( + DynamicList& samplingPts, + DynamicList