diff --git a/src/sampling/Make/files b/src/sampling/Make/files
index 22c32f0eeb..ad272d0e20 100644
--- a/src/sampling/Make/files
+++ b/src/sampling/Make/files
@@ -80,5 +80,6 @@ meshToMesh0/meshToMesh0.C
meshToMesh0/calculateMeshToMesh0Addressing.C
meshToMesh0/calculateMeshToMesh0Weights.C
+functions/Function1/makeFunction1s.C
LIB = $(FOAM_LIBBIN)/libsampling
diff --git a/src/sampling/functions/Function1/Sample/SampleFunction1.C b/src/sampling/functions/Function1/Sample/SampleFunction1.C
new file mode 100644
index 0000000000..d617ec7d35
--- /dev/null
+++ b/src/sampling/functions/Function1/Sample/SampleFunction1.C
@@ -0,0 +1,185 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2021 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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 "SampleFunction1.H"
+#include "volFields.H"
+#include "interpolation.H"
+#include "pointIOField.H"
+
+// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+
+template
+void Foam::Function1Types::Sample::setSampleCell() const
+{
+ const polyMesh& mesh = this->template mesh();
+
+ const auto& points = static_cast(mesh.points());
+
+ if (pointEventNo_ < points.eventNo())
+ {
+ pointEventNo_ = points.eventNo();
+
+ celli_ = this->template mesh().findCell(position_);
+
+ if (!returnReduce(celli_ != -1, orOp()))
+ {
+ FatalErrorInFunction
+ << "Sample cell could not be found at position "
+ << position_ << nl
+ << exit(FatalError);
+ }
+
+ if (debug)
+ {
+ Pout<< "Position: " << position_
+ << " celli:" << celli_
+ << " eventNo:" << pointEventNo_
+ << " points eventNo:" << points.eventNo()
+ << endl;
+ }
+ }
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+template
+Foam::Function1Types::Sample::Sample
+(
+ const word& entryName,
+ const dictionary& dict,
+ const objectRegistry* obrPtr
+)
+:
+ Function1(entryName, dict, obrPtr),
+ fieldName_(dict.get("field")),
+ position_(dict.get("position")),
+ interpolationScheme_
+ (
+ dict.getOrDefault("interpolationScheme", "cell")
+ ),
+ celli_(-1),
+ pointEventNo_(-1)
+{}
+
+
+template
+Foam::Function1Types::Sample::Sample(const Sample& s)
+:
+ Function1(s),
+ fieldName_(s.fieldName_),
+ position_(s.position_),
+ interpolationScheme_(s.interpolationScheme_),
+ celli_(s.celli_),
+ pointEventNo_(s.pointEventNo_)
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+template
+Type Foam::Function1Types::Sample::value(const scalar x) const
+{
+ typedef GeometricField VolFieldType;
+
+ const auto& mesh = this->template mesh();
+
+ const auto* fieldPtr = mesh.template cfindObject(fieldName_);
+
+ if (!fieldPtr)
+ {
+ FatalErrorInFunction
+ << "Unable to find field " << fieldName_ << " on the mesh database"
+ << ". Valid " << VolFieldType::typeName << " fields are:"
+ << mesh.names(VolFieldType::typeName)
+ << exit(FatalError);
+ }
+
+
+ // Might trigger parallel comms (e.g. volPointInterpolation, if
+ // result is not yet cached) so have all processors do it
+ autoPtr> interpolator
+ (
+ interpolation::New(interpolationScheme_, *fieldPtr)
+ );
+
+ Type result = pTraits::min;
+
+ setSampleCell();
+
+ if (celli_ != -1)
+ {
+ result = interpolator().interpolate(position_, celli_, -1);
+ }
+
+ reduce(result, maxOp());
+
+ DebugInfo << "sampled value: " << result << endl;
+
+ return result;
+}
+
+
+template
+Type Foam::Function1Types::Sample::integrate
+(
+ const scalar x1,
+ const scalar x2
+) const
+{
+ NotImplemented;
+
+ return Zero;
+}
+
+
+template
+void Foam::Function1Types::Sample::writeEntries(Ostream& os) const
+{
+ os.writeEntry("field", fieldName_);
+ os.writeEntry("position", position_);
+
+ os.writeEntryIfDifferent
+ (
+ "interpolationScheme", "cell", interpolationScheme_
+ );
+}
+
+
+template
+void Foam::Function1Types::Sample::writeData(Ostream& os) const
+{
+ Function1::writeData(os);
+ os.endEntry();
+
+ os.beginBlock(word(this->name() + "Coeffs"));
+ writeEntries(os);
+ os.endBlock();
+}
+
+
+// ************************************************************************* //
diff --git a/src/sampling/functions/Function1/Sample/SampleFunction1.H b/src/sampling/functions/Function1/Sample/SampleFunction1.H
new file mode 100644
index 0000000000..11e27aadc4
--- /dev/null
+++ b/src/sampling/functions/Function1/Sample/SampleFunction1.H
@@ -0,0 +1,166 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2021 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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 .
+
+Class
+ Foam::Function1Types::sample
+
+Description
+ Minimal example by using \c system/controlDict.functions:
+ \verbatim
+
+ \verbatim
+ sample;
+ Coeffs
+ {
+ field ;
+ position (0 0 0);
+ interpolationScheme cell;
+ }
+ \endverbatim
+
+SourceFiles
+ sampleFunction1.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Function1Types_Sample_H
+#define Function1Types_Sample_H
+
+#include "Function1.H"
+#include "point.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace Function1Types
+{
+
+/*---------------------------------------------------------------------------*\
+ Class Sample Declaration
+\*---------------------------------------------------------------------------*/
+
+template
+class Sample
+:
+ public Function1
+{
+ // Private Data
+
+ //- Name of field to sample
+ const word fieldName_;
+
+ //- Sample position
+ const point position_;
+
+ //- Interpolation scheme name; default = "cell"
+ const word interpolationScheme_;
+
+ //- Sample cell
+ mutable label celli_;
+
+ //- Points event number used to determine if celli should be updated
+ mutable label pointEventNo_;
+
+
+ // Private Member Functions
+
+ //- Set the sample celli; error on not found
+ void setSampleCell() const;
+
+ //- No copy assignment
+ void operator=(const Sample&) = delete;
+
+
+public:
+
+ //- Runtime type information
+ TypeName("sample");
+
+
+ // Constructors
+
+ //- Construct from entry name, dictionary and optional registry
+ Sample
+ (
+ const word& entryName,
+ const dictionary& dict,
+ const objectRegistry* obrPtr = nullptr
+ );
+
+ //- Construct from components
+ Sample
+ (
+ const word& entryName,
+ const List>& coeffs,
+ const objectRegistry* obrPtr = nullptr
+ );
+
+ //- Copy constructor
+ explicit Sample(const Sample& poly);
+
+ //- Construct and return a clone
+ virtual tmp> clone() const
+ {
+ return tmp>(new Sample(*this));
+ }
+
+
+ //- Destructor
+ virtual ~Sample() = default;
+
+
+ // Member Functions
+
+ //- Return Sample value
+ virtual Type value(const scalar x) const;
+
+ //- Integrate between two (scalar) values
+ virtual Type integrate(const scalar x1, const scalar x2) const;
+
+ //- Write as primitive (inline) format
+ virtual void writeData(Ostream& os) const;
+
+ //- Write coefficient entries in dictionary format
+ void writeEntries(Ostream& os) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Function1Types
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+ #include "SampleFunction1.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/sampling/functions/Function1/makeFunction1s.C b/src/sampling/functions/Function1/makeFunction1s.C
new file mode 100644
index 0000000000..7739a872e7
--- /dev/null
+++ b/src/sampling/functions/Function1/makeFunction1s.C
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | www.openfoam.com
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+ Copyright (C) 2021 OpenCFD Ltd.
+-------------------------------------------------------------------------------
+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 "SampleFunction1.H"
+#include "fieldTypes.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#define makeFunction1s(Type) \
+ makeFunction1Type(Sample, Type);
+
+namespace Foam
+{
+ makeFunction1s(scalar);
+ makeFunction1s(vector);
+ makeFunction1s(sphericalTensor);
+ makeFunction1s(symmTensor);
+ makeFunction1s(tensor);
+}
+
+
+// ************************************************************************* //