mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Region models - added utility function to return true if patch is coupled
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user