Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Community
integration-cfmesh
Commits
12fc4171
Commit
12fc4171
authored
Aug 19, 2014
by
Philippose Rajan
Browse files
triSurface mesh also now supports finding patches using regular expressions
Signed-off-by:
Philippose Rajan
<
sarith@rocketmail.com
>
parent
24593943
Changes
2
Hide whitespace changes
Inline
Side-by-side
meshLibrary/utilities/meshes/triSurf/triSurfFacets.C
View file @
12fc4171
...
...
@@ -29,6 +29,7 @@ Description
#include "pointIOField.H"
#include "IOobjectList.H"
#include "pointSet.H"
#include "stringListOps.H"
namespace
Foam
{
...
...
@@ -72,6 +73,33 @@ triSurfFacets::~triSurfFacets()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
wordList
triSurfFacets
::
patchNames
()
const
{
wordList
t
(
patches_
.
size
());
forAll
(
patches_
,
patchI
)
{
t
[
patchI
]
=
patches_
[
patchI
].
name
();
}
return
t
;
}
labelList
triSurfFacets
::
findPatches
(
const
word
&
patchName
)
const
{
wordList
allPatches
=
patchNames
();
labelList
patchIDs
=
findStrings
(
patchName
,
allPatches
);
if
(
patchIDs
.
empty
())
{
WarningIn
(
"triSurfFacets::findPatches(const word&)"
)
<<
"Cannot find any patch names matching "
<<
patchName
<<
endl
;
}
return
patchIDs
;
}
label
triSurfFacets
::
addFacetSubset
(
const
word
&
subsetName
)
{
label
id
=
facetSubsetIndex
(
subsetName
);
...
...
meshLibrary/utilities/meshes/triSurf/triSurfFacets.H
View file @
12fc4171
...
...
@@ -98,6 +98,13 @@ public:
//- access to patches
inline
const
geometricSurfacePatchList
&
patches
()
const
;
//- return list of patches in the boundary
wordList
patchNames
()
const
;
//- return a list of patch indices corresponding to the given
// name, expanding regular expressions
labelList
findPatches
(
const
word
&
patchName
)
const
;
//- append a triangle to the end of the list
inline
void
appendTriangle
(
const
labelledTri
&
tria
);
...
...
Write
Preview
Markdown
is supported
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