diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C index 0b330ec9cd..7c2da576c9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C @@ -86,15 +86,26 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField gradient().map(ptf.gradient(), mapper); // Evaluate the value field from the gradient if the internal field is valid - if (notNull(iF) && iF.size()) + if (notNull(iF)) { - scalarField::operator= - ( - //patchInternalField() + gradient()/patch().deltaCoeffs() - // ***HGW Hack to avoid the construction of mesh.deltaCoeffs - // which fails for AMI patches for some mapping operations - patchInternalField() + gradient()*(patch().nf() & patch().delta()) - ); + if (iF.size()) + { + // Note: cannot ask for nf() if zero faces + + scalarField::operator= + ( + //patchInternalField() + gradient()/patch().deltaCoeffs() + // ***HGW Hack to avoid the construction of mesh.deltaCoeffs + // which fails for AMI patches for some mapping operations + patchInternalField() + + gradient()*(patch().nf() & patch().delta()) + ); + } + } + else + { + // Enforce mapping of values so we have a valid starting value + this->map(ptf, mapper); } }