ENH: topoDistanceData: have level start at 0

This commit is contained in:
mattijs
2013-01-09 14:53:53 +00:00
parent b20b5d3706
commit 4617b35874
2 changed files with 6 additions and 6 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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -124,8 +124,7 @@ inline bool Foam::topoDistanceData::updateCell
{
if (distance_ == -1)
{
data_ = neighbourInfo.data_;
distance_ = neighbourInfo.distance_ + 1;
operator=(neighbourInfo);
return true;
}
else
@ -151,7 +150,8 @@ inline bool Foam::topoDistanceData::updateFace
if (distance_ == -1)
{
operator=(neighbourInfo);
data_ = neighbourInfo.data_;
distance_ = neighbourInfo.distance_ + 1;
return true;
}
else

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -198,7 +198,7 @@ Foam::labelList Foam::structuredRenumber::renumber
}
else
{
label layerI = cellData[cellI].distance()-1;
label layerI = cellData[cellI].distance();
if (depthFirst_)
{
orderedToOld[nLayers*cellData[cellI].data()+layerI] = cellI;