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

Function addSet

src/meshTools/sets/topoSets/faceZoneSet.C:224–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222
223
224void faceZoneSet::addSet(const topoSet& set)
225{
226 label nConflict = 0;
227
228 DynamicList<label> newAddressing(addressing_);
229 DynamicList<bool> newFlipMap(flipMap_);
230
231 Map<label> faceToIndex(addressing_.size());
232 forAll(addressing_, i)
233 {
234 faceToIndex.insert(addressing_[i], i);
235 }
236
237 const faceZoneSet& fSet = refCast<const faceZoneSet>(set);
238
239 forAll(fSet.addressing(), i)
240 {
241 label facei = fSet.addressing()[i];
242
243 Map<label>::const_iterator iter = faceToIndex.find(facei);
244
245 if (iter != faceToIndex.end())
246 {
247 label index = iter();
248
249 if (fSet.flipMap()[i] != flipMap_[index])
250 {
251 nConflict++;
252 }
253 }
254 else
255 {
256 newAddressing.append(facei);
257 newFlipMap.append(fSet.flipMap()[i]);
258 }
259 }
260
261 if (nConflict > 0)
262 {
263 WarningInFunction
264 << "addSet : there are " << nConflict
265 << " faces with different orientation in faceZonesSets "
266 << name() << " and " << set.name() << endl;
267 }
268
269 addressing_.transfer(newAddressing);
270 flipMap_.transfer(newFlipMap);
271 updateSet();
272}
273
274
275void faceZoneSet::deleteSet(const topoSet& set)

Callers

nothing calls this directly

Calls 9

updateSetFunction · 0.70
forAllFunction · 0.50
nameFunction · 0.50
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
appendMethod · 0.45
nameMethod · 0.45
transferMethod · 0.45

Tested by

no test coverage detected