polyMesh::findCell: Add support for octree search and cell tet-decomposition
Make this new method the default so that probes find the locations more reliably Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1544
This commit is contained in:
parent
ab7c7a7d1c
commit
3321553039
2 changed files with 17 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -1456,6 +1456,17 @@ bool Foam::polyMesh::pointInCell
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case CELL_TETS:
|
||||
{
|
||||
label tetFacei;
|
||||
label tetPti;
|
||||
|
||||
findTetFacePt(cellI, p, tetFacei, tetPti);
|
||||
|
||||
return tetFacei != -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -100,7 +100,8 @@ public:
|
|||
{
|
||||
FACEPLANES, // cell bound by planes of faces
|
||||
FACECENTRETETS, // tet decomposition using facectr and cellctr
|
||||
FACEDIAGTETS // tet decomposition using face diagonal and cellctr
|
||||
FACEDIAGTETS, // tet decomposition using face diagonal and cellctr
|
||||
CELL_TETS // Cell decomposed into tets
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -693,14 +694,14 @@ public:
|
|||
(
|
||||
const point&,
|
||||
label cellI,
|
||||
const cellRepresentation = FACEDIAGTETS
|
||||
const cellRepresentation = CELL_TETS
|
||||
) const;
|
||||
|
||||
//- Find cell enclosing this location (-1 if not in mesh)
|
||||
label findCell
|
||||
(
|
||||
const point&,
|
||||
const cellRepresentation = FACEDIAGTETS
|
||||
const cellRepresentation = CELL_TETS
|
||||
) const;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue