A sampledSurface defined by a distance to a surface. More...
Public Member Functions | |
TypeName ("distanceSurface") | |
Runtime type information. More... | |
distanceSurface (const word &name, const polyMesh &mesh, const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~distanceSurface () |
Destructor. More... | |
virtual bool | needsUpdate () const |
Does the surface need an update? More... | |
virtual bool | expire () |
Mark the surface as needing an update. More... | |
virtual bool | update () |
Update the surface as required. More... | |
virtual const pointField & | points () const |
Points of surface. More... | |
virtual const faceList & | faces () const |
Faces of surface. More... | |
const isoSurface & | surface () const |
virtual tmp< scalarField > | sample (const volScalarField &) const |
Sample field on surface. More... | |
virtual tmp< vectorField > | sample (const volVectorField &) const |
Sample field on surface. More... | |
virtual tmp< sphericalTensorField > | sample (const volSphericalTensorField &) const |
Sample field on surface. More... | |
virtual tmp< symmTensorField > | sample (const volSymmTensorField &) const |
Sample field on surface. More... | |
virtual tmp< tensorField > | sample (const volTensorField &) const |
Sample field on surface. More... | |
virtual tmp< scalarField > | interpolate (const interpolation< scalar > &) const |
Interpolate field on surface. More... | |
virtual tmp< vectorField > | interpolate (const interpolation< vector > &) const |
Interpolate field on surface. More... | |
virtual tmp< sphericalTensorField > | interpolate (const interpolation< sphericalTensor > &) const |
Interpolate field on surface. More... | |
virtual tmp< symmTensorField > | interpolate (const interpolation< symmTensor > &) const |
Interpolate field on surface. More... | |
virtual tmp< tensorField > | interpolate (const interpolation< tensor > &) const |
Interpolate field on surface. More... | |
virtual void | print (Ostream &) const |
Write. More... | |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleField (const GeometricField< Type, fvPatchField, volMesh > &vField) const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | interpolateField (const interpolation< Type > &interpolator) const |
Public Member Functions inherited from sampledSurface | |
TypeName ("sampledSurface") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict)) | |
Declare run-time constructor selection table. More... | |
sampledSurface (const word &name, const polyMesh &, const bool interpolate=false) | |
Construct from name, mesh. More... | |
sampledSurface (const word &name, const polyMesh &, const dictionary &) | |
Construct from dictionary. More... | |
autoPtr< sampledSurface > | clone () const |
Clone. More... | |
virtual | ~sampledSurface () |
Destructor. More... | |
const polyMesh & | mesh () const |
Access to the underlying mesh. More... | |
const word & | name () const |
Name of surface. More... | |
bool | interpolate () const |
Interpolation requested for surface. More... | |
virtual const vectorField & | Sf () const |
Return face area vectors. More... | |
virtual const scalarField & | magSf () const |
Return face area magnitudes. More... | |
virtual const vectorField & | Cf () const |
Return face centres as vectorField. More... | |
scalar | area () const |
The total surface area. More... | |
template<class Type > | |
Type | integrate (const Field< Type > &) const |
Integration of a field across the surface. More... | |
template<class Type > | |
Type | integrate (const tmp< Field< Type >> &) const |
Integration of a field across the surface. More... | |
template<class Type > | |
Type | average (const Field< Type > &) const |
Area-averaged value of a field across the surface. More... | |
template<class Type > | |
Type | average (const tmp< Field< Type >> &) const |
Area-averaged value of a field across the surface. More... | |
tmp< Field< scalar > > | project (const Field< scalar > &) const |
Project field onto surface. More... | |
tmp< Field< scalar > > | project (const Field< vector > &) const |
Project field onto surface. More... | |
tmp< Field< vector > > | project (const Field< sphericalTensor > &) const |
Project field onto surface. More... | |
tmp< Field< vector > > | project (const Field< symmTensor > &) const |
Project field onto surface. More... | |
tmp< Field< vector > > | project (const Field< tensor > &) const |
Project field onto surface. More... | |
template<class Type > | |
tmp< GeometricField< Type, fvPatchField, volMesh > > | pointAverage (const GeometricField< Type, pointPatchField, pointMesh > &pfld) const |
Interpolate from points to cell centre. More... | |
virtual tmp< scalarField > | sample (const surfaceScalarField &) const |
Surface sample field on surface. More... | |
virtual tmp< symmTensorField > | sample (const surfaceSymmTensorField &) const |
Surface sample field on surface. More... | |
virtual tmp< tensorField > | sample (const surfaceTensorField &) const |
Surface sample field on surface. More... | |
virtual void | rename (const word &newName) |
Rename. More... | |
template<class ReturnType , class Type > | |
Foam::tmp< Foam::Field< ReturnType > > | project (const tmp< Field< Type >> &field) const |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > | pointAverage (const GeometricField< Type, pointPatchField, pointMesh > &pfld) const |
Additional Inherited Members | |
Static Public Member Functions inherited from sampledSurface | |
static autoPtr< sampledSurface > | New (const word &name, const polyMesh &, const dictionary &) |
Return a reference to the selected surface. More... | |
Protected Member Functions inherited from sampledSurface | |
virtual void | clearGeom () const |
A sampledSurface defined by a distance to a surface.
{ type distanceSurface; surfaceType searchableBox; min (-1 -1 -1); max (1 1 1); distance 0.1; signed yes; filter full; interpolate yes; }
Property | Description | Required | Default value |
---|---|---|---|
surfaceType | the type of surface to sample from | yes | |
distance | the distance from which to sample the surface | yes | |
signed | sample only on one side of the surface, specified by the sign of the distance | yes | |
filter | the level of filtering to perform on the iso-surface | no | full |
interpolate | interpolate values to the surface points | no | no |
Definition at line 110 of file distanceSurface.H.
distanceSurface | ( | const word & | name, |
const polyMesh & | mesh, | ||
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 318 of file distanceSurface.C.
References polyMesh::boundaryMesh(), polyMesh::cellZones(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, MeshZones< ZoneType, MeshType >::findIndex(), polyBoundaryMesh::findPatchID(), Foam::Info, dictionary::lookup(), polyBoundaryMesh::names(), and WarningInFunction.
|
virtual |
Destructor.
Definition at line 388 of file distanceSurface.C.
TypeName | ( | "distanceSurface" | ) |
Runtime type information.
|
virtual |
Does the surface need an update?
Implements sampledSurface.
Definition at line 394 of file distanceSurface.C.
|
virtual |
Mark the surface as needing an update.
May also free up unneeded data. Return false if surface was already marked as expired.
Implements sampledSurface.
Definition at line 400 of file distanceSurface.C.
References Foam::endl(), and Foam::Pout.
|
virtual |
Update the surface as required.
Do nothing (and return false) if no update was needed
Implements sampledSurface.
Definition at line 422 of file distanceSurface.C.
References Foam::endl(), Foam::Pout, and distanceSurface::sample().
|
inlinevirtual |
Points of surface.
Implements sampledSurface.
Definition at line 207 of file distanceSurface.H.
References isoSurface::points(), and distanceSurface::surface().
|
inlinevirtual |
Faces of surface.
Implements sampledSurface.
Definition at line 213 of file distanceSurface.H.
References isoSurface::faces(), and distanceSurface::surface().
|
inline |
Definition at line 218 of file distanceSurface.H.
References sampledSurface::interpolate(), distanceSurface::print(), and distanceSurface::sample().
Referenced by distanceSurface::faces(), and distanceSurface::points().
|
virtual |
Sample field on surface.
Implements sampledSurface.
Definition at line 444 of file distanceSurface.C.
Referenced by distanceSurface::sample(), distanceSurface::surface(), and distanceSurface::update().
|
virtual |
Sample field on surface.
Implements sampledSurface.
Definition at line 454 of file distanceSurface.C.
References distanceSurface::sample().
|
virtual |
Sample field on surface.
Implements sampledSurface.
Definition at line 464 of file distanceSurface.C.
References distanceSurface::sample().
|
virtual |
Sample field on surface.
Implements sampledSurface.
|
virtual |
Sample field on surface.
Implements sampledSurface.
Definition at line 484 of file distanceSurface.C.
References sampledSurface::interpolate().
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 494 of file distanceSurface.C.
References sampledSurface::interpolate().
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 504 of file distanceSurface.C.
References sampledSurface::interpolate().
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 513 of file distanceSurface.C.
References sampledSurface::interpolate().
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 523 of file distanceSurface.C.
References sampledSurface::interpolate().
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 533 of file distanceSurface.C.
|
virtual |
Write.
Reimplemented from sampledSurface.
Definition at line 541 of file distanceSurface.C.
References Foam::name(), and points.
Referenced by distanceSurface::surface().
Foam::tmp<Foam::Field<Type> > sampleField | ( | const GeometricField< Type, fvPatchField, volMesh > & | vField | ) | const |
Definition at line 34 of file distanceSurfaceTemplates.C.
Foam::tmp<Foam::Field<Type> > interpolateField | ( | const interpolation< Type > & | interpolator | ) | const |
Definition at line 48 of file distanceSurfaceTemplates.C.
References Foam::fvc::interpolate(), DimensionedField< Type, GeoMesh >::mesh(), Foam::compressible::New(), and interpolation< Type >::psi().