mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: searchableSurface: extended api for getting nearest and normal
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -95,4 +95,21 @@ Foam::searchableSurface::~searchableSurface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::searchableSurface::findNearest
|
||||
(
|
||||
const pointField& sample,
|
||||
const scalarField& nearestDistSqr,
|
||||
List<pointIndexHit>& info,
|
||||
vectorField& normal,
|
||||
labelList& region
|
||||
) const
|
||||
{
|
||||
findNearest(sample, nearestDistSqr, info);
|
||||
getNormal(info, normal);
|
||||
getRegion(info, region);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -323,6 +323,17 @@ public:
|
||||
List<volumeType>&
|
||||
) const = 0;
|
||||
|
||||
//- Find nearest, normal and region. Can be overridden with
|
||||
// optimised implementation
|
||||
virtual void findNearest
|
||||
(
|
||||
const pointField& sample,
|
||||
const scalarField& nearestDistSqr,
|
||||
List<pointIndexHit>&,
|
||||
vectorField& normal,
|
||||
labelList& region
|
||||
) const;
|
||||
|
||||
|
||||
// Other
|
||||
|
||||
|
||||
Reference in New Issue
Block a user