FreeFOAM The Cross-Platform CFD Toolkit
sampledIsoSurfaceCell Class Reference

A sampledSurface defined by a surface of iso value. Always triangulated. To be used in sampleSurfaces / functionObjects. Recalculates iso surface only if time changes. More...

#include <sampling/sampledIsoSurfaceCell.H>


Detailed Description

A sampledSurface defined by a surface of iso value. Always triangulated. To be used in sampleSurfaces / functionObjects. Recalculates iso surface only if time changes.

Source files

Definition at line 52 of file sampledIsoSurfaceCell.H.

+ Inheritance diagram for sampledIsoSurfaceCell:
+ Collaboration diagram for sampledIsoSurfaceCell:

List of all members.

Public Member Functions

 TypeName ("sampledIsoSurfaceCell")
 Runtime type information.
 sampledIsoSurfaceCell (const word &name, const polyMesh &mesh, const dictionary &dict)
 Construct from dictionary.
virtual ~sampledIsoSurfaceCell ()
virtual bool needsUpdate () const
 Does the surface need an update?
virtual bool expire ()
 Mark the surface as needing an update.
virtual bool update ()
 Update the surface as required.
virtual const pointFieldpoints () const
 Points of surface.
virtual const faceListfaces () const
 Faces of surface.
virtual tmp< scalarFieldsample (const volScalarField &) const
 sample field on surface
virtual tmp< vectorFieldsample (const volVectorField &) const
 sample field on surface
virtual tmp< sphericalTensorFieldsample (const volSphericalTensorField &) const
 sample field on surface
virtual tmp< symmTensorFieldsample (const volSymmTensorField &) const
 sample field on surface
virtual tmp< tensorFieldsample (const volTensorField &) const
 sample field on surface
virtual tmp< scalarFieldinterpolate (const interpolation< scalar > &) const
 interpolate field on surface
virtual tmp< vectorFieldinterpolate (const interpolation< vector > &) const
 interpolate field on surface
virtual tmp< sphericalTensorFieldinterpolate (const interpolation< sphericalTensor > &) const
 interpolate field on surface
virtual tmp< symmTensorFieldinterpolate (const interpolation< symmTensor > &) const
 interpolate field on surface
virtual tmp< tensorFieldinterpolate (const interpolation< tensor > &) const
 interpolate field on surface
virtual void print (Ostream &) const
 Write.
- Public Member Functions inherited from sampledSurface
 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< sampledSurfaceclone () const
 Clone.
virtual ~sampledSurface ()
const polyMeshmesh () const
 Access to the underlying mesh.
const wordname () const
 Name of surface.
bool interpolate () const
 interpolation requested for surface
virtual const vectorFieldSf () const
 Return face area vectors.
virtual const scalarFieldmagSf () const
 Return face area magnitudes.
virtual const vectorFieldCf () 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 void rename (const word &newName)
 Rename.
- Public Member Functions inherited from triSurface
 ClassName ("triSurface")
 Runtime type information.
 triSurface ()
 Construct null.
 triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &)
 Construct from triangles, patches, points.
 triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse)
 Construct from triangles, patches, points. Reuse storage.
 triSurface (const List< labelledTri > &, const pointField &)
 Construct from triangles, points. Set patchnames to default.
 triSurface (const triFaceList &, const pointField &)
 Construct from triangles, points. Set region to 0 and default.
 triSurface (const fileName &)
 Construct from file name (uses extension to determine type)
 triSurface (Istream &)
 Construct from Istream.
 triSurface (const Time &d)
 Construct from objectRegistry.
 triSurface (const triSurface &)
 Construct as copy.
 ~triSurface ()
void clearOut ()
void clearTopology ()
void clearPatchMeshAddr ()
const geometricSurfacePatchListpatches () const
geometricSurfacePatchListpatches ()
const labelListListsortedEdgeFaces () const
 Return edge-face addressing sorted (for edges with more than.
const labelListedgeOwner () const
 If 2 face neighbours: label of face where ordering of edge.
virtual void movePoints (const pointField &)
 Move points.
virtual void scalePoints (const scalar &)
 Scale points. A non-positive factor is ignored.
void checkTriangles (const bool verbose)
 Check/remove duplicate/degenerate triangles.
void checkEdges (const bool verbose)
 Check triply (or more) connected edges.
void cleanup (const bool verbose)
 Remove non-valid triangles.
void markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
 Fill faceZone with currentZone for every face reachable.
label markZones (const boolList &borderEdge, labelList &faceZone) const
 (size and) fills faceZone with zone of face. Zone is area
void subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const
 'Create' sub mesh, including only faces for which
triSurface subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. Returns pointMap, faceMap from.
void write (Ostream &) const
 Write to Ostream in simple FOAM format.
void write (const fileName &, const bool sortByRegion=false) const
 Generic write routine. Chooses writer based on extension.
void write (const Time &) const
 Write to database.
void writeDX (const scalarField &, Ostream &) const
 Write to Ostream in OpenDX format.
void writeDX (const vectorField &, Ostream &) const
void writeStats (Ostream &) const
 Write some statistics.
void operator= (const triSurface &)
- Public Member Functions inherited from PrimitivePatch< labelledTri,::Foam::List, pointField, point >
 PrimitivePatch (const ::Foam::List< labelledTri > &faces, const Field< point > &points)
 Construct from components.
 PrimitivePatch (::Foam::List< labelledTri > &faces, Field< point > &points, const bool reUse)
 Construct from components, reuse storage.
 PrimitivePatch (const PrimitivePatch< labelledTri,::Foam::List, pointField, point > &)
 Construct as copy.
virtual ~PrimitivePatch ()
void clearGeom ()
label nPoints () const
 Return number of points supporting patch faces.
label nEdges () const
 Return number of edges in patch.
const edgeListedges () const
 Return list of edges, address into LOCAL point list.
label nInternalEdges () const
 Number of internal edges.
bool isInternalEdge (const label edgeI) const
 Is internal edge?
const labelListboundaryPoints () const
 Return list of boundary points,.
const labelListListfaceFaces () const
 Return face-face addressing.
const labelListListedgeFaces () const
 Return edge-face addressing.
const labelListListfaceEdges () const
 Return face-edge addressing.
const labelListListpointEdges () const
 Return point-edge addressing.
const labelListListpointFaces () const
 Return point-face addressing.
const List< labelledTri > & localFaces () const
 Return patch faces addressing into local point list.
const labelListmeshPoints () const
 Return labelList of mesh points in patch. They are constructed.
const Map< label > & meshPointMap () const
 Mesh point map. Given the global point index find its.
const Field< point > & localPoints () const
 Return pointField of points in patch.
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search.
label whichPoint (const label gp) const
 Given a global point index, return the local point index.
label whichEdge (const edge &) const
 Given an edge in local point labels, return its.
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 Return labels of patch edges in the global edge list using.
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 Return labels of patch edges in the global edge list using.
const Field< point > & faceCentres () const
 Return face centres for patch.
const Field< point > & faceNormals () const
 Return face normals for patch.
const Field< point > & pointNormals () const
 Return point normals for patch.
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch.
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch.
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices.
surfaceTopo surfaceType () const
 Calculate surface type formed by patch.
bool checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const
 Check surface formed by patch for manifoldness (see above).
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const
 Checks primitivePatch for faces sharing point but not edge.
virtual void movePoints (const Field< point > &)
 Correct patch after moving points.
void operator= (const PrimitivePatch< labelledTri,::Foam::List, pointField, point > &)
 Assignment.
- Public Member Functions inherited from List< labelledTri >
label size () const
 Return the number of elements in the UList.
 List ()
 Null constructor.
 List (const label)
 Construct with given size.
 List (const label, const labelledTri &)
 Construct with given size and value for all elements.
 List (const List< labelledTri > &)
 Copy constructor.
 List (const Xfer< List< labelledTri > > &)
 Construct by transferring the parameter contents.
 List (List< labelledTri > &, bool reUse)
 Construct as copy or re-use as specified.
 List (const UList< labelledTri > &, const unallocLabelList &mapAddressing)
 Construct as subset.
 List (InputIterator first, InputIterator last)
 Construct given start and end iterators.
 List (const FixedList< labelledTri, Size > &)
 Construct as copy of FixedList<T, Size>
 List (const PtrList< labelledTri > &)
 Construct as copy of PtrList<T>
 List (const SLList< labelledTri > &)
 Construct as copy of SLList<T>
 List (const IndirectList< labelledTri > &)
 Construct as copy of IndirectList<T>
 List (const UIndirectList< labelledTri > &)
 Construct as copy of UIndirectList<T>
 List (const BiIndirectList< labelledTri > &)
 Construct as copy of BiIndirectList<T>
 List (Istream &)
 Construct from Istream.
autoPtr< List< labelledTri > > clone () const
 Clone.
 ~List ()
void resize (const label)
 Reset size of List.
void resize (const label, const labelledTri &)
 Reset size of List and value for new elements.
void setSize (const label)
 Reset size of List.
void setSize (const label, const labelledTri &)
 Reset size of List and value for new elements.
void clear ()
 Clear the list, i.e. set size to zero.
void append (const UList< labelledTri > &)
 Append a List at the end of this list.
void append (const UIndirectList< labelledTri > &)
 Append a UIndirectList at the end of this list.
void transfer (List< labelledTri > &)
 Transfer the contents of the argument List into this list.
void transfer (DynamicList< labelledTri, SizeInc, SizeMult, SizeDiv > &)
 Transfer the contents of the argument List into this list.
void transfer (SortableList< labelledTri > &)
 Transfer the contents of the argument List into this list.
Xfer< List< labelledTri > > xfer ()
 Transfer contents to the Xfer container.
labelledTrinewElmt (const label)
 Return subscript-checked element of UList.
void operator= (const UList< labelledTri > &)
 Assignment from UList operator. Takes linear time.
void operator= (const List< labelledTri > &)
 Assignment operator. Takes linear time.
void operator= (const SLList< labelledTri > &)
 Assignment from SLList operator. Takes linear time.
void operator= (const IndirectList< labelledTri > &)
 Assignment from IndirectList operator. Takes linear time.
void operator= (const UIndirectList< labelledTri > &)
 Assignment from UIndirectList operator. Takes linear time.
void operator= (const BiIndirectList< labelledTri > &)
 Assignment from BiIndirectList operator. Takes linear time.
void operator= (const labelledTri &)
 Assignment of all entries to the given value.
- Public Member Functions inherited from UList< labelledTri >
 UList ()
 Null constructor.
 UList (labelledTri *__restrict__ v, label size)
 Construct from components.
label fcIndex (const label i) const
 Return the forward circular index, i.e. the next index.
label rcIndex (const label i) const
 Return the reverse circular index, i.e. the previous index.
label byteSize () const
 Return the binary size in number of characters of the UList.
const labelledTricdata () const
 Return a const pointer to the first data element,.
labelledTridata ()
 Return a pointer to the first data element,.
void checkStart (const label start) const
 Check start is within valid range (0 ... size-1).
void checkSize (const label size) const
 Check size is within valid range (0 ... size).
void checkIndex (const label i) const
 Check index i is within valid range (0 ... size-1).
void writeEntry (Ostream &) const
 Write the UList as a dictionary entry.
void writeEntry (const word &keyword, Ostream &) const
 Write the UList as a dictionary entry with keyword.
void assign (const UList< labelledTri > &)
 Assign elements to those from UList.
labelledTrioperator[] (const label)
 Return element of UList.
const labelledTrioperator[] (const label) const
 Return element of constant UList.
 operator const Foam::List< labelledTri > & () const
 Allow cast to a const List<T>&.
iterator begin ()
 Return an iterator to begin traversing the UList.
const_iterator begin () const
 Return const_iterator to begin traversing the constant UList.
iterator end ()
 Return an iterator to end traversing the UList.
const_iterator end () const
 Return const_iterator to end traversing the constant UList.
const_iterator cbegin () const
 Return const_iterator to begin traversing the constant UList.
const_iterator cend () const
 Return const_iterator to end traversing the constant UList.
reverse_iterator rbegin ()
 Return reverse_iterator to begin reverse traversing the UList.
const_reverse_iterator rbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList.
reverse_iterator rend ()
 Return reverse_iterator to end reverse traversing the UList.
const_reverse_iterator rend () const
 Return const_reverse_iterator to end reverse traversing the UList.
const_reverse_iterator crbegin () const
 Return const_reverse_iterator to begin reverse traversing the UList.
const_reverse_iterator crend () const
 Return const_reverse_iterator to end reverse traversing the UList.
label max_size () const
 Return size of the largest possible UList.
bool empty () const
 Return true if the UList is empty (ie, size() is zero).
void swap (UList< labelledTri > &)
 Swap two ULists of the same type in constant time.
bool operator== (const UList< labelledTri > &) const
 Equality operation on ULists of the same type.
bool operator!= (const UList< labelledTri > &) const
 The opposite of the equality operation. Takes linear time.
bool operator< (const UList< labelledTri > &) const
 Compare two ULists lexicographically. Takes linear time.
bool operator> (const UList< labelledTri > &) const
 Compare two ULists lexicographically. Takes linear time.
bool operator<= (const UList< labelledTri > &) const
 Return true if !(a > b). Takes linear time.
bool operator>= (const UList< labelledTri > &) const
 Return true if !(a < b). Takes linear time.

Additional Inherited Members

- Public Types inherited from triSurface
typedef bool BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh.
- Public Types inherited from PrimitivePatch< labelledTri,::Foam::List, pointField, point >
enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
typedef labelledTri FaceType
typedef ::Foam::List< labelledTriFaceListType
typedef pointField PointFieldType
- Public Types inherited from List< labelledTri >
typedef SubList< labelledTrisubList
 Declare type of subList.
- Public Types inherited from UList< labelledTri >
typedef labelledTri value_type
 Type of values the UList contains.
typedef labelledTrireference
 Type that can be used for storing into.
typedef const labelledTriconst_reference
 Type that can be used for storing into.
typedef label difference_type
 The type that can represent the difference between any two.
typedef label size_type
 The type that can represent the size of a UList.
typedef labelledTriiterator
 Random access iterator for traversing UList.
typedef const labelledTriconst_iterator
 Random access iterator for traversing UList.
typedef labelledTrireverse_iterator
 Reverse iterator for reverse traversal of UList.
typedef const labelledTriconst_reverse_iterator
 Reverse iterator for reverse traversal of constant UList.
- Static Public Member Functions inherited from sampledSurface
static autoPtr< sampledSurfaceNew (const word &name, const polyMesh &, const dictionary &)
 Return a reference to the selected surface.
- Static Public Member Functions inherited from triSurface
static fileName triSurfInstance (const Time &)
 Name of triSurface directory to use.
- Protected Member Functions inherited from sampledSurface
virtual void clearGeom () const
- Protected Member Functions inherited from triSurface
pointFieldstoredPoints ()
 Non-const access to global points.
List< Face > & storedFaces ()
 Non-const access to the faces.

Constructor & Destructor Documentation

sampledIsoSurfaceCell ( const word name,
const polyMesh mesh,
const dictionary dict 
)

Construct from dictionary.

Definition at line 194 of file sampledIsoSurfaceCell.C.

~sampledIsoSurfaceCell ( )
virtual

Definition at line 225 of file sampledIsoSurfaceCell.C.


Member Function Documentation

TypeName ( "sampledIsoSurfaceCell"  )

Runtime type information.

bool needsUpdate ( ) const
virtual

Does the surface need an update?

Implements sampledSurface.

Definition at line 231 of file sampledIsoSurfaceCell.C.

References mesh, fvMesh::time(), and TimeState::timeIndex().

bool expire ( )
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 239 of file sampledIsoSurfaceCell.C.

References sampledSurface::clearGeom().

bool update ( )
virtual

Update the surface as required.

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

Implements sampledSurface.

Definition at line 258 of file sampledIsoSurfaceCell.C.

virtual const pointField& points ( ) const
inlinevirtual

Points of surface.

Implements sampledSurface.

Definition at line 144 of file sampledIsoSurfaceCell.H.

virtual const faceList& faces ( ) const
inlinevirtual

Faces of surface.

Implements sampledSurface.

Definition at line 150 of file sampledIsoSurfaceCell.H.

References autoPtr< T >::empty(), forAll, autoPtr< T >::reset(), and List< T >::size().

Foam::tmp< Foam::scalarField > sample ( const volScalarField vField) const
virtual

sample field on surface

Implements sampledSurface.

Definition at line 266 of file sampledIsoSurfaceCell.C.

Foam::tmp< Foam::vectorField > sample ( const volVectorField vField) const
virtual

sample field on surface

Implements sampledSurface.

Definition at line 276 of file sampledIsoSurfaceCell.C.

Foam::tmp< Foam::symmTensorField > sample ( const volSphericalTensorField vField) const
virtual

sample field on surface

Implements sampledSurface.

Definition at line 286 of file sampledIsoSurfaceCell.C.

virtual tmp<symmTensorField> sample ( const volSymmTensorField ) const
virtual

sample field on surface

Implements sampledSurface.

Foam::tmp< Foam::tensorField > sample ( const volTensorField vField) const
virtual

sample field on surface

Implements sampledSurface.

Definition at line 306 of file sampledIsoSurfaceCell.C.

Foam::tmp< Foam::scalarField > interpolate ( const interpolation< scalar > &  interpolator) const
virtual

interpolate field on surface

Implements sampledSurface.

Definition at line 316 of file sampledIsoSurfaceCell.C.

Foam::tmp< Foam::vectorField > interpolate ( const interpolation< vector > &  interpolator) const
virtual

interpolate field on surface

Implements sampledSurface.

Definition at line 326 of file sampledIsoSurfaceCell.C.

Foam::tmp< Foam::sphericalTensorField > interpolate ( const interpolation< sphericalTensor > &  interpolator) const
virtual

interpolate field on surface

Implements sampledSurface.

Definition at line 335 of file sampledIsoSurfaceCell.C.

Foam::tmp< Foam::symmTensorField > interpolate ( const interpolation< symmTensor > &  interpolator) const
virtual

interpolate field on surface

Implements sampledSurface.

Definition at line 345 of file sampledIsoSurfaceCell.C.

Foam::tmp< Foam::tensorField > interpolate ( const interpolation< tensor > &  interpolator) const
virtual

interpolate field on surface

Implements sampledSurface.

Definition at line 355 of file sampledIsoSurfaceCell.C.

void print ( Ostream os) const
virtual

Write.

Reimplemented from sampledSurface.

Definition at line 363 of file sampledIsoSurfaceCell.C.

References Foam::name().


The documentation for this class was generated from the following files: