Skip to content

Commit cd133a2

Browse files
author
Will Bainbridge
committed
fvMeshTopoChangers::refiner: Fix hang in parallel
This has required switching the order of dependence of the fvMesh geometry (i.e., Sf, Cf, and C), and the interpolation weights. The weights are now considered dependent on the geometry fields, and the geometry fields must therefore construct without reference to the weights.
1 parent 20f5235 commit cd133a2

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
========= |
33
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
44
\\ / O peration | Website: https://openfoam.org
5-
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
5+
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
66
\\/ M anipulation |
77
-------------------------------------------------------------------------------
88
License
@@ -158,15 +158,11 @@ void Foam::surfaceInterpolation::makeWeights() const
158158
surfaceScalarField& weights = *weights_;
159159

160160
// Set local references to mesh data
161-
// (note that we should not use fvMesh sliced fields at this point yet
162-
// since this causes a loop when generating weighting factors in
163-
// coupledFvPatchField evaluation phase)
164161
const labelUList& owner = mesh_.owner();
165162
const labelUList& neighbour = mesh_.neighbour();
166-
167-
const vectorField& Cf = mesh_.faceCentres();
168-
const vectorField& C = mesh_.cellCentres();
169-
const vectorField& Sf = mesh_.faceAreas();
163+
const surfaceVectorField& Sf = mesh_.Sf();
164+
const surfaceVectorField& Cf = mesh_.Cf();
165+
const volVectorField& C = mesh_.C();
170166

171167
// ... and reference to the internal field of the weighting factors
172168
scalarField& w = weights.primitiveFieldRef();

src/fvMeshTopoChangers/refiner/fvMeshTopoChangersRefiner.C

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,10 +575,7 @@ void Foam::fvMeshTopoChangers::refiner::refineUfs
575575
{
576576
const surfaceVectorField UfU
577577
(
578-
fvc::interpolate
579-
(
580-
mesh().lookupObject<volVectorField>(Uname)
581-
)
578+
fvc::interpolate(mesh().lookupObject<volVectorField>(Uname))
582579
);
583580

584581
// Recalculate new internal faces.

0 commit comments

Comments
 (0)