38Foam::sampledCuttingPlane::sampleOnFaces
55Foam::sampledCuttingPlane::sampleOnIsoSurfacePoints
63 <<
"cannot call without an iso-surface" <<
nl
68 const auto& volFld = interpolator.
psi();
70 tmp<VolumeField<Type>> tvolFld(volFld);
71 tmp<PointField<Type>> tpointFld;
76 tvolFld.reset(subMeshPtr_->interpolate(volFld));
87 tvolFld.reset(pointAverage(tpointFld()));
90 return isoSurfacePtr_->interpolate(tvolFld(), tpointFld());
96Foam::sampledCuttingPlane::sampleOnPoints
103 return this->sampleOnIsoSurfacePoints(interpolator);
static FOAM_NO_DANGLING_REFERENCE const volPointInterpolation & New(const fvMesh &mesh, Args &&... args)
Abstract base class for volume field interpolation.
const GeometricField< Type, fvPatchField, volMesh > & psi() const noexcept
Return the field to be interpolated.
virtual const pointField & points() const
Points of surface.
const meshedSurface & surface() const
The current surface geometry.
const labelList & meshCells() const
For each face, the original cell in mesh.
static tmp< Field< Type > > sampleOnPoints(const interpolation< Type > &interpolator, const labelUList &elements, const faceList &fcs, const pointField &pts)
Loop for interpolating volume elements to face points.
static tmp< Field< Type > > sampleOnFaces(const interpolation< Type > &sampler, const labelUList &elements, const faceList &fcs, const pointField &pts, const Type &defaultValue=Type(Zero))
Loop for sampling volume elements to faces.
static tmp< VolumeField< Type > > pointAverage(const PointField< Type > &pfld)
Create cell values by averaging the point values.
A class for managing temporary objects.
void reset(tmp< T > &&other) noexcept
Clear existing and transfer ownership.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
Forwards and collection of common volume field types.