Skip to content
Snippets Groups Projects
Commit 2cc72954 authored by andy's avatar andy
Browse files

ENH: Region models - added utility function to return true if patch is coupled

parent df073a34
No related merge requests found
......@@ -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
......
......@@ -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;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment