diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C index 279e72a0c5..ab3af1717e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C @@ -234,6 +234,16 @@ void directMappedFixedValueFvPatchField::updateCoeffs() ( mpp.samplePatch() ); + if (patchID < 0) + { + FatalErrorIn + ( + "void directMappedFixedValueFvPatchField::" + "updateCoeffs()" + )<< "Unable to find sample patch " << mpp.samplePatch() + << " for patch " << this->patch().name() << nl + << abort(FatalError); + } typedef GeometricField fieldType; const word& fieldName = this->dimensionedInternalField().name(); const fieldType& sendField =