A sampledSurface defined by a plane. More...
Public Member Functions | |
TypeName ("sampledCuttingPlane") | |
Runtime type information. More... | |
sampledCuttingPlane (const word &name, const polyMesh &mesh, const dictionary &dict) | |
Construct from dictionary. More... | |
virtual | ~sampledCuttingPlane () |
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 |
![]() | |
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 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 |
Private Member Functions | |
void | createGeometry () |
Create iso surface. More... | |
template<class Type > | |
tmp< Field< Type > > | sampleField (const GeometricField< Type, fvPatchField, volMesh > &vField) const |
Sample field on faces. More... | |
template<class Type > | |
tmp< Field< Type > > | interpolateField (const interpolation< Type > &) const |
Private Attributes | |
const plane | plane_ |
Plane. More... | |
const boundBox | bounds_ |
Optional bounding box to trim triangles against. More... | |
const scalar | mergeTol_ |
Merge tolerance. More... | |
const Switch | regularise_ |
Whether to coarsen. More... | |
const Switch | average_ |
Whether to recalculate cell values as average of point values. More... | |
cellZoneID | zoneID_ |
Zone name/index (if restricted to zones) More... | |
word | exposedPatchName_ |
For zones: patch to put exposed faces into. More... | |
bool | needsUpdate_ |
Track if the surface needs an update. More... | |
autoPtr< fvMeshSubset > | subMeshPtr_ |
Optional subsetted mesh. More... | |
autoPtr< volScalarField > | cellDistancePtr_ |
Distance to cell centres. More... | |
scalarField | pointDistance_ |
Distance to points. More... | |
autoPtr< isoSurface > | isoSurfPtr_ |
Constructed iso surface. More... | |
autoPtr< faceList > | facesPtr_ |
Triangles converted to faceList. More... | |
Additional Inherited Members | |
![]() | |
static autoPtr< sampledSurface > | New (const word &name, const polyMesh &, const dictionary &) |
Return a reference to the selected surface. More... | |
![]() | |
virtual void | clearGeom () const |
A sampledSurface defined by a plane.
Definition at line 53 of file sampledCuttingPlane.H.
sampledCuttingPlane | ( | const word & | name, |
const polyMesh & | mesh, | ||
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 258 of file sampledCuttingPlane.C.
References polyMesh::boundaryMesh(), dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findPatchID(), Foam::Info, dictionary::lookup(), mesh, and polyBoundaryMesh::names().
|
virtual |
Destructor.
Definition at line 303 of file sampledCuttingPlane.C.
|
private |
Create iso surface.
Direct from cell field and point field.
Definition at line 49 of file sampledCuttingPlane.C.
References fvMesh::boundary(), GeometricField::boundaryField(), polyMesh::boundaryMesh(), sampledCuttingPlane::bounds_, fvMesh::C(), primitiveMesh::cellCentres(), sampledCuttingPlane::cellDistancePtr_, polyMesh::cellZones(), sampledSurface::clearGeom(), Foam::dimLength, Foam::endl(), sampledCuttingPlane::exposedPatchName_, primitiveMesh::faceCentres(), sampledCuttingPlane::facesPtr_, fld(), forAll, DynamicID::index(), Foam::Info, GeometricField::internalField(), sampledCuttingPlane::isoSurfPtr_, sampledCuttingPlane::mergeTol_, sampledSurface::mesh(), MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), IOobject::NO_READ, IOobject::NO_WRITE, plane::normal(), primitiveMesh::nPoints(), patches, polyPatch::patchSlice(), sampledCuttingPlane::plane_, sampledCuttingPlane::pointDistance_, polyMesh::points(), Foam::Pout, sampledCuttingPlane::print(), plane::refPoint(), sampledCuttingPlane::regularise_, sampledCuttingPlane::subMeshPtr_, fvMesh::time(), Time::timeName(), and sampledCuttingPlane::zoneID_.
|
private |
Sample field on faces.
|
private |
TypeName | ( | "sampledCuttingPlane" | ) |
Runtime type information.
|
virtual |
Does the surface need an update?
Implements sampledSurface.
Definition at line 309 of file sampledCuttingPlane.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 315 of file sampledCuttingPlane.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 341 of file sampledCuttingPlane.C.
References Foam::endl(), and Foam::Pout.
|
inlinevirtual |
Points of surface.
Implements sampledSurface.
Definition at line 155 of file sampledCuttingPlane.H.
References PrimitivePatch< Face, FaceList, PointField, PointType >::points(), and sampledCuttingPlane::surface().
|
inlinevirtual |
Faces of surface.
Implements sampledSurface.
Definition at line 161 of file sampledCuttingPlane.H.
References sampledCuttingPlane::facesPtr_, forAll, s(), and sampledCuttingPlane::surface().
|
inline |
Definition at line 179 of file sampledCuttingPlane.H.
References sampledCuttingPlane::isoSurfPtr_.
Referenced by sampledCuttingPlane::faces(), and sampledCuttingPlane::points().
|
virtual |
Sample field on surface.
Implements sampledSurface.
Definition at line 364 of file sampledCuttingPlane.C.
|
virtual |
Sample field on surface.
Implements sampledSurface.
Definition at line 374 of file sampledCuttingPlane.C.
|
virtual |
Sample field on surface.
Implements sampledSurface.
|
virtual |
Sample field on surface.
Implements sampledSurface.
|
virtual |
Sample field on surface.
Implements sampledSurface.
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 414 of file sampledCuttingPlane.C.
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 424 of file sampledCuttingPlane.C.
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 433 of file sampledCuttingPlane.C.
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 443 of file sampledCuttingPlane.C.
|
virtual |
Interpolate field on surface.
Implements sampledSurface.
Definition at line 453 of file sampledCuttingPlane.C.
|
virtual |
Write.
Reimplemented from sampledSurface.
Definition at line 461 of file sampledCuttingPlane.C.
References Foam::name(), and points.
Referenced by sampledCuttingPlane::createGeometry().
Foam::tmp<Foam::Field<Type> > sampleField | ( | const GeometricField< Type, fvPatchField, volMesh > & | vField | ) | const |
Definition at line 36 of file sampledCuttingPlaneTemplates.C.
Foam::tmp<Foam::Field<Type> > interpolateField | ( | const interpolation< Type > & | interpolator | ) | const |
Definition at line 47 of file sampledCuttingPlaneTemplates.C.
References Foam::compressible::New(), and interpolation::psi().
|
private |
Plane.
Definition at line 60 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
private |
Optional bounding box to trim triangles against.
Definition at line 63 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
private |
Merge tolerance.
Definition at line 66 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
private |
Whether to coarsen.
Definition at line 69 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
private |
Whether to recalculate cell values as average of point values.
Definition at line 72 of file sampledCuttingPlane.H.
|
mutableprivate |
Zone name/index (if restricted to zones)
Definition at line 75 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
mutableprivate |
For zones: patch to put exposed faces into.
Definition at line 78 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
mutableprivate |
Track if the surface needs an update.
Definition at line 81 of file sampledCuttingPlane.H.
|
private |
Optional subsetted mesh.
Definition at line 85 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
private |
Distance to cell centres.
Definition at line 88 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
private |
Distance to points.
Definition at line 91 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry().
|
private |
Constructed iso surface.
autoPtr<isoSurfaceCell> isoSurfPtr_;
Definition at line 95 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry(), and sampledCuttingPlane::surface().
Triangles converted to faceList.
Definition at line 98 of file sampledCuttingPlane.H.
Referenced by sampledCuttingPlane::createGeometry(), and sampledCuttingPlane::faces().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.