ENH: topoSetSource::SUBTRACT enum action (#1060)

- old 'DELETE' enum was easily confused with 'REMOVE', which removes
  the set, not the elements from the set.

- provide corresponding subtractSet() method

STYLE: HashSet set/unset instead of insert/erase methods in topoSetSource

- simplifies switching to/from bitSet storage
This commit is contained in:
Mark Olesen
2018-10-30 15:09:44 +00:00
parent 9b638f9a71
commit 7325e3ac7d
79 changed files with 288 additions and 283 deletions

View File

@ -132,9 +132,9 @@ void printHelp(Ostream& os)
<< " clear - clears the set" << nl
<< " invert - inverts the set" << nl
<< " remove - remove the set" << nl
<< " new <source> - sets to set to the source set" << nl
<< " new <source> - use all elements from the source set" << nl
<< " add <source> - adds all elements from the source set" << nl
<< " delete <source> - deletes ,," << nl
<< " subtract <source> - subtract the source set elements" << nl
<< " subset <source> - combines current set with the source set"
<< nl
<< nl

View File

@ -247,8 +247,8 @@ int main(int argc, char *argv[])
autoPtr<topoSet> currentSet;
if
(
(action == topoSetSource::NEW)
|| (action == topoSetSource::CLEAR)
action == topoSetSource::NEW
|| action == topoSetSource::CLEAR
)
{
currentSet = topoSet::New(setType, mesh, setName, 10000);
@ -281,7 +281,7 @@ int main(int argc, char *argv[])
{
case topoSetSource::NEW:
case topoSetSource::ADD:
case topoSetSource::DELETE:
case topoSetSource::SUBTRACT:
{
const word sourceName(dict.get<word>("source"));