An abstract class for surfaces with sampling. More...

Classes | |
| class | iNew |
| Class used for the PtrLists read-construction. More... | |
Public Member Functions | |
| 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 bool | needsUpdate () const =0 |
| Does the surface need an update? More... | |
| virtual wordList | fields () const |
| Return the list of fields required. More... | |
| virtual bool | update ()=0 |
| Update the surface as required. More... | |
| virtual const pointField & | points () const =0 |
| Points of surface. More... | |
| virtual const faceList & | faces () const =0 |
| Faces of 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... | |
| 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 > | |
| Type | average (const tmp< Field< Type >> &) const |
| Area-averaged value of a field across the surface. More... | |
| FOR_ALL_FIELD_TYPES (DEFINE_SAMPLE) | |
| FOR_ALL_FIELD_TYPES (DEFINE_INTERPOLATE) | |
| virtual void | movePoints ()=0 |
| Update for mesh point-motion. More... | |
| virtual void | topoChange (const polyTopoChangeMap &)=0 |
| Update topology using the given map. More... | |
| virtual void | mapMesh (const polyMeshMap &)=0 |
| Update from another mesh using the given map. More... | |
| virtual void | distribute (const polyDistributionMap &)=0 |
| Redistribute or update using the given distribution map. More... | |
| virtual void | rename (const word &newName) |
| Rename. More... | |
| virtual void | print (Ostream &) const |
| Write. More... | |
| template<class ReturnType , class Type > | |
| Foam::tmp< Foam::Field< ReturnType > > | project (const tmp< Field< Type >> &field) const |
Static Public Member Functions | |
| static autoPtr< sampledSurface > | New (const word &name, const polyMesh &, const dictionary &) |
| Return a reference to the selected surface. More... | |
Protected Member Functions | |
| virtual void | clearGeom () const |
Friends | |
| Ostream & | operator<< (Ostream &, const sampledSurface &) |
| Ostream operator. More... | |
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 initialisation. 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.
Definition at line 80 of file sampledSurface.H.
| sampledSurface | ( | const word & | name, |
| const polyMesh & | mesh, | ||
| const bool | interpolate = false |
||
| ) |
Construct from name, mesh.
Definition at line 149 of file sampledSurface.C.
| sampledSurface | ( | const word & | name, |
| const polyMesh & | mesh, | ||
| const dictionary & | dict | ||
| ) |
|
virtual |
Destructor.
Definition at line 187 of file sampledSurface.C.
|
protectedvirtual |
Definition at line 105 of file sampledSurface.C.
References Foam::deleteDemandDrivenData().
Referenced by sampledIsoSurfaceSurface::distribute(), sampledIsoSurfaceSurface::mapMesh(), sampledIsoSurfaceSurface::movePoints(), patch::movePoints(), triSurface::movePoints(), sampledIsoSurfaceSurface::topoChange(), and sampledIsoSurfaceSurface::update().


| TypeName | ( | "sampledSurface" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| sampledSurface | , | ||
| word | , | ||
| (const word &name, const polyMesh &mesh, const dictionary &dict) | , | ||
| (name, mesh, dict) | |||
| ) |
Declare run-time constructor selection table.
|
inline |
|
static |
Return a reference to the selected surface.
Definition at line 116 of file sampledSurface.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::indentOrNl(), Foam::Info, dictionary::lookup(), mesh, Foam::name(), and Foam::nl.
Referenced by sampledSurface::iNew::operator()(), surfaceFieldValue::read(), and sampledSurfaces::read().


|
inline |
Access to the underlying mesh.
Definition at line 245 of file sampledSurface.H.
Referenced by sampledIsoSurfaceSurface::calcIsoSurf(), patchInternalField::patchInternalField(), and triSurface::sampleField().

|
inline |
Name of surface.
Definition at line 251 of file sampledSurface.H.
Referenced by sampledSurface::iNew::operator()().

|
inline |
Interpolation requested for surface.
Definition at line 257 of file sampledSurface.H.
Referenced by triSurface::update().

|
pure virtual |
Does the surface need an update?
Implemented in triSurface, thresholdCellFaces, patch, isoSurface, distanceSurface, and cutPlane.
|
inlinevirtual |
Return the list of fields required.
Reimplemented in thresholdCellFaces, and isoSurface.
Definition at line 266 of file sampledSurface.H.
References List< word >::null().

|
pure virtual |
Update the surface as required.
Do nothing (and return false) if no update was required
Implemented in triSurface, thresholdCellFaces, patch, and sampledIsoSurfaceSurface.
|
pure virtual |
Points of surface.
Implemented in triSurface, thresholdCellFaces, patch, and sampledIsoSurfaceSurface.
|
pure virtual |
Faces of surface.
Implemented in triSurface, thresholdCellFaces, patch, and sampledIsoSurfaceSurface.
|
virtual |
Return face area vectors.
Definition at line 195 of file sampledSurface.C.
|
virtual |
Return face area magnitudes.
Definition at line 206 of file sampledSurface.C.
|
virtual |
Return face centres as vectorField.
Definition at line 217 of file sampledSurface.C.
| Foam::scalar area | ( | ) | const |
The total surface area.
Definition at line 228 of file sampledSurface.C.
References Foam::reduce(), and Foam::sum().

| Type integrate | ( | const Field< Type > & | field | ) | const |
Integration of a field across the surface.
Definition at line 52 of file sampledSurfaceTemplates.C.
References Foam::reduce(), Foam::sum(), and Foam::Zero.

Integration of a field across the surface.
Definition at line 67 of file sampledSurfaceTemplates.C.
| Type average | ( | const Field< Type > & | field | ) | const |
Area-averaged value of a field across the surface.
Definition at line 76 of file sampledSurfaceTemplates.C.
References Foam::dimensions::area, Foam::reduce(), Foam::sum(), and Foam::Zero.

| Foam::tmp< Foam::Field< Foam::scalar > > project | ( | const Field< scalar > & | field | ) | const |
Project field onto surface.
Definition at line 255 of file sampledSurface.C.
References forAll, and tmp< T >::ref().

| Foam::tmp< Foam::Field< Foam::scalar > > project | ( | const Field< vector > & | field | ) | const |
Project field onto surface.
Definition at line 270 of file sampledSurface.C.
References tmp< T >::ref().

| Foam::tmp< Foam::Field< Foam::vector > > project | ( | const Field< sphericalTensor > & | field | ) | const |
Project field onto surface.
Definition at line 279 of file sampledSurface.C.
References tmp< T >::ref().

| Foam::tmp< Foam::Field< Foam::vector > > project | ( | const Field< symmTensor > & | field | ) | const |
Project field onto surface.
Definition at line 288 of file sampledSurface.C.
References tmp< T >::ref().

| Foam::tmp< Foam::Field< Foam::vector > > project | ( | const Field< tensor > & | field | ) | const |
Project field onto surface.
Definition at line 297 of file sampledSurface.C.
References tmp< T >::ref().

Area-averaged value of a field across the surface.
Definition at line 100 of file sampledSurfaceTemplates.C.
References Foam::average().

| FOR_ALL_FIELD_TYPES | ( | DEFINE_SAMPLE | ) |
| FOR_ALL_FIELD_TYPES | ( | DEFINE_INTERPOLATE | ) |
|
pure virtual |
Update for mesh point-motion.
Implemented in triSurface, thresholdCellFaces, patch, and sampledIsoSurfaceSurface.
|
pure virtual |
Update topology using the given map.
Implemented in triSurface, thresholdCellFaces, patch, and sampledIsoSurfaceSurface.
|
pure virtual |
Update from another mesh using the given map.
Implemented in triSurface, thresholdCellFaces, patch, and sampledIsoSurfaceSurface.
|
pure virtual |
Redistribute or update using the given distribution map.
Implemented in triSurface, thresholdCellFaces, patch, and sampledIsoSurfaceSurface.
|
inlinevirtual |
Rename.
Definition at line 366 of file sampledSurface.H.
|
virtual |
Write.
Reimplemented in triSurface, thresholdCellFaces, patchInternalField, patch, isoSurface, distanceSurface, and cutPlane.
Definition at line 305 of file sampledSurface.C.
References Foam::type().

| Foam::tmp<Foam::Field<ReturnType> > project | ( | const tmp< Field< Type >> & | field | ) | const |
Definition at line 145 of file sampledSurfaceTemplates.C.
|
friend |
Ostream operator.