diff --git a/etc/caseDicts/postProcessing/graphs/sampleDict.cfg b/etc/caseDicts/postProcessing/graphs/sampleDict.cfg index e1a67308bb..0062a22848 100644 --- a/etc/caseDicts/postProcessing/graphs/sampleDict.cfg +++ b/etc/caseDicts/postProcessing/graphs/sampleDict.cfg @@ -12,8 +12,8 @@ setFormat raw; setConfig { - type uniform; // midPoint, midPointAndFace - axis distance; // x, y, z, xyz + type lineUniform; // lineCell, lineCellFace + axis distance; // x, y, z, xyz nPoints 100; } diff --git a/etc/caseDicts/postProcessing/graphs/singleGraph b/etc/caseDicts/postProcessing/graphs/singleGraph index 76389e6881..8b8b416cc8 100644 --- a/etc/caseDicts/postProcessing/graphs/singleGraph +++ b/etc/caseDicts/postProcessing/graphs/singleGraph @@ -19,7 +19,7 @@ fields (U p); #includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg" // Override settings here, e.g. -// setConfig { type midPoint; } +// setConfig { type lineCell; } // Must be last entry #includeEtc "caseDicts/postProcessing/graphs/graph.cfg" diff --git a/etc/caseDicts/postProcessing/probes/boundaryCloud b/etc/caseDicts/postProcessing/probes/boundaryPoints similarity index 82% rename from etc/caseDicts/postProcessing/probes/boundaryCloud rename to etc/caseDicts/postProcessing/probes/boundaryPoints index 5847972f15..8ca75c9938 100644 --- a/etc/caseDicts/postProcessing/probes/boundaryCloud +++ b/etc/caseDicts/postProcessing/probes/boundaryPoints @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Writes out values of fields at a cloud of points, interpolated to + Writes out values of fields at a specified list of points, interpolated to specified boundary patches. \*---------------------------------------------------------------------------*/ @@ -22,6 +22,6 @@ maxDistance 0.1; patches (".*"); -#includeEtc "caseDicts/postProcessing/probes/boundaryCloud.cfg" +#includeEtc "caseDicts/postProcessing/probes/boundaryPoints.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/boundaryCloud.cfg b/etc/caseDicts/postProcessing/probes/boundaryPoints.cfg similarity index 88% rename from etc/caseDicts/postProcessing/probes/boundaryCloud.cfg rename to etc/caseDicts/postProcessing/probes/boundaryPoints.cfg index d90c94122b..7993a883ea 100644 --- a/etc/caseDicts/postProcessing/probes/boundaryCloud.cfg +++ b/etc/caseDicts/postProcessing/probes/boundaryPoints.cfg @@ -6,13 +6,13 @@ | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/probes/cloud.cfg" +#includeEtc "caseDicts/postProcessing/probes/points.cfg" sets ( - cloud + points { - type patchCloud; + type boundaryPoints; axis xyz; points $points; maxDistance $maxDistance; diff --git a/etc/caseDicts/postProcessing/probes/internalCloud b/etc/caseDicts/postProcessing/probes/internalPoints similarity index 80% rename from etc/caseDicts/postProcessing/probes/internalCloud rename to etc/caseDicts/postProcessing/probes/internalPoints index a2f8794f44..ed2d56f6f7 100644 --- a/etc/caseDicts/postProcessing/probes/internalCloud +++ b/etc/caseDicts/postProcessing/probes/internalPoints @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Description - Writes out values of fields interpolated to a specified cloud of points. + Writes out values of fields interpolated to a specified list of points. \*---------------------------------------------------------------------------*/ @@ -16,6 +16,6 @@ points (0 0 0) ); -#includeEtc "caseDicts/postProcessing/probes/internalCloud.cfg" +#includeEtc "caseDicts/postProcessing/probes/internalPoints.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/probes/internalCloud.cfg b/etc/caseDicts/postProcessing/probes/internalPoints.cfg similarity index 88% rename from etc/caseDicts/postProcessing/probes/internalCloud.cfg rename to etc/caseDicts/postProcessing/probes/internalPoints.cfg index 19bf54f898..557dbe3286 100644 --- a/etc/caseDicts/postProcessing/probes/internalCloud.cfg +++ b/etc/caseDicts/postProcessing/probes/internalPoints.cfg @@ -6,13 +6,13 @@ | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/probes/cloud.cfg" +#includeEtc "caseDicts/postProcessing/probes/points.cfg" sets ( - cloud + points { - type cloud; + type points; axis xyz; points $points; } diff --git a/etc/caseDicts/postProcessing/probes/cloud.cfg b/etc/caseDicts/postProcessing/probes/points.cfg similarity index 100% rename from etc/caseDicts/postProcessing/probes/cloud.cfg rename to etc/caseDicts/postProcessing/probes/points.cfg diff --git a/etc/caseDicts/postProcessing/visualization/streamlines.cfg b/etc/caseDicts/postProcessing/visualization/streamlines.cfg index e352ad963d..94a1c149a9 100644 --- a/etc/caseDicts/postProcessing/visualization/streamlines.cfg +++ b/etc/caseDicts/postProcessing/visualization/streamlines.cfg @@ -22,7 +22,7 @@ cloudName particleTracks; seedSampleSet { - type uniform; + type lineUniform; axis x; start $start; end $end; diff --git a/etc/templates/axisymmetricJet/system/graph b/etc/templates/axisymmetricJet/system/graph index 72b4d2b3cf..94de0e4bc8 100644 --- a/etc/templates/axisymmetricJet/system/graph +++ b/etc/templates/axisymmetricJet/system/graph @@ -28,7 +28,7 @@ graph ( centreline { - type uniform; + type lineUniform; axis x; start ( 0 1e-6 0); end (25 1e-6 0); diff --git a/src/functionObjects/field/interfaceHeight/interfaceHeight.C b/src/functionObjects/field/interfaceHeight/interfaceHeight.C index 325d47ebe9..1ec9c3dc0e 100644 --- a/src/functionObjects/field/interfaceHeight/interfaceHeight.C +++ b/src/functionObjects/field/interfaceHeight/interfaceHeight.C @@ -28,7 +28,7 @@ License #include "interpolation.H" #include "IOmanip.H" #include "meshSearch.H" -#include "midPointAndFaceSet.H" +#include "lineCellFaceSet.H" #include "Time.H" #include "uniformDimensionedFields.H" #include "volFields.H" @@ -72,7 +72,7 @@ void Foam::functionObjects::interfaceHeight::writePositions() forAll(locations_, li) { // Create a set along a ray projected in the direction of gravity - const midPointAndFaceSet set + const lineCellFaceSet set ( "", mesh_, diff --git a/src/functionObjects/field/interfaceHeight/interfaceHeight.H b/src/functionObjects/field/interfaceHeight/interfaceHeight.H index d443e1f03b..41e35c02d4 100644 --- a/src/functionObjects/field/interfaceHeight/interfaceHeight.H +++ b/src/functionObjects/field/interfaceHeight/interfaceHeight.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,8 +61,8 @@ SourceFiles #define interfaceHeight_H #include "fvMeshFunctionObject.H" -#include "midPointAndFaceSet.H" #include "logFiles.H" +#include "point.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/sampling/Make/files b/src/sampling/Make/files index 433f174105..60c824d7c7 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -2,20 +2,21 @@ probes/probes.C probes/patchProbes.C probes/probesGrouping.C -sampledSet/circle/circleSet.C -sampledSet/cloud/cloudSet.C -sampledSet/patchCloud/patchCloudSet.C -sampledSet/polyLine/polyLineSet.C -sampledSet/face/faceOnlySet.C -sampledSet/midPoint/midPointSet.C -sampledSet/midPointAndFace/midPointAndFaceSet.C -sampledSet/patchSeed/patchSeedSet.C sampledSet/sampledSet/sampledSet.C sampledSet/sampledSets/sampledSets.C sampledSet/sampledSets/sampledSetsGrouping.C -sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C -sampledSet/uniform/uniformSet.C -sampledSet/array/arraySet.C +sampledSet/arcUniform/arcUniformSet.C +sampledSet/boxUniform/boxUniformSet.C +sampledSet/circleRandom/circleRandomSet.C +sampledSet/lineCell/lineCellSet.C +sampledSet/lineCellFace/lineCellFaceSet.C +sampledSet/lineFace/lineFaceSet.C +sampledSet/lineUniform/lineUniformSet.C +sampledSet/boundaryPoints/boundaryPointsSet.C +sampledSet/boundaryRandom/boundaryRandomSet.C +sampledSet/points/pointsSet.C +sampledSet/sphereRandom/sphereRandomSet.C +sampledSet/triSurfaceMesh/triSurfaceMeshSet.C cuttingPlane/cuttingPlane.C diff --git a/src/sampling/sampledSet/arcUniform/arcUniformSet.C b/src/sampling/sampledSet/arcUniform/arcUniformSet.C new file mode 100644 index 0000000000..0957f4f301 --- /dev/null +++ b/src/sampling/sampledSet/arcUniform/arcUniformSet.C @@ -0,0 +1,148 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2018 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 "arcUniformSet.H" +#include "sampledSet.H" +#include "meshSearch.H" +#include "DynamicList.H" +#include "polyMesh.H" +#include "addToRunTimeSelectionTable.H" +#include "word.H" +#include "unitConversion.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(arcUniformSet, 0); + addToRunTimeSelectionTable(sampledSet, arcUniformSet, word); +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::arcUniformSet::calcSamples +( + DynamicList& samplingPts, + DynamicList