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

Function subset

src/meshTools/sets/topoSets/topoSet.C:467–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465
466
467void Foam::topoSet::subset(const topoSet& set)
468{
469 // Keep copy of current set.
470 labelHashSet currentSet(*this);
471
472 clear();
473 resize(2*min(currentSet.size(), set.size()));
474
475 forAllConstIter(labelHashSet, currentSet, iter)
476 {
477 if (set.found(iter.key()))
478 {
479 // element present in both currentSet and set.
480 insert(iter.key());
481 }
482 }
483}
484
485
486void Foam::topoSet::addSet(const topoSet& set)

Callers

nothing calls this directly

Calls 8

minFunction · 0.85
clearFunction · 0.50
resizeFunction · 0.50
forAllConstIterFunction · 0.50
insertFunction · 0.50
sizeMethod · 0.45
foundMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected