diff --git a/src/sampling/Make/files b/src/sampling/Make/files index b6c268be3f..9e4a5f1bb4 100644 --- a/src/sampling/Make/files +++ b/src/sampling/Make/files @@ -1,21 +1,38 @@ probes/probes.C probes/probesFunctionObject.C +sampledSet/coordSet/coordSet.C +sampledSet/sampledSet/sampledSet.C +sampledSet/cloud/cloudSet.C +sampledSet/face/faceOnlySet.C +sampledSet/curve/curveSet.C +sampledSet/uniform/uniformSet.C +sampledSet/midPoint/midPointSet.C +sampledSet/midPointAndFace/midPointAndFaceSet.C +sampledSet/sampledSets/sampledSets.C +sampledSet/sampledSetsFunctionObject/sampledSetsFunctionObject.C + +sampledSet/writers/writer/writers.C +sampledSet/writers/xmgr/xmgrWriters.C +sampledSet/writers/gnuplot/gnuplotWriters.C +sampledSet/writers/jplot/jplotWriters.C +sampledSet/writers/raw/rawWriters.C + cuttingPlane/cuttingPlane.C sampledSurface/patch/sampledPatch.C sampledSurface/plane/sampledPlane.C -sampledSurface/surface/sampledSurface.C -sampledSurface/surfaces/sampledSurfaces.C -sampledSurface/surfacesFunctionObject/surfacesFunctionObject.C +sampledSurface/sampledSurface/sampledSurface.C +sampledSurface/sampledSurfaces/sampledSurfaces.C +sampledSurface/sampledSurfacesFunctionObject/sampledSurfacesFunctionObject.C -surfaceWriters/surfaceWriters.C -surfaceWriters/foamFile/foamFileWriters.C -surfaceWriters/dx/dxWriters.C -surfaceWriters/raw/rawWriters.C -surfaceWriters/vtk/vtkWriters.C -surfaceWriters/stl/stlWriters.C -surfaceWriters/null/nullWriters.C +sampledSurface/writers/surfaceWriters.C +sampledSurface/writers/foamFile/foamFileWriters.C +sampledSurface/writers/dx/dxWriters.C +sampledSurface/writers/raw/rawSurfaceWriters.C +sampledSurface/writers/vtk/vtkWriters.C +sampledSurface/writers/stl/stlWriters.C +sampledSurface/writers/null/nullWriters.C graphField/writePatchGraph.C graphField/writeCellGraph.C diff --git a/src/sampling/Make/options b/src/sampling/Make/options index 083733c5a4..5bfdcb260c 100644 --- a/src/sampling/Make/options +++ b/src/sampling/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/triSurface/lnInclude + -I$(LIB_SRC)/triSurface/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude LIB_LIBS = \ -lfiniteVolume \ diff --git a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C index 5cc1abbf13..39434d92cb 100644 --- a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C +++ b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C @@ -48,7 +48,7 @@ Foam::IOOutputFilter::IOOutputFilter IOobject::NO_WRITE ) ), - OutputFilter(name(), obr, *this, readFromFiles) + OutputFilter(OutputFilter::typeName, obr, *this, readFromFiles) {} diff --git a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H index fde0f91867..aa095f376f 100644 --- a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H +++ b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*---------------------------------------------------------------------------* \ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | @@ -99,14 +99,14 @@ public: virtual void write(); //- Update for changes of mesh - void updateMesh(const mapPolyMesh& mpm) + virtual void updateMesh(const mapPolyMesh& mpm) { read(); OutputFilter::updateMesh(mpm); } //- Update for changes of mesh - void movePoints(const pointField& points) + virtual void movePoints(const pointField& points) { read(); OutputFilter::movePoints(points); diff --git a/src/sampling/probes/probes.H b/src/sampling/probes/probes.H index 267cf42c63..e62fe7a50c 100644 --- a/src/sampling/probes/probes.H +++ b/src/sampling/probes/probes.H @@ -40,6 +40,7 @@ SourceFiles #include "HashPtrTable.H" #include "OFstream.H" +#include "polyMesh.H" #include "pointField.H" #include "volFieldsFwd.H" @@ -207,6 +208,10 @@ public: virtual void movePoints(const pointField&) {} + //- Update for changes of mesh due to readUpdate + virtual void readUpdate(const polyMesh::readUpdateState state) + {} + //- Sample a volume field at all locations template tmp > sample diff --git a/src/sampling/sampledSet/cloud/cloudSet.C b/src/sampling/sampledSet/cloud/cloudSet.C new file mode 100644 index 0000000000..f8fbf8ecdf --- /dev/null +++ b/src/sampling/sampledSet/cloud/cloudSet.C @@ -0,0 +1,171 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. + \\/ 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "cloudSet.H" +#include "sampledSet.H" +#include "meshSearch.H" +#include "DynamicList.H" +#include "polyMesh.H" +#include "addToRunTimeSelectionTable.H" +#include "word.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(cloudSet, 0); + addToRunTimeSelectionTable(sampledSet, cloudSet, word); +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::cloudSet::calcSamples +( + DynamicList& samplingPts, + DynamicList