Skip to content
Snippets Groups Projects
Commit 4617b358 authored by mattijs's avatar mattijs
Browse files

ENH: topoDistanceData: have level start at 0

parent b20b5d37
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment