diff --git a/src/regionModels/regionModel/regionModel/regionModel.H b/src/regionModels/regionModel/regionModel/regionModel.H index 589402c1cf..c0bd06e4df 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.H +++ b/src/regionModels/regionModel/regionModel/regionModel.H @@ -217,9 +217,13 @@ public: // Addressing + //- Return true if patchI on the local region is a coupled + // patch to the primary region + inline bool isCoupledPatch(const label regionPatchI) const; + //- Return true if patchI on the primary region is a coupled // patch to the local region - inline bool isRegionPatch(const label patchI) const; + inline bool isRegionPatch(const label primaryPatchI) const; //- Return the list of patch IDs on the primary region coupled // to this region diff --git a/src/regionModels/regionModel/regionModel/regionModelI.H b/src/regionModels/regionModel/regionModel/regionModelI.H index 834bbfb022..287fcc1920 100644 --- a/src/regionModels/regionModel/regionModel/regionModelI.H +++ b/src/regionModels/regionModel/regionModel/regionModelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,14 +112,31 @@ Foam::regionModels::regionModel::solution() const } +inline bool Foam::regionModels::regionModel::isCoupledPatch +( + const label regionPatchI +) const +{ + forAll(intCoupledPatchIDs_, i) + { + if (intCoupledPatchIDs_[i] == regionPatchI) + { + return true; + } + } + + return false; +} + + inline bool Foam::regionModels::regionModel::isRegionPatch ( - const label patchI + const label primaryPatchI ) const { forAll(primaryPatchIDs_, i) { - if (primaryPatchIDs_[i] == patchI) + if (primaryPatchIDs_[i] == primaryPatchI) { return true; }