An abstract class for surfaces with sampling. More...
Classes | |
class | iNew |
class | iNewCapture |
Public Member Functions | |
TypeName ("sampledSurface") | |
declareRunTimeSelectionTable (autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict)) | |
sampledSurface (const word &name, const polyMesh &mesh, const bool interpolateToPoints=false) | |
sampledSurface (const word &name, const polyMesh &mesh, const dictionary &dict) | |
autoPtr< sampledSurface > | clone () const |
virtual | ~sampledSurface () |
const polyMesh & | mesh () const noexcept |
const word & | name () const noexcept |
bool | enabled () const noexcept |
bool | invariant () const noexcept |
bool | isPointData () const noexcept |
virtual bool | isPointData (const bool on) |
virtual bool | needsUpdate () const =0 |
virtual bool | expire ()=0 |
virtual bool | update ()=0 |
virtual const pointField & | points () const =0 |
virtual const faceList & | faces () const =0 |
virtual const vectorField & | Sf () const =0 |
virtual const scalarField & | magSf () const =0 |
virtual const vectorField & | Cf () const =0 |
scalar | area () const |
virtual bool | hasFaceIds () const |
polySurface * | getRegistrySurface (const objectRegistry &obr, word lookupName="") const |
polySurface * | storeRegistrySurface (objectRegistry &obr, word lookupName="") const |
bool | removeRegistrySurface (objectRegistry &obr, word lookupName="") const |
template<class Type , class GeoMeshType > | |
bool | storeRegistryField (const objectRegistry &obr, const word &fieldName, const dimensionSet &dims, const Field< Type > &values, word lookupName="") const |
template<class Type , class GeoMeshType > | |
bool | storeRegistryField (const objectRegistry &obr, const word &fieldName, const dimensionSet &dims, Field< Type > &&values, word lookupName="") const |
surfMesh * | getSurfMesh (word lookupName="") const |
surfMesh * | storeSurfMesh (word lookupName="") const |
bool | removeSurfMesh (word lookupName="") const |
template<class Type , class GeoMeshType > | |
bool | storeSurfMeshField (const word &fieldName, const dimensionSet &dims, const Field< Type > &values, word lookupName="") const |
template<class Type , class GeoMeshType > | |
bool | storeSurfMeshField (const word &fieldName, const dimensionSet &dims, Field< Type > &&values, word lookupName="") const |
virtual tmp< scalarField > | sample (const interpolation< scalar > &sampler) const =0 |
virtual tmp< vectorField > | sample (const interpolation< vector > &sampler) const =0 |
virtual tmp< sphericalTensorField > | sample (const interpolation< sphericalTensor > &sampler) const =0 |
virtual tmp< symmTensorField > | sample (const interpolation< symmTensor > &sampler) const =0 |
virtual tmp< tensorField > | sample (const interpolation< tensor > &sampler) const =0 |
virtual bool | withSurfaceFields () const |
virtual tmp< scalarField > | sample (const surfaceScalarField &sField) const |
virtual tmp< vectorField > | sample (const surfaceVectorField &sField) const |
virtual tmp< sphericalTensorField > | sample (const surfaceSphericalTensorField &sField) const |
virtual tmp< symmTensorField > | sample (const surfaceSymmTensorField &sField) const |
virtual tmp< tensorField > | sample (const surfaceTensorField &sField) const |
virtual tmp< scalarField > | interpolate (const interpolation< scalar > &interpolator) const =0 |
virtual tmp< vectorField > | interpolate (const interpolation< vector > &interpolator) const =0 |
virtual tmp< sphericalTensorField > | interpolate (const interpolation< sphericalTensor > &interpolator) const =0 |
virtual tmp< symmTensorField > | interpolate (const interpolation< symmTensor > &interpolator) const =0 |
virtual tmp< tensorField > | interpolate (const interpolation< tensor > &interpolator) const =0 |
virtual void | rename (const word &newName) |
virtual void | print (Ostream &os, int level=0) const |
bool | interpolate () const noexcept |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleOnFaces (const interpolation< Type > &sampler, const labelUList &elements, const faceList &fcs, const pointField &pts, const Type &defaultValue) |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | sampleOnPoints (const interpolation< Type > &interpolator, const labelUList &elements, const faceList &fcs, const pointField &pts) |
template<class Type > | |
Foam::tmp< Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > > | pointAverage (const GeometricField< Type, pointPatchField, pointMesh > &pfld) |
![]() | |
constexpr | meshedSurf () noexcept=default |
virtual | ~meshedSurf ()=default |
virtual const labelList & | zoneIds () const |
virtual const labelList & | faceIds () const |
Static Public Member Functions | |
static autoPtr< sampledSurface > | New (const word &name, const polyMesh &mesh, const dictionary &dict) |
Static Public Attributes | |
static const wordList | surfaceFieldTypes |
Protected Member Functions | |
virtual void | clearGeom () const |
sampledSurface (const word &name, std::nullptr_t) | |
Static Protected Member Functions | |
template<class Type > | |
static tmp< Field< Type > > | sampleOnFaces (const interpolation< Type > &sampler, const labelUList &elements, const faceList &fcs, const pointField &pts, const Type &defaultValue=Type(Zero)) |
template<class Type > | |
static tmp< Field< Type > > | sampleOnPoints (const interpolation< Type > &interpolator, const labelUList &elements, const faceList &fcs, const pointField &pts) |
template<class Type > | |
static tmp< GeometricField< Type, fvPatchField, volMesh > > | pointAverage (const GeometricField< Type, pointPatchField, pointMesh > &pfld) |
An abstract class for surfaces with sampling.
The constructors for the derived classes should generally start in a 'expired' condition (ie, needsUpdate() == true) and rely on a subsequent call to the update() method to complete the initialization. Delaying the final construction as late as possible allows the construction of surfaces that may depend on intermediate calculation results (eg, iso-surfaces) and also avoids the unnecessary reconstruction of surfaces between sampling intervals.
It is the responsibility of the caller to ensure that the surface update() is called before the surface is used. The update() method implementation should do nothing when the surface is already up-to-date.
Any sampler is assumed to work for the standard volume field types. Some may also support surface fields.
Dictionary entries:
Property | Description | Required | Default |
---|---|---|---|
name | Alternative name | no | |
enabled | Enable/disable the surface? | no | yes |
interpolate | Interpolate to nodes instead of faces | no | false |
invariant | Invariant with geometry change (use with caution!) | no | false |
Definition at line 117 of file sampledSurface.H.
|
explicitprotected |
Definition at line 85 of file sampledSurface.C.
sampledSurface | ( | const word & | name, |
const polyMesh & | mesh, | ||
const bool | interpolateToPoints = false |
||
) |
Definition at line 97 of file sampledSurface.C.
sampledSurface | ( | const word & | name, |
const polyMesh & | mesh, | ||
const dictionary & | dict | ||
) |
Definition at line 113 of file sampledSurface.C.
|
virtual |
Definition at line 130 of file sampledSurface.C.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protectedvirtual |
Definition at line 46 of file sampledSurface.C.
Referenced by sampledCuttingSurface::expire(), sampledFaceZone::expire(), sampledPlane::expire(), sampledPatch::expire(), sampledCuttingPlane::expire(), sampledMeshedSurface::expire(), sampledIsoSurface::expire(), sampledCuttingSurface::update(), and sampledPlane::update().
TypeName | ( | "sampledSurface" | ) |
declareRunTimeSelectionTable | ( | autoPtr | , |
sampledSurface | , | ||
word | , | ||
(const word &name, const polyMesh &mesh, const dictionary &dict) | , | ||
(name, mesh, dict) | |||
) |
|
inline |
Definition at line 285 of file sampledSurface.H.
References NotImplemented.
|
static |
Definition at line 55 of file sampledSurface.C.
References DebugInfo, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), mesh, and Foam::name().
Referenced by sampledSurface::iNew::operator()(), sampledSurface::iNewCapture::operator()(), sampledSurfaces::read(), and surfaceFieldValue::read().
|
inlinenoexcept |
Definition at line 312 of file sampledSurface.H.
Referenced by sampledSurface::getSurfMesh(), sampledPatch::patchIDs(), and sampledFaceZone::zoneIDs().
|
inlinenoexcept |
Definition at line 318 of file sampledSurface.H.
Referenced by sampledSurface::getSurfMesh(), sampledSurface::iNew::operator()(), sampledSurface::iNewCapture::operator()(), and sampledPatchInternalField::print().
|
inlinenoexcept |
Definition at line 324 of file sampledSurface.H.
|
inlinenoexcept |
Definition at line 330 of file sampledSurface.H.
|
inlinenoexcept |
Definition at line 336 of file sampledSurface.H.
Definition at line 149 of file sampledSurface.C.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Implements meshedSurf.
Implemented in sampledIsoSurface, sampledCuttingPlane, sampledMeshedSurface, sampledDistanceSurface, sampledPatch, sampledPlane, sampledThresholdCellFaces, sampledFaceZone, sampledCuttingSurface, sampledInterface, and sampledNone.
|
pure virtual |
Implements meshedSurf.
Implemented in sampledIsoSurface, sampledCuttingPlane, sampledMeshedSurface, sampledDistanceSurface, sampledPatch, sampledPlane, sampledThresholdCellFaces, sampledFaceZone, sampledCuttingSurface, sampledInterface, and sampledNone.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Foam::scalar area | ( | ) | const |
Definition at line 138 of file sampledSurface.C.
References Foam::gSum().
|
inlinevirtual |
Reimplemented in sampledMeshedSurface.
Definition at line 376 of file sampledSurface.H.
Foam::polySurface * getRegistrySurface | ( | const objectRegistry & | obr, |
word | lookupName = "" |
||
) | const |
Definition at line 28 of file sampledSurfaceRegister.C.
References objectRegistry::getObjectPtr(), and Foam::name().
Foam::polySurface * storeRegistrySurface | ( | objectRegistry & | obr, |
word | lookupName = "" |
||
) | const |
Definition at line 43 of file sampledSurfaceRegister.C.
References polySurface::copySurface(), and Foam::name().
bool removeRegistrySurface | ( | objectRegistry & | obr, |
word | lookupName = "" |
||
) | const |
Definition at line 68 of file sampledSurfaceRegister.C.
References objectRegistry::checkOut().
bool storeRegistryField | ( | const objectRegistry & | obr, |
const word & | fieldName, | ||
const dimensionSet & | dims, | ||
const Field< Type > & | values, | ||
word | lookupName = "" |
||
) | const |
Definition at line 175 of file sampledSurfaceTemplates.C.
References polySurface::storeField(), and Foam::HashTableOps::values().
bool storeRegistryField | ( | const objectRegistry & | obr, |
const word & | fieldName, | ||
const dimensionSet & | dims, | ||
Field< Type > && | values, | ||
word | lookupName = "" |
||
) | const |
Definition at line 199 of file sampledSurfaceTemplates.C.
References polySurface::storeField(), and Foam::HashTableOps::values().
Foam::surfMesh * getSurfMesh | ( | word | lookupName = "" | ) | const |
Definition at line 78 of file sampledSurfaceRegister.C.
References objectRegistry::getObjectPtr(), sampledSurface::mesh(), and sampledSurface::name().
Foam::surfMesh * storeSurfMesh | ( | word | lookupName = "" | ) | const |
Definition at line 89 of file sampledSurfaceRegister.C.
References surfMesh::copySurface(), mesh, Foam::name(), and regIOobject::store().
Definition at line 112 of file sampledSurfaceRegister.C.
References objectRegistry::checkOut(), and mesh.
bool storeSurfMeshField | ( | const word & | fieldName, |
const dimensionSet & | dims, | ||
const Field< Type > & | values, | ||
word | lookupName = "" |
||
) | const |
Definition at line 223 of file sampledSurfaceTemplates.C.
References surfMesh::storeField(), and Foam::HashTableOps::values().
bool storeSurfMeshField | ( | const word & | fieldName, |
const dimensionSet & | dims, | ||
Field< Type > && | values, | ||
word | lookupName = "" |
||
) | const |
Definition at line 246 of file sampledSurfaceTemplates.C.
References surfMesh::storeField(), and Foam::HashTableOps::values().
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
virtual |
Reimplemented in sampledPatch, and sampledFaceZone.
Definition at line 157 of file sampledSurface.C.
|
virtual |
Reimplemented in sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, and sampledFaceZone.
Definition at line 164 of file sampledSurface.C.
References NotImplemented.
|
virtual |
Reimplemented in sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, and sampledFaceZone.
|
virtual |
Reimplemented in sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, and sampledFaceZone.
|
virtual |
Reimplemented in sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, and sampledFaceZone.
|
virtual |
Reimplemented in sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, sampledFaceZone, sampledPatch, and sampledFaceZone.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inlinevirtual |
Definition at line 579 of file sampledSurface.H.
|
virtual |
Reimplemented in sampledIsoSurface, sampledMeshedSurface, sampledCuttingPlane, sampledPatch, sampledDistanceSurface, sampledFaceZone, sampledPlane, sampledThresholdCellFaces, sampledInterface, and sampledPatchInternalField.
Definition at line 213 of file sampledSurface.C.
References os(), and Foam::type().
|
inlinenoexcept |
Definition at line 594 of file sampledSurface.H.
Foam::tmp<Foam::Field<Type> > sampleOnFaces | ( | const interpolation< Type > & | sampler, |
const labelUList & | elements, | ||
const faceList & | fcs, | ||
const pointField & | pts, | ||
const Type & | defaultValue | ||
) |
Definition at line 29 of file sampledSurfaceTemplates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, interpolation::interpolate(), Foam::New(), UList::size(), and Foam::HashTableOps::values().
Foam::tmp<Foam::Field<Type> > sampleOnPoints | ( | const interpolation< Type > & | interpolator, |
const labelUList & | elements, | ||
const faceList & | fcs, | ||
const pointField & | pts | ||
) |
Definition at line 73 of file sampledSurfaceTemplates.C.
References Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, forAll, interpolation::interpolate(), Foam::New(), bitSet::set(), UList::size(), Foam::HashTableOps::values(), and Foam::Zero.
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > pointAverage | ( | const GeometricField< Type, pointPatchField, pointMesh > & | pfld | ) |
Definition at line 123 of file sampledSurfaceTemplates.C.
References Foam::dimless, forAll, mesh, Foam::New(), and Foam::Zero.
|
static |
Definition at line 126 of file sampledSurface.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.