diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C index 78a61ce472..f343967bc1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C @@ -78,7 +78,7 @@ directMappedFixedValueFvPatchField::directMappedFixedValueFvPatchField << "\n for patch " << p.name() << " of field " << this->dimensionedInternalField().name() << " in file " << this->dimensionedInternalField().objectPath() - << exit(FatalIOError); + << exit(FatalError); } } @@ -111,7 +111,7 @@ directMappedFixedValueFvPatchField::directMappedFixedValueFvPatchField << "\n for patch " << p.name() << " of field " << this->dimensionedInternalField().name() << " in file " << this->dimensionedInternalField().objectPath() - << exit(FatalIOError); + << exit(FatalError); } } diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPolyPatch.C b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPolyPatch.C index 808942c562..a5eb3f4cb0 100644 --- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPolyPatch.C +++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPolyPatch.C @@ -199,6 +199,16 @@ void Foam::directMappedPolyPatch::calcMapping() const << "Mapping already calculated" << exit(FatalError); } + if (offset_ == vector::zero) + { + FatalErrorIn("directMappedPolyPatch::calcMapping() const") + << "Invalid offset " << offset_ << endl + << "Offset is the vector added to the patch face centres to" + << " find the cell supplying the data." + << exit(FatalError); + } + + // Get global list of all samples and the processor and face they come from. pointField samples; labelList patchFaceProcs;