OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

sampledSurface Class Reference

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

Inheritance diagram for sampledSurface:
Collaboration diagram for sampledSurface:

List of all members.


Classes

class  iNew
 Class used for the PtrLists read-construction. More...

Public Member Functions

 TypeName ("sampledSurface")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, sampledSurface, word,(const word &name, const polyMesh &mesh, const dictionary &dict),(name, mesh, dict))
 sampledSurface (const word &name, const polyMesh &)
 Construct from name, mesh.
 sampledSurface (const word &name, const polyMesh &, const dictionary &)
 Construct from dictionary.
autoPtr< sampledSurface > clone () const
 Clone.
virtual ~sampledSurface ()
const polyMesh & mesh () const
 Access to the underlying mesh.
const word & name () const
 Name of surface.
bool interpolate () const
 interpolation requested for surface
virtual bool needsUpdate () const =0
 Does the surface need an update?
virtual bool expire ()=0
 Mark the surface as needing an update.
virtual bool update ()=0
 Update the surface as required.
virtual const pointField & points () const =0
 Points of surface.
virtual const faceList & faces () const =0
 Faces of surface.
virtual const vectorField & Sf () const
 Return face area vectors.
virtual const scalarField & magSf () const
 Return face area magnitudes.
virtual const vectorField & Cf () const
 Return face centres as vectorField.
scalar area () const
 The total surface area.
template<class Type >
Type integrate (const Field< Type > &) const
 Integration of a field across the surface.
template<class Type >
Type integrate (const tmp< Field< Type > > &) const
 Integration of a field across the surface.
template<class Type >
Type average (const Field< Type > &) const
 Area-averaged value of a field across the surface.
template<class Type >
Type average (const tmp< Field< Type > > &) const
 Area-averaged value of a field across the surface.
tmp< Field< scalar > > project (const Field< scalar > &) const
 Project field onto surface.
tmp< Field< scalar > > project (const Field< vector > &) const
 Project field onto surface.
tmp< Field< vector > > project (const Field< sphericalTensor > &) const
 Project field onto surface.
tmp< Field< vector > > project (const Field< symmTensor > &) const
 Project field onto surface.
tmp< Field< vector > > project (const Field< tensor > &) const
 Project field onto surface.
virtual tmp< scalarField > sample (const volScalarField &) const =0
 Sample field on surface.
virtual tmp< vectorField > sample (const volVectorField &) const =0
 Sample field on surface.
virtual tmp< sphericalTensorField > sample (const volSphericalTensorField &) const =0
 Sample field on surface.
virtual tmp< symmTensorField > sample (const volSymmTensorField &) const =0
 Sample field on surface.
virtual tmp< tensorField > sample (const volTensorField &) const =0
 Sample field on surface.
virtual tmp< scalarField > interpolate (const interpolation< scalar > &) const =0
 Interpolate field on surface.
virtual tmp< vectorField > interpolate (const interpolation< vector > &) const =0
 Interpolate field on surface.
virtual tmp< sphericalTensorField > interpolate (const interpolation< sphericalTensor > &) const =0
 Interpolate field on surface.
virtual tmp< symmTensorField > interpolate (const interpolation< symmTensor > &) const =0
 Interpolate field on surface.
virtual tmp< tensorField > interpolate (const interpolation< tensor > &) const =0
 Interpolate field on surface.
virtual void rename (const word &newName)
 Rename.
virtual void print (Ostream &) const
 Write.

Static Public Member Functions

static autoPtr< sampledSurface > New (const word &name, const polyMesh &, const dictionary &)
 Return a reference to the selected surface.

Protected Member Functions

virtual void clearGeom () const

Friends

Ostream & operator<< (Ostream &, const sampledSurface &)

Detailed Description

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.

Source files

Definition at line 68 of file sampledSurface.H.


Constructor & Destructor Documentation

sampledSurface ( const word &  name,
const polyMesh &  mesh 
)

Construct from name, mesh.

Definition at line 145 of file sampledSurface.C.

sampledSurface ( const word &  name,
const polyMesh &  mesh,
const dictionary &  dict 
)

Construct from dictionary.

Definition at line 162 of file sampledSurface.C.

~sampledSurface (  )  [virtual]

Definition at line 182 of file sampledSurface.C.

References dictionary::readIfPresent().

Here is the call graph for this function:


Member Function Documentation

void clearGeom (  )  const [protected, virtual]

Definition at line 34 of file sampledSurface.C.

References Foam::defineRunTimeSelectionTable(), and Foam::defineTypeNameAndDebug().

Referenced by sampledSurface::Sf().

Here is the call graph for this function:

Here is the caller graph for this function:

TypeName ( "sampledSurface"   ) 

Runtime type information.

declareRunTimeSelectionTable ( autoPtr  ,
sampledSurface  ,
word  ,
(const word &name, const polyMesh &mesh, const dictionary &dict)  ,
(name, mesh, dict)   
)

autoPtr<sampledSurface> clone (  )  const [inline]

Clone.

Definition at line 202 of file sampledSurface.H.

Foam::autoPtr< Foam::sampledSurface > New ( const word &  name,
const polyMesh &  mesh,
const dictionary &  dict 
) [static]

Return a reference to the selected surface.

Definition at line 111 of file sampledSurface.C.

const polyMesh& mesh (  )  const [inline]

Access to the underlying mesh.

Definition at line 230 of file sampledSurface.H.

Referenced by sampledThresholdCellFaces::expire(), sampledIsoSurfaceCell::expire(), and sampledIsoSurface::expire().

Here is the caller graph for this function:

const word& name (  )  const [inline]

Name of surface.

Definition at line 236 of file sampledSurface.H.

bool interpolate (  )  const [inline]

interpolation requested for surface

Definition at line 242 of file sampledSurface.H.

virtual bool needsUpdate (  )  const [pure virtual]

virtual bool expire (  )  [pure virtual]

Mark the surface as needing an update.

May also free up unneeded data. Return false if surface was already marked as expired.

Implemented in distanceSurface, sampledIsoSurface, sampledIsoSurfaceCell, sampledCuttingPlane, sampledPatch, sampledPlane, and sampledThresholdCellFaces.

virtual bool update (  )  [pure virtual]

Update the surface as required.

Do nothing (and return false) if no update was required

Implemented in distanceSurface, sampledIsoSurface, sampledIsoSurfaceCell, sampledCuttingPlane, sampledPatch, sampledPlane, and sampledThresholdCellFaces.

virtual const pointField& points (  )  const [pure virtual]

virtual const faceList& faces (  )  const [pure virtual]

Faces of surface.

Implemented in distanceSurface, sampledIsoSurface, sampledIsoSurfaceCell, sampledCuttingPlane, sampledPatch, sampledPlane, and sampledThresholdCellFaces.

Referenced by sampledSurface::print(), and sampledSurface::project().

Here is the caller graph for this function:

const Foam::vectorField & Sf (  )  const [virtual]

Return face area vectors.

Definition at line 189 of file sampledSurface.C.

References sampledSurface::clearGeom().

Here is the call graph for this function:

const Foam::scalarField & magSf (  )  const [virtual]

Return face area magnitudes.

Definition at line 200 of file sampledSurface.C.

const Foam::vectorField & Cf (  )  const [virtual]

Return face centres as vectorField.

Definition at line 211 of file sampledSurface.C.

Foam::scalar area (  )  const

The total surface area.

Definition at line 222 of file sampledSurface.C.

Type integrate ( const Field< Type > &  field  )  const [inline]

Integration of a field across the surface.

Definition at line 45 of file sampledSurfaceTemplates.C.

Referenced by sampledSurface::average().

Here is the caller graph for this function:

Type integrate ( const tmp< Field< Type > > &  field  )  const [inline]

Integration of a field across the surface.

Definition at line 60 of file sampledSurfaceTemplates.C.

Type average ( const Field< Type > &  field  )  const [inline]

Area-averaged value of a field across the surface.

Definition at line 69 of file sampledSurfaceTemplates.C.

References sampledSurface::integrate().

Here is the call graph for this function:

Type average ( const tmp< Field< Type > > &  field  )  const [inline]

Area-averaged value of a field across the surface.

Definition at line 93 of file sampledSurfaceTemplates.C.

Foam::tmp< Foam::Field< Foam::scalar > > project ( const Field< scalar > &  field  )  const

Project field onto surface.

Definition at line 236 of file sampledSurface.C.

Foam::tmp< Foam::Field< Foam::scalar > > project ( const Field< vector > &  field  )  const

Project field onto surface.

Definition at line 251 of file sampledSurface.C.

Foam::tmp< Foam::Field< Foam::vector > > project ( const Field< sphericalTensor > &  field  )  const

Project field onto surface.

Definition at line 260 of file sampledSurface.C.

References sampledSurface::faces().

Here is the call graph for this function:

Foam::tmp< Foam::Field< Foam::vector > > project ( const Field< symmTensor > &  field  )  const

Project field onto surface.

Definition at line 269 of file sampledSurface.C.

References sampledSurface::faces().

Here is the call graph for this function:

Foam::tmp< Foam::Field< Foam::vector > > project ( const Field< tensor > &  field  )  const

Project field onto surface.

Definition at line 278 of file sampledSurface.C.

References sampledSurface::faces().

Here is the call graph for this function:

virtual tmp<scalarField> sample ( const volScalarField &   )  const [pure virtual]

virtual tmp<vectorField> sample ( const volVectorField &   )  const [pure virtual]

virtual tmp<symmTensorField> sample ( const volSymmTensorField &   )  const [pure virtual]

virtual tmp<tensorField> sample ( const volTensorField &   )  const [pure virtual]

virtual tmp<scalarField> interpolate ( const interpolation< scalar > &   )  const [pure virtual]

virtual tmp<vectorField> interpolate ( const interpolation< vector > &   )  const [pure virtual]

virtual tmp<sphericalTensorField> interpolate ( const interpolation< sphericalTensor > &   )  const [pure virtual]

virtual tmp<symmTensorField> interpolate ( const interpolation< symmTensor > &   )  const [pure virtual]

virtual tmp<tensorField> interpolate ( const interpolation< tensor > &   )  const [pure virtual]

virtual void rename ( const word &  newName  )  [inline, virtual]

Rename.

Definition at line 379 of file sampledSurface.H.

void print ( Ostream &  os  )  const [virtual]

Write.

Reimplemented in distanceSurface, sampledIsoSurface, sampledIsoSurfaceCell, sampledCuttingPlane, sampledPatch, sampledPlane, and sampledThresholdCellFaces.

Definition at line 286 of file sampledSurface.C.

References sampledSurface::faces().

Here is the call graph for this function:


Friends And Related Function Documentation

Ostream& operator<< ( Ostream &  ,
const sampledSurface &   
) [friend]


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd