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

Function deleteSet

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

Source from the content-addressed store, hash-verified

273
274
275void faceZoneSet::deleteSet(const topoSet& set)
276{
277 label nConflict = 0;
278
279 DynamicList<label> newAddressing(addressing_.size());
280 DynamicList<bool> newFlipMap(flipMap_.size());
281
282 const faceZoneSet& fSet = refCast<const faceZoneSet>(set);
283
284 Map<label> faceToIndex(fSet.addressing().size());
285 forAll(fSet.addressing(), i)
286 {
287 faceToIndex.insert(fSet.addressing()[i], i);
288 }
289
290 forAll(addressing_, i)
291 {
292 label facei = addressing_[i];
293
294 Map<label>::const_iterator iter = faceToIndex.find(facei);
295
296 if (iter != faceToIndex.end())
297 {
298 label index = iter();
299
300 if (fSet.flipMap()[index] != flipMap_[i])
301 {
302 nConflict++;
303 }
304 }
305 else
306 {
307 // Not found in fSet so add
308 newAddressing.append(facei);
309 newFlipMap.append(fSet.flipMap()[i]);
310 }
311 }
312
313 if (nConflict > 0)
314 {
315 WarningInFunction
316 << "deleteSet : there are " << nConflict
317 << " faces with different orientation in faceZonesSets "
318 << name() << " and " << set.name() << endl;
319 }
320
321 addressing_.transfer(newAddressing);
322 flipMap_.transfer(newFlipMap);
323 updateSet();
324}
325
326
327void faceZoneSet::sync(const polyMesh& mesh)

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