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

View File

@ -35,11 +35,11 @@ void Foam::processorMeshes::read()
// and fields // and fields
forAll(databases_, proci) forAll(databases_, proci)
{ {
meshes_.set(proci, nullptr);
pointProcAddressing_.set(proci, nullptr);
faceProcAddressing_.set(proci, nullptr);
cellProcAddressing_.set(proci, nullptr);
boundaryProcAddressing_.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) forAll(databases_, proci)