From bd65c6e8bec3424963a7c302c4da74335fbce32e Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 31 May 2013 16:16:12 +0100 Subject: [PATCH] ENH: Added error message if ACMI non-overlap patch is defined prior to ACMI patch --- .../cyclicACMIPolyPatch/cyclicACMIPolyPatch.C | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C index 6e249d876f..30ae0adf37 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C @@ -342,6 +342,18 @@ Foam::label Foam::cyclicACMIPolyPatch::nonOverlapPatchID() const << exit(FatalError); } + if (nonOverlapPatchID_ < index()) + { + FatalErrorIn("cyclicPolyAMIPatch::neighbPatchID() const") + << "Boundary ordering error: " << type() + << " patch must be defined prior to its non-overlapping patch" + << nl + << type() << " patch: " << name() << ", ID:" << index() << nl + << "Non-overlap patch: " << nonOverlapPatchName_ + << ", ID:" << nonOverlapPatchID_ << nl + << exit(FatalError); + } + const polyPatch& noPp = this->boundaryMesh()[nonOverlapPatchID_]; bool ok = true;