FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

triSurfaceMesh Class Reference

IOoject and searching on triSurface. More...

#include <meshTools/triSurfaceMesh.H>


Detailed Description

IOoject and searching on triSurface.

Note: when constructing from dictionary has optional parameters:

Source files

Definition at line 60 of file triSurfaceMesh.H.

Inheritance diagram for triSurfaceMesh:
Collaboration diagram for triSurfaceMesh:

List of all members.

Public Member Functions

 TypeName ("triSurfaceMesh")
 Runtime type information.
 triSurfaceMesh (const IOobject &, const triSurface &)
 Construct from triSurface.
 triSurfaceMesh (const IOobject &io)
 Construct read.
 triSurfaceMesh (const IOobject &io, const dictionary &dict)
 Construct from IO and dictionary (used by searchableSurface).
virtual  ~triSurfaceMesh ()
void  clearOut ()
 Clear storage.
virtual void  movePoints (const pointField &)
 Move points.
const indexedOctree
< treeDataTriSurface > &  
tree () const
 Demand driven contruction of octree.
const indexedOctree
< treeDataEdge > &  
edgeTree () const
 Demand driven contruction of octree for boundary edges.
virtual const wordList &  regions () const
 Names of regions.
virtual bool  hasVolumeType () const
 Whether supports volume type below. I.e. whether is closed.
virtual label  size () const
 Range of local indices that can be returned.
virtual pointField  coordinates () const
 Get representative set of element coordinates.
virtual void  findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
virtual void  findLine (const pointField &start, const pointField &end, List< pointIndexHit > &) const
 Find first intersection on segment from start to end.
virtual void  findLineAny (const pointField &start, const pointField &end, List< pointIndexHit > &) const
 Return any intersection on segment from start to end.
virtual void  findLineAll (const pointField &start, const pointField &end, List< List< pointIndexHit > > &) const
 Get all intersections in order from start to end.
virtual void  getRegion (const List< pointIndexHit > &, labelList &region) const
 From a set of points and indices get the region.
virtual void  getNormal (const List< pointIndexHit > &, vectorField &normal) const
 From a set of points and indices get the normal.
virtual void  getVolumeType (const pointField &, List< volumeType > &) const
 Determine type (inside/outside/mixed) for point. unknown if.
virtual void  distribute (const List< treeBoundBox > &, const bool keepNonLocal, autoPtr< mapDistribute > &faceMap, autoPtr< mapDistribute > &pointMap)
 Set bounds of surface. Bounds currently set as list of.
virtual void  setField (const labelList &values)
 WIP. Store element-wise field.
virtual void  getField (const List< pointIndexHit > &, labelList &) const
 WIP. From a set of hits (points and.
bool  writeData (Ostream &) const
 writeData function required by regIOobject but not used
virtual bool  writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
 Write using given format, version and compression.

Protected Member Functions

void  calcBounds (boundBox &bb, label &nPoints) const
 Calculate (number of)used points and their bounding box.

Constructor & Destructor Documentation

triSurfaceMesh ( const IOobject &   io,
const triSurface &   s  
)

Construct from triSurface.

Definition at line 316 of file triSurfaceMesh.C.

triSurfaceMesh ( const IOobject &   io  )

Construct read.

Definition at line 339 of file triSurfaceMesh.C.

triSurfaceMesh ( const IOobject &   io,
const dictionary &   dict  
)

Construct from IO and dictionary (used by searchableSurface).

Dictionary may contain a 'scale' entry (eg, 0.001: mm -> m)

Definition at line 384 of file triSurfaceMesh.C.

References Foam::endl(), Foam::Info, IOobject::name(), dictionary::readIfPresent(), and triSurface::scalePoints().

~triSurfaceMesh (  ) [virtual]

Definition at line 459 of file triSurfaceMesh.C.


Member Function Documentation

void calcBounds ( boundBox &   bb,
label &   nPoints  
) const [protected]

Calculate (number of)used points and their bounding box.

Definition at line 284 of file triSurfaceMesh.C.

References forAll, boundBox::invertedBox, Foam::max(), boundBox::max(), Foam::min(), boundBox::min(), points, and PackedList< nBits >::set().

TypeName ( "triSurfaceMesh"    )

Runtime type information.

void clearOut (  )

Clear storage.

Reimplemented from triSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 465 of file triSurfaceMesh.C.

References triSurface::clearOut().

Referenced by distributedTriSurfaceMesh::clearOut().

void movePoints ( const pointField &   newPoints  ) [virtual]

Move points.

Reimplemented from triSurface.

Definition at line 486 of file triSurfaceMesh.C.

References triSurface::movePoints().

const Foam::indexedOctree< Foam::treeDataEdge > & edgeTree (  ) const

Demand driven contruction of octree for boundary edges.

Definition at line 547 of file triSurfaceMesh.C.

References E(), treeBoundBox::extend(), Foam::identity(), boundBox::max(), boundBox::min(), and nPoints.

const Foam::wordList & regions (  ) const [virtual]

Names of regions.

Implements searchableSurface.

Definition at line 598 of file triSurfaceMesh.C.

References forAll, patches, and List< T >::setSize().

bool hasVolumeType (  ) const [virtual]

Whether supports volume type below. I.e. whether is closed.

Implements searchableSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 613 of file triSurfaceMesh.C.

virtual label size (  ) const [inline, virtual]

Range of local indices that can be returned.

Implements searchableSurface.

Definition at line 190 of file triSurfaceMesh.H.

Referenced by distributedTriSurfaceMesh::distributedTriSurfaceMesh().

Foam::pointField coordinates (  ) const [virtual]

Get representative set of element coordinates.

Usually the element centres (should be of length size()).

Implements searchableSurface.

Definition at line 475 of file triSurfaceMesh.C.

References PrimitivePatch< labelledTri,::Foam::List, pointField, point >::points(), and List< labelledTri >::size().

void findNearest ( const pointField &   sample,
const scalarField &   nearestDistSqr,
List< pointIndexHit > &   info  
) const [virtual]
void findLine ( const pointField &   start,
const pointField &   end,
List< pointIndexHit > &    
) const [virtual]

Find first intersection on segment from start to end.

Note: searchableSurfacesQueries expects no intersection to be found if start==end. Is problem?

Implements searchableSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 659 of file triSurfaceMesh.C.

References forAll, indexedOctree< Type >::perturbTol(), List< T >::setSize(), and List< T >::size().

void findLineAny ( const pointField &   start,
const pointField &   end,
List< pointIndexHit > &    
) const [virtual]

Return any intersection on segment from start to end.

Implements searchableSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 686 of file triSurfaceMesh.C.

References indexedOctree< Type >::findLineAny(), forAll, indexedOctree< Type >::perturbTol(), List< T >::setSize(), and List< T >::size().

void getRegion ( const List< pointIndexHit > &   info,
labelList &   region  
) const [virtual]

From a set of points and indices get the region.

Implements searchableSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 775 of file triSurfaceMesh.C.

References forAll, UList< labelledTri >::operator[](), labelledTri::region(), List< T >::setSize(), and List< T >::size().

void getNormal ( const List< pointIndexHit > &   info,
vectorField &   normal  
) const [virtual]

From a set of points and indices get the normal.

Cached:

normal[i] = faceNormals()[triI];

Uncached

Implements searchableSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 796 of file triSurfaceMesh.C.

References forAll, Foam::mag(), triFace::normal(), UList< labelledTri >::operator[](), points, List< T >::setSize(), List< T >::size(), and Vector< Cmpt >::zero.

Referenced by distributedTriSurfaceMesh::getNormal().

void getVolumeType ( const pointField &   points,
List< volumeType > &   volType  
) const [virtual]

Determine type (inside/outside/mixed) for point. unknown if.

cannot be determined (e.g. non-manifold surface)

Implements searchableSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 877 of file triSurfaceMesh.C.

References forAll, indexedOctree< Type >::perturbTol(), List< T >::setSize(), and List< T >::size().

virtual void distribute ( const List< treeBoundBox > &   ,
const bool   keepNonLocal,
autoPtr< mapDistribute > &   faceMap,
autoPtr< mapDistribute > &   pointMap  
) [inline, virtual]

Set bounds of surface. Bounds currently set as list of.

bounding boxes. The bounds are hints to the surface as for the range of queries it can expect. faceMap/pointMap can be set if the surface has done any redistribution.

Reimplemented from searchableSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 257 of file triSurfaceMesh.H.

void setField ( const labelList &   values  ) [virtual]

WIP. Store element-wise field.

Reimplemented from searchableSurface.

Definition at line 824 of file triSurfaceMesh.C.

References IOobject::AUTO_WRITE, Foam::dimless, IOobject::NO_READ, autoPtr< T >::ptr(), regIOobject::store(), objectRegistry::time(), and timeName.

void getField ( const List< pointIndexHit > &   info,
labelList &   values  
) const [virtual]

WIP. From a set of hits (points and.

indices) get the specified field. Misses do not get set.

Reimplemented from searchableSurface.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 851 of file triSurfaceMesh.C.

References forAll, List< T >::setSize(), and List< T >::size().

Referenced by distributedTriSurfaceMesh::getField().

bool writeData ( Ostream &    ) const [inline, virtual]

writeData function required by regIOobject but not used

for this class, write is used instead

Reimplemented from objectRegistry.

Definition at line 275 of file triSurfaceMesh.H.

References notImplemented.

bool writeObject ( IOstream::streamFormat   fmt,
IOstream::versionNumber   ver,
IOstream::compressionType   cmp  
) const [virtual]

Write using given format, version and compression.

Reimplemented from objectRegistry.

Reimplemented in distributedTriSurfaceMesh.

Definition at line 902 of file triSurfaceMesh.C.

References Foam::isFile(), Foam::mkDir(), IOobject::objectPath(), and fileName::path().

Referenced by distributedTriSurfaceMesh::writeObject().


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