BUG: surfaceNormalFixedValue: do not use ptf.patch(). Fixes #319

This commit is contained in:
mattijs
2016-12-01 14:31:22 +00:00
parent 3077a11c0d
commit 450d84bd77
2 changed files with 10 additions and 15 deletions

View File

@ -67,18 +67,13 @@ surfaceNormalFixedValueFvPatchVectorField
)
:
fixedValueFvPatchVectorField(p, iF),
refValue_(ptf.refValue_, mapper)
refValue_(ptf.refValue_, mapper, 0.0)
{
// Note: calculate product only on ptf to avoid multiplication on
// unset values in reconstructPar.
fvPatchVectorField::operator=
(
vectorField
(
ptf.refValue_*ptf.patch().nf(),
mapper
)
);
// Note: refValue_ will have default value 0.0 for unmapped faces. This
// can temporarily happen during e.g. redistributePar. We should not
// access ptf.patch() instead since redistributePar has destroyed this
// at the time of mapping.
fvPatchVectorField::operator=(refValue_*patch().nf());
}

View File

@ -35,11 +35,11 @@ void Foam::processorMeshes::read()
// and fields
forAll(databases_, proci)
{
meshes_.set(proci, nullptr);
pointProcAddressing_.set(proci, nullptr);
faceProcAddressing_.set(proci, nullptr);
cellProcAddressing_.set(proci, nullptr);
boundaryProcAddressing_.set(proci, nullptr);
cellProcAddressing_.set(proci, nullptr);
faceProcAddressing_.set(proci, nullptr);
pointProcAddressing_.set(proci, nullptr);
meshes_.set(proci, nullptr);
}
forAll(databases_, proci)