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

IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of the overall surface. All queries are distributed to the processor that can answer it and the result sent back. More...

#include <meshTools/distributedTriSurfaceMesh.H>


Detailed Description

IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of the overall surface. All queries are distributed to the processor that can answer it and the result sent back.

Can work in three modes:

  • follow : makes sure each processor has all the triangles inside the externally provided bounding box (usually the mesh bounding box). Guarantees minimum amount of communication since mesh-local queries should be answerable without any comms.
  • independent : surface is decomposed according to the triangle centres so the decomposition might be radically different from the mesh decomposition. Guarantees best memory balance but at the expense of more communication.
  • frozen : no change
Source files

Definition at line 74 of file distributedTriSurfaceMesh.H.

Inheritance diagram for distributedTriSurfaceMesh:
Collaboration diagram for distributedTriSurfaceMesh:

List of all members.

Public Types

enum  distributionType { FOLLOW = 0, INDEPENDENT = 1, FROZEN = 2 }

Public Member Functions

 TypeName ("distributedTriSurfaceMesh")
 Runtime type information.
 distributedTriSurfaceMesh (const IOobject &, const triSurface &, const dictionary &dict)
 Construct from triSurface.
 distributedTriSurfaceMesh (const IOobject &io)
 Construct read. Does findInstance to find io.local().
 distributedTriSurfaceMesh (const IOobject &io, const dictionary &dict)
 Construct from dictionary (used by searchableSurface).
virtual  ~distributedTriSurfaceMesh ()
void  clearOut ()
 Clear storage.
const globalIndex &  globalTris () const
 Triangle indexing (demand driven)
virtual bool  hasVolumeType () const
 Whether supports volume type below. I.e. whether is closed.
virtual label  globalSize () const
 Range of global indices that can be returned.
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  getField (const List< pointIndexHit > &, labelList &) const
 WIP. From a set of hits (points and.
void  writeStats (Ostream &os) const
 Print some stats. Parallel aware version of.
virtual bool  writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
 Write using given format, version and compression.

Static Public Member Functions

static triSurface  overlappingSurface (const triSurface &, const List< treeBoundBox > &, labelList &subPointMap, labelList &subFaceMap)
 Subset the part of surface that is overlapping bounds.

Static Public Attributes

static const NamedEnum
< distributionType, 3 >  
distributionTypeNames_

Member Enumeration Documentation

Enumerator:
FOLLOW 
INDEPENDENT 
FROZEN 

Definition at line 82 of file distributedTriSurfaceMesh.H.


Constructor & Destructor Documentation

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

Construct from dictionary (used by searchableSurface).

Does read. Does findInstance to find io.local().

Definition at line 1399 of file distributedTriSurfaceMesh.C.

References Foam::endl(), forAll, Pstream::gatherList(), Foam::Info, Pstream::myProcNo(), Pstream::nProcs(), IOobject::objectPath(), Pstream::scatterList(), and List< labelledTri >::size().

~distributedTriSurfaceMesh (  ) [virtual]

Definition at line 1459 of file distributedTriSurfaceMesh.C.


Member Function Documentation

TypeName ( "distributedTriSurfaceMesh"    )

Runtime type information.

void clearOut (  )

Clear storage.

Reimplemented from triSurfaceMesh.

Definition at line 1465 of file distributedTriSurfaceMesh.C.

References triSurfaceMesh::clearOut().

const Foam::globalIndex & globalTris (  ) const

Triangle indexing (demand driven)

Definition at line 1474 of file distributedTriSurfaceMesh.C.

References List< labelledTri >::size().

Referenced by distributedTriSurfaceMesh::globalSize().

virtual bool hasVolumeType (  ) const [inline, virtual]

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

Not supported.

Reimplemented from triSurfaceMesh.

Definition at line 345 of file distributedTriSurfaceMesh.H.

virtual label globalSize (  ) const [inline, virtual]

Range of global indices that can be returned.

Reimplemented from searchableSurface.

Definition at line 351 of file distributedTriSurfaceMesh.H.

References distributedTriSurfaceMesh::globalTris(), and globalIndex::size().

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?

Reimplemented from triSurfaceMesh.

Definition at line 1676 of file distributedTriSurfaceMesh.C.

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

Return any intersection on segment from start to end.

Reimplemented from triSurfaceMesh.

Definition at line 1693 of file distributedTriSurfaceMesh.C.

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

Get all intersections in order from start to end.

Reimplemented from triSurfaceMesh.

Definition at line 1710 of file distributedTriSurfaceMesh.C.

References List< T >::clear(), forAll, Foam::magSqr(), Foam::returnReduce(), List< T >::setSize(), List< T >::size(), and Foam::sqrt().

void getRegion ( const List< pointIndexHit > &   info,
labelList &   region  
) const [virtual]
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)

Reimplemented from triSurfaceMesh.

Definition at line 2025 of file distributedTriSurfaceMesh.C.

References Foam::exit(), Foam::FatalError, and FatalErrorIn.

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

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

bounding boxes. Will do redistribution of surface to locally have all triangles overlapping bounds. Larger bounds: more triangles (memory), more fully local tests (quick). keepNonLocal = true : keep triangles that do not overlap any processor bounds. Should really be split into a routine to determine decomposition and one that does actual distribution but determining decomposition with duplicate triangle merging requires same amount as work as actual distribution.

Reimplemented from triSurfaceMesh.

Definition at line 2082 of file distributedTriSurfaceMesh.C.

References PstreamBase::blocking, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, Pstream::gatherList(), Foam::identity(), Foam::Info, Pstream::myProcNo(), Pstream::nProcs(), triSurface::operator=(), patches, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), autoPtr< T >::reset(), Pstream::scatterList(), List< T >::setSize(), List< labelledTri >::size(), and List< T >::size().

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 triSurfaceMesh.

Definition at line 1962 of file distributedTriSurfaceMesh.C.

References mapDistribute::constructMap(), mapDistribute::distribute(), forAll, triSurfaceMesh::getField(), PstreamBase::nonBlocking, Pstream::parRun(), List< T >::setSize(), List< T >::size(), and mapDistribute::subMap().

Foam::triSurface overlappingSurface ( const triSurface &   s,
const List< treeBoundBox > &   bbs,
labelList &   subPointMap,
labelList &   subFaceMap  
) [static]

Subset the part of surface that is overlapping bounds.

Definition at line 2041 of file distributedTriSurfaceMesh.C.

References forAll, Vector< Cmpt >::max, Foam::max(), Vector< Cmpt >::min, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), and List< T >::size().

void writeStats ( Ostream &   os  ) const
bool writeObject ( IOstream::streamFormat   fmt,
IOstream::versionNumber   ver,
IOstream::compressionType   cmp  
) const [virtual]

Write using given format, version and compression.

Reimplemented from triSurfaceMesh.

Definition at line 2416 of file distributedTriSurfaceMesh.C.

References IOstream::ASCII, IOobject::instance(), and triSurfaceMesh::writeObject().


Member Data Documentation


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