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)
 Find intersections of edge nearest to both endpoints. More...
 
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 labelListList &regionIndices, const pointField &samples, const scalarField &nearestDistSqr, labelList &nearestSurfaces, List< pointIndexHit > &nearestInfo)
 Find nearest points to a specific regions of the surface. More...
 
static void findNearest (const PtrList< searchableSurface > &allSurfaces, const labelList &surfacesToTest, const pointField &start, const scalarField &distSqr, pointField &near, List< pointConstraint > &constraint, const label nIter=20)
 Find nearest points that are on all supplied surfaces. 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 labelUList &surfacesToTest)
 Find the boundBox of the selected surfaces. More...
 

Detailed Description

A collection of tools for searchableSurfaces.

Source files

Definition at line 50 of file searchableSurfacesQueries.H.

Member Function Documentation

◆ ClassName()

ClassName ( "searchableSurfacesQueries"  )

◆ findAnyIntersection()

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 115 of file searchableSurfacesQueries.C.

References stdFoam::end(), forAll, Foam::identity(), p0, List< T >::setSize(), and UList< T >::size().

Referenced by searchableSurfaces::findAnyIntersection(), and refinementSurfaces::findAnyIntersection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findAllIntersections()

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 176 of file searchableSurfacesQueries.C.

References UList< T >::empty(), stdFoam::end(), forAll, List< T >::setSize(), and UList< T >::size().

Referenced by searchableSurfaces::findAllIntersections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findNearestIntersection()

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

Find intersections of edge nearest to both endpoints.

Definition at line 255 of file searchableSurfacesQueries.C.

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

Referenced by searchableSurfaces::findNearestIntersection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findNearest() [1/3]

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 342 of file searchableSurfacesQueries.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, samples(), List< T >::setSize(), and UList< T >::size().

Referenced by searchableSurfaces::findNearest(), refinementSurfaces::findNearest(), refinementSurfaces::findNearestRegion(), projectCurveEdge::position(), and projectEdge::position().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findNearest() [2/3]

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

Find nearest points to a specific regions of the surface.

Definition at line 395 of file searchableSurfacesQueries.C.

References UList< T >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, samples(), List< T >::setSize(), and UList< T >::size().

Here is the call graph for this function:

◆ findNearest() [3/3]

void findNearest ( const PtrList< searchableSurface > &  allSurfaces,
const labelList surfacesToTest,
const pointField start,
const scalarField distSqr,
pointField near,
List< pointConstraint > &  constraint,
const label  nIter = 20 
)
static

Find nearest points that are on all supplied surfaces.

(nearest point if single surface; nearest intersection by steepest descent if on multiple surfaces). Returns current best guess). Wip.

Definition at line 466 of file searchableSurfacesQueries.C.

References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), forAll, Foam::mag(), n, plane::planeIntersect(), s, List< T >::setSize(), UList< T >::size(), and Foam::sqrt().

Here is the call graph for this function:

◆ signedDistance()

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 588 of file searchableSurfacesQueries.C.

References Foam::distance(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, volumeType::INSIDE, volumeType::OUTSIDE, samples(), UList< T >::size(), and volumeType::str().

Here is the call graph for this function:

◆ bounds()

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

Find the boundBox of the selected surfaces.

Definition at line 686 of file searchableSurfacesQueries.C.

References boundBox::add().

Referenced by searchableSurfaces::bounds().

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: