Bugfix when writing overset region index

The values at the coupled boundaries haven't been properly uninitialized and the
coupled patches have been skipped from assignement to patch internal field.
This commit is contained in:
Vuko Vukcevic 2018-09-03 09:39:54 +02:00
parent 02bc8b5f69
commit c7cd6b09fd

View file

@ -18,7 +18,8 @@
IOobject::NO_WRITE
),
mesh,
dimless
dimless,
"zeroGradient"
);
scalarField& regionIndexIn = regionIndex.internalField();
@ -32,13 +33,18 @@
}
}
// Update boundary values
forAll (regionIndex.boundaryField(), patchI)
// Update boundary values, making sure that we skip the overset patch
volScalarField::GeometricBoundaryField& regionIndexb =
regionIndex.boundaryField();
forAll(regionIndexb, patchI)
{
if (!regionIndex.boundaryField()[patchI].coupled())
// Get the patch field
fvPatchScalarField& ripf = regionIndexb[patchI];
if (!isA<oversetFvPatchScalarField>(ripf))
{
regionIndex.boundaryField()[patchI] =
regionIndex.boundaryField()[patchI].patchInternalField();
ripf = ripf.patchInternalField();
}
}