MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / combine

Function combine

src/meshTools/sets/faceSources/patchToFace/patchToFace.C:55–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
54
55void Foam::patchToFace::combine(topoSet& set, const bool add) const
56{
57 labelHashSet patchIDs = mesh_.boundaryMesh().patchSet
58 (
59 List<wordRe>(1, patchName_),
60 true, // warn if not found
61 true // use patch groups if available
62 );
63
64 forAllConstIter(labelHashSet, patchIDs, iter)
65 {
66 label patchi = iter.key();
67
68 const polyPatch& pp = mesh_.boundaryMesh()[patchi];
69
70 Info<< " Found matching patch " << pp.name()
71 << " with " << pp.size() << " faces." << endl;
72
73 for
74 (
75 label facei = pp.start();
76 facei < pp.start() + pp.size();
77 facei++
78 )
79 {
80 addOrDelete(set, facei, add);
81 }
82 }
83
84 if (patchIDs.empty())
85 {
86 WarningInFunction
87 << "Cannot find any patch named " << patchName_ << endl
88 << "Valid names are " << mesh_.boundaryMesh().names() << endl;
89 }
90}
91
92
93// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

Callers 1

applyToSetFunction · 0.70

Calls 7

addOrDeleteFunction · 0.85
forAllConstIterFunction · 0.50
keyMethod · 0.45
nameMethod · 0.45
sizeMethod · 0.45
startMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected