Foam::tmp<Foam::Field<Type> > Foam::sampledIsoSurface::interpolateField ( const interpolation<Type>& interpolator ) const { // Get fields to sample. Assume volPointInterpolation! const GeometricField<Type, fvPatchField, volMesh>& volFld = interpolator.psi(); // Recreate geometry if time has changed updateGeometry(); if (subMeshPtr_.valid()) { tmp<GeometricField<Type, fvPatchField, volMesh> > tvolSubFld = subMeshPtr_().interpolate(volFld); const GeometricField<Type, fvPatchField, volMesh>& volSubFld = tvolSubFld(); tmp<GeometricField<Type, pointPatchField, pointMesh> > tpointSubFld = volPointInterpolation::New(volSubFld.mesh()).interpolate(volSubFld); // Sample. return surface().interpolate ( ( average_ ? pointAverage(tpointSubFld())() : volSubFld ), tpointSubFld() ); } else { tmp<GeometricField<Type, pointPatchField, pointMesh> > tpointFld = volPointInterpolation::New(volFld.mesh()).interpolate(volFld); // Sample. return surface().interpolate ( ( average_ ? pointAverage(tpointFld())() : volFld ), tpointFld() ); } }
Foam::tmp<Foam::Field<Type> > Foam::distanceSurface::interpolateField ( const interpolation<Type>& interpolator ) const { const fvMesh& fvm = static_cast<const fvMesh&>(mesh()); // Get fields to sample. Assume volPointInterpolation! const GeometricField<Type, fvPatchField, volMesh>& volFld = interpolator.psi(); tmp<GeometricField<Type, pointPatchField, pointMesh> > pointFld ( volPointInterpolation::New(fvm).interpolate(volFld) ); // Sample. if (cell_) { return isoSurfCellPtr_().interpolate ( ( average_ ? pointAverage(pointFld())() : volFld ), pointFld() ); } else { return isoSurfPtr_().interpolate ( ( average_ ? pointAverage(pointFld())() : volFld ), pointFld() ); } }
Foam::tmp<Foam::Field<Type> > Foam::distanceSurface::interpolateField ( const interpolation<Type>& interpolator ) const { const fvMesh& fvm = static_cast<const fvMesh&>(mesh()); // Get fields to sample. Assume volPointInterpolation! const GeometricField<Type, fvPatchField, volMesh>& volFld = interpolator.psi(); tmp<GeometricField<Type, pointPatchField, pointMesh> > pointFld ( volPointInterpolation::New(fvm).interpolate(volFld) ); // Sample. return surface().interpolate(volFld, pointFld()); }