Public Member Functions | Static Public Member Functions | List of all members
searchableSurfacesQueries Class Reference

A collection of tools for searchableSurfaces. More...

Public Member Functions

 ClassName ("searchableSurfacesQueries")
 

Static Public Member Functions

static void findAnyIntersection (const PtrList< searchableSurface > &, const labelList &surfacesToTest, const pointField &start, const pointField &end, labelList &surfaces, List< pointIndexHit > &)
 Find any intersection. Return hit point information and. More...
 
static void findAllIntersections (const PtrList< searchableSurface > &, const labelList &surfacesToTest, const pointField &start, const pointField &end, labelListList &surfaces, List< List< pointIndexHit >> &surfaceHits)
 Find all intersections in order from start to end. Returns for. More...
 
static void findNearestIntersection (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const pointField &start, const pointField &end, labelList &surface1, List< pointIndexHit > &hit1, labelList &surface2, List< pointIndexHit > &hit2)
 
static void findNearest (const PtrList< searchableSurface > &, const labelList &surfacesToTest, const pointField &, const scalarField &nearestDistSqr, labelList &surfaces, List< pointIndexHit > &)
 Find nearest. Return -1 (and a miss()) or surface and nearest. More...
 
static void findNearest (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const pointField &samples, const scalarField &nearestDistSqr, const labelList &regionIndices, labelList &nearestSurfaces, List< pointIndexHit > &nearestInfo)
 Find nearest points to a specific region of the surface. More...
 
static void signedDistance (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const pointField &samples, const scalarField &nearestDistSqr, const volumeType illegalHandling, labelList &nearestSurfaces, scalarField &distance)
 Find signed distance to nearest surface. Outside is positive. More...
 
static boundBox bounds (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest)
 Find the boundBox of the selected surfaces. More...
 
static pointIndexHit facesIntersection (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const scalar initDistSqr, const scalar convergenceDistSqr, const point &start)
 Calculate point which is on a set of surfaces. WIP. More...
 

Detailed Description

A collection of tools for searchableSurfaces.

Source files

Definition at line 51 of file searchableSurfacesQueries.H.

Member Function Documentation

ClassName ( "searchableSurfacesQueries"  )
void findAnyIntersection ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest,
const pointField start,
const pointField end,
labelList surfaces,
List< pointIndexHit > &  hitInfo 
)
static

Find any intersection. Return hit point information and.

index in surfacesToTest. If multiple surfaces hit the first surface is returned, not necessarily the nearest (to start).

Definition at line 396 of file searchableSurfacesQueries.C.

References searchableSurfacesQueries::findAllIntersections(), forAll, Foam::identity(), List< T >::setSize(), and List< T >::size().

Referenced by searchableSurfaces::findAnyIntersection().

Here is the call graph for this function:

Here is the caller graph for this function:

void findAllIntersections ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest,
const pointField start,
const pointField end,
labelListList surfaces,
List< List< pointIndexHit >> &  surfaceHits 
)
static

Find all intersections in order from start to end. Returns for.

every hit the index in surfacesToTest and the hit info.

Definition at line 457 of file searchableSurfacesQueries.C.

References UList< T >::empty(), searchableSurfacesQueries::findNearestIntersection(), forAll, Foam::magSqr(), List< T >::setSize(), and List< T >::size().

Referenced by searchableSurfaces::findAllIntersections(), and searchableSurfacesQueries::findAnyIntersection().

Here is the call graph for this function:

Here is the caller graph for this function:

void findNearestIntersection ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest,
const pointField start,
const pointField end,
labelList surface1,
List< pointIndexHit > &  hit1,
labelList surface2,
List< pointIndexHit > &  hit2 
)
static

Definition at line 537 of file searchableSurfacesQueries.C.

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

Referenced by searchableSurfacesQueries::findAllIntersections(), and searchableSurfaces::findNearestIntersection().

Here is the call graph for this function:

Here is the caller graph for this function:

void findNearest ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest,
const pointField samples,
const scalarField nearestDistSqr,
labelList surfaces,
List< pointIndexHit > &  nearestInfo 
)
static

Find nearest. Return -1 (and a miss()) or surface and nearest.

point.

Definition at line 625 of file searchableSurfacesQueries.C.

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

Referenced by searchableSurfaces::findNearest(), and searchableSurfacesQueries::findNearestIntersection().

Here is the call graph for this function:

Here is the caller graph for this function:

void findNearest ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest,
const pointField samples,
const scalarField nearestDistSqr,
const labelList regionIndices,
labelList nearestSurfaces,
List< pointIndexHit > &  nearestInfo 
)
static

Find nearest points to a specific region of the surface.

Definition at line 672 of file searchableSurfacesQueries.C.

References UList< T >::empty(), forAll, Foam::magSqr(), List< T >::setSize(), searchableSurfacesQueries::signedDistance(), and List< T >::size().

Here is the call graph for this function:

void signedDistance ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest,
const pointField samples,
const scalarField nearestDistSqr,
const volumeType  illegalHandling,
labelList nearestSurfaces,
scalarField distance 
)
static

Find signed distance to nearest surface. Outside is positive.

illegalHandling: how to handle non-inside or outside OUTSIDE : treat as outside INSIDE : treat as inside UNKNOWN : throw fatal error

Definition at line 733 of file searchableSurfacesQueries.C.

References searchableSurfacesQueries::bounds(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, volumeType::INSIDE, Foam::mag(), volumeType::names, volumeType::OUTSIDE, List< T >::setSize(), and List< T >::size().

Referenced by searchableSurfacesQueries::findNearest().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::boundBox bounds ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest 
)
static

Find the boundBox of the selected surfaces.

Definition at line 832 of file searchableSurfacesQueries.C.

References searchableSurface::bounds(), searchableSurfacesQueries::facesIntersection(), forAll, boundBox::max(), boundBox::min(), and List< T >::size().

Referenced by searchableSurfaces::bounds(), and searchableSurfacesQueries::signedDistance().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::pointIndexHit facesIntersection ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest,
const scalar  initDistSqr,
const scalar  convergenceDistSqr,
const point start 
)
static

Calculate point which is on a set of surfaces. WIP.

Downhill Simplex method

Definition at line 853 of file searchableSurfacesQueries.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), List< T >::size(), and Foam::Zero.

Referenced by searchableSurfacesQueries::bounds(), and searchableSurfaces::facesIntersection().

Here is the call graph for this function:

Here is the caller graph for this function:


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