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>
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.
Definition at line 74 of file distributedTriSurfaceMesh.H.
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 ®ion) 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_ |
enum distributionType |
Definition at line 82 of file distributedTriSurfaceMesh.H.
distributedTriSurfaceMesh | ( | const IOobject & | io, |
const triSurface & | s, | ||
const dictionary & | dict | ||
) |
Construct from triSurface.
Definition at line 1299 of file distributedTriSurfaceMesh.C.
References Foam::endl(), forAll, Pstream::gatherList(), Foam::Info, Pstream::myProcNo(), Pstream::nProcs(), Pstream::scatterList(), and List< labelledTri >::size().
distributedTriSurfaceMesh | ( | const IOobject & | io ) |
Construct read. Does findInstance to find io.local().
Definition at line 1344 of file distributedTriSurfaceMesh.C.
References Foam::endl(), forAll, Pstream::gatherList(), Foam::Info, Pstream::myProcNo(), Pstream::nProcs(), IOobject::objectPath(), Pstream::scatterList(), triSurfaceMesh::size(), and distributedTriSurfaceMesh::writeStats().
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.
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 findNearest | ( | const pointField & | sample, |
const scalarField & | nearestDistSqr, | ||
List< pointIndexHit > & | info | ||
) | const [virtual]
|
Reimplemented from triSurfaceMesh.
Definition at line 1485 of file distributedTriSurfaceMesh.C.
References mapDistribute::constructMap(), mapDistribute::constructSize(), mapDistribute::distribute(), forAll, Foam::magSqr(), Pstream::myProcNo(), PstreamBase::nonBlocking, Pstream::nProcs(), Pstream::parRun(), Foam::returnReduce(), List< T >::setSize(), List< T >::size(), mapDistribute::subMap(), and globalIndex::toGlobal().
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]
|
From a set of points and indices get the region.
Reimplemented from triSurfaceMesh.
Definition at line 1824 of file distributedTriSurfaceMesh.C.
References mapDistribute::constructMap(), mapDistribute::distribute(), forAll, PstreamBase::nonBlocking, UList< labelledTri >::operator[](), Pstream::parRun(), labelledTri::region(), List< T >::setSize(), List< T >::size(), and mapDistribute::subMap().
void getNormal | ( | const List< pointIndexHit > & | info, |
vectorField & | normal | ||
) | const [virtual]
|
From a set of points and indices get the normal.
Reimplemented from triSurfaceMesh.
Definition at line 1898 of file distributedTriSurfaceMesh.C.
References mapDistribute::constructMap(), mapDistribute::distribute(), forAll, triSurfaceMesh::getNormal(), Foam::mag(), PstreamBase::nonBlocking, Pstream::parRun(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), List< T >::setSize(), List< T >::size(), and mapDistribute::subMap().
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 |
Print some stats. Parallel aware version of.
Reimplemented from triSurface.
Definition at line 2432 of file distributedTriSurfaceMesh.C.
References Foam::endl(), boundBox::max(), boundBox::min(), nPoints, Foam::reduce(), Foam::returnReduce(), and List< labelledTri >::size().
Referenced by distributedTriSurfaceMesh::distributedTriSurfaceMesh().
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().
const Foam::NamedEnum< Foam::distributedTriSurfaceMesh::distributionType, 3 > distributionTypeNames_ [static]
|
Definition at line 89 of file distributedTriSurfaceMesh.H.