ENH: splitMeshRegions, autoHexMesh: allocate face-decomp structure before doing findCell

This commit is contained in:
mattijs
2012-03-26 12:17:46 +01:00
parent d7fb2360e5
commit ec25783410
4 changed files with 15 additions and 4 deletions

View File

@ -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
@ -2194,6 +2194,8 @@ int main(int argc, char *argv[])
label regionI = -1;
(void)mesh.tetBasePtIs();
label cellI = mesh.findCell(insidePoint);
Info<< nl << "Found point " << insidePoint << " in cell " << cellI

View File

@ -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
@ -76,6 +76,9 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
Foam::labelList Foam::refinementParameters::findCells(const polyMesh& mesh)
const
{
// Force calculation of tet-diag decomposition (for use in findCell)
(void)mesh.tetBasePtIs();
// Global calculation engine
globalIndex globalCells(mesh.nCells());

View File

@ -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
@ -1819,6 +1819,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMeshRegions
const point& keepPoint
)
{
// Force calculation of face decomposition (used in findCell)
(void)mesh_.tetBasePtIs();
// Determine connected regions. regionSplit is the labelList with the
// region per cell.
regionSplit cellRegion(mesh_);

View File

@ -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
@ -1235,6 +1235,9 @@ void Foam::meshRefinement::findCellZoneInsideWalk
blockedFace.clear();
// Force calculation of face decomposition (used in findCell)
(void)mesh_.tetBasePtIs();
// For all locationSurface find the cell
forAll(locationSurfaces, i)
{