Commit b304d4ea authored by mattijs's avatar mattijs
Browse files

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

parent 59f4a137
......@@ -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());
}
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment