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

Function combine

src/meshTools/sets/pointSources/zoneToPoint/zoneToPoint.C:56–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
55
56void Foam::zoneToPoint::combine(topoSet& set, const bool add) const
57{
58 bool hasMatched = false;
59
60 forAll(mesh_.pointZones(), i)
61 {
62 const pointZone& zone = mesh_.pointZones()[i];
63
64 if (zoneName_.match(zone.name()))
65 {
66 const labelList& pointLabels = mesh_.pointZones()[i];
67
68 Info<< " Found matching zone " << zone.name()
69 << " with " << pointLabels.size() << " points." << endl;
70
71 hasMatched = true;
72
73 forAll(pointLabels, i)
74 {
75 // Only do active points
76 if (pointLabels[i] < mesh_.nPoints())
77 {
78 addOrDelete(set, pointLabels[i], add);
79 }
80 }
81 }
82 }
83
84 if (!hasMatched)
85 {
86 WarningInFunction
87 << "Cannot find any pointZone named " << zoneName_ << endl
88 << "Valid names are " << mesh_.pointZones().names() << endl;
89 }
90}
91
92
93// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

Callers 1

applyToSetFunction · 0.70

Calls 6

addOrDeleteFunction · 0.85
forAllFunction · 0.50
matchMethod · 0.45
nameMethod · 0.45
sizeMethod · 0.45
nPointsMethod · 0.45

Tested by

no test coverage detected