Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Community
integration-cfmesh
Commits
9cb1bd68
Commit
9cb1bd68
authored
Aug 10, 2014
by
Philippose Rajan
Browse files
Added function to get patch ID from name, and patch Name from ID
Signed-off-by:
Philippose Rajan
<
sarith@rocketmail.com
>
parent
da7c7c2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenFaces.C
View file @
9cb1bd68
...
...
@@ -214,7 +214,7 @@ wordList polyMeshGenFaces::patchNames() const
return
t
;
}
label
polyMeshGenFaces
::
find
PatchID
(
const
word
&
patchName
)
const
label
polyMeshGenFaces
::
get
PatchID
(
const
word
&
patchName
)
const
{
forAll
(
boundaries_
,
patchI
)
{
...
...
@@ -232,6 +232,20 @@ label polyMeshGenFaces::findPatchID(const word& patchName) const
return
-
1
;
}
word
polyMeshGenFaces
::
getPatchName
(
const
label
patchID
)
const
{
if
((
patchID
<
0
)
||
(
patchID
>=
boundaries_
.
size
()))
{
FatalErrorIn
(
"polyMeshGenFaces::getPatchName(const label patchID) const"
)
<<
"invalid patch ID supplied"
<<
abort
(
FatalError
);
}
return
boundaries_
[
patchID
].
patchName
();
}
labelList
polyMeshGenFaces
::
findPatches
(
const
word
&
patchName
)
const
{
wordList
allPatches
=
patchNames
();
...
...
meshLibrary/utilities/meshes/polyMeshGen/polyMeshGenFaces.H
View file @
9cb1bd68
...
...
@@ -147,7 +147,10 @@ public:
wordList
patchNames
()
const
;
//- return the index of a patch given its name
label
findPatchID
(
const
word
&
patchName
)
const
;
label
getPatchID
(
const
word
&
patchName
)
const
;
//- return the name of a patch given its ID
word
getPatchName
(
const
label
patchID
)
const
;
//- return a list of patch indices corresponding to the given
// name, expanding regular expressions
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment