From 4617b358745f6a786aaa80103b45c675cc1e5284 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Wed, 9 Jan 2013 14:53:53 +0000 Subject: [PATCH] ENH: topoDistanceData: have level start at 0 --- .../structuredDecomp/topoDistanceDataI.H | 8 ++++---- .../structuredRenumber/structuredRenumber.C | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/parallel/decompose/decompositionMethods/structuredDecomp/topoDistanceDataI.H b/src/parallel/decompose/decompositionMethods/structuredDecomp/topoDistanceDataI.H index 9ce5c90c5f6..388c923a2ae 100644 --- a/src/parallel/decompose/decompositionMethods/structuredDecomp/topoDistanceDataI.H +++ b/src/parallel/decompose/decompositionMethods/structuredDecomp/topoDistanceDataI.H @@ -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 diff --git a/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C b/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C index 0593e2d49f4..b0a13a83997 100644 --- a/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C +++ b/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C @@ -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; -- GitLab