ENH: polyMesh,meshSearch: default value on findCell, pointInCell

This commit is contained in:
mattijs
2011-11-08 17:03:54 +00:00
parent b7155f785e
commit ca4b8c347c
22 changed files with 36 additions and 86 deletions

View File

@ -267,7 +267,7 @@ void Foam::meshToMesh::cellAddresses
cellAddressing_[toI] = -1;
// Check point is actually in the nearest cell
if (fromMesh.pointInCell(p, curCell, polyMesh::FACEDIAGTETS))
if (fromMesh.pointInCell(p, curCell))
{
cellAddressing_[toI] = curCell;
}
@ -292,15 +292,7 @@ void Foam::meshToMesh::cellAddresses
{
// search through all the neighbours.
// If point is in neighbour reset current cell
if
(
fromMesh.pointInCell
(
p,
neighbours[nI],
polyMesh::FACEDIAGTETS
)
)
if (fromMesh.pointInCell(p, neighbours[nI]))
{
cellAddressing_[toI] = neighbours[nI];
found = true;
@ -324,15 +316,7 @@ void Foam::meshToMesh::cellAddresses
{
// search through all the neighbours.
// If point is in neighbour reset current cell
if
(
fromMesh.pointInCell
(
p,
nn[nI],
polyMesh::FACEDIAGTETS
)
)
if (fromMesh.pointInCell(p, nn[nI]))
{
cellAddressing_[toI] = nn[nI];
found = true;

View File

@ -45,7 +45,7 @@ void Foam::probes::findElements(const fvMesh& mesh)
{
const vector& location = operator[](probeI);
elementList_[probeI] = mesh.findCell(location, polyMesh::FACEDIAGTETS);
elementList_[probeI] = mesh.findCell(location);
if (debug && elementList_[probeI] != -1)
{

View File

@ -138,7 +138,7 @@ Foam::sampledSets::sampledSets
mesh_(refCast<const fvMesh>(obr)),
loadFromFiles_(loadFromFiles),
outputPath_(fileName::null),
searchEngine_(mesh_, polyMesh::FACEDIAGTETS),
searchEngine_(mesh_),
interpolationScheme_(word::null),
writeFormat_(word::null)
{

View File

@ -53,11 +53,7 @@ void Foam::triSurfaceMeshPointSet::calcSamples
{
forAll(sampleCoords_, sampleI)
{
label cellI = searchEngine().findCell
(
sampleCoords_[sampleI],
polyMesh::FACEDIAGTETS
);
label cellI = searchEngine().findCell(sampleCoords_[sampleI]);
if (cellI != -1)
{