diff --git a/src/meshTools/sets/topoSets/cellZoneSet.C b/src/meshTools/sets/topoSets/cellZoneSet.C index 061cecb47539ce94ed3e202abe5b3f7307c3fc86..613a23bc8c7d59eed456b26e6db1544181c54261 100644 --- a/src/meshTools/sets/topoSets/cellZoneSet.C +++ b/src/meshTools/sets/topoSets/cellZoneSet.C @@ -50,6 +50,10 @@ addToRunTimeSelectionTable(topoSet, cellZoneSet, set); void cellZoneSet::updateSet() { + labelList order; + sortedOrder(addressing_, order); + inplaceReorder(order, addressing_); + cellSet::clearStorage(); cellSet::resize(2*addressing_.size()); forAll(addressing_, i) diff --git a/src/meshTools/sets/topoSets/cellZoneSet.H b/src/meshTools/sets/topoSets/cellZoneSet.H index 40f0334f90511bc28035495da3dc0b5e3e10eaaa..7ddb48d1146ab8d5e78003b49722ce6f18de0f76 100644 --- a/src/meshTools/sets/topoSets/cellZoneSet.H +++ b/src/meshTools/sets/topoSets/cellZoneSet.H @@ -58,9 +58,6 @@ class cellZoneSet labelList addressing_; - // Private Member Functions - - public: //- Runtime type information @@ -115,7 +112,7 @@ public: return addressing_; } - //- Make cellSet part consistent with addressing + //- Sort addressing and make cellSet part consistent with addressing void updateSet(); //- Invert contents. (insert all members 0..maxLen-1 which were not in diff --git a/src/meshTools/sets/topoSets/faceZoneSet.C b/src/meshTools/sets/topoSets/faceZoneSet.C index 4e215a1ee2b6dd6dbc42efb7578a36848a2f244a..85069a83ae2d6de8e9282ff2ae0fab82fd537b27 100644 --- a/src/meshTools/sets/topoSets/faceZoneSet.C +++ b/src/meshTools/sets/topoSets/faceZoneSet.C @@ -50,6 +50,11 @@ addToRunTimeSelectionTable(topoSet, faceZoneSet, set); void faceZoneSet::updateSet() { + labelList order; + sortedOrder(addressing_, order); + inplaceReorder(order, addressing_); + inplaceReorder(order, flipMap_); + faceSet::clearStorage(); faceSet::resize(2*addressing_.size()); forAll(addressing_, i) @@ -145,7 +150,7 @@ void faceZoneSet::invert(const label maxLen) if (!found(faceI)) { addressing_[n] = faceI; - flipMap_[n] = true; //? or false? + flipMap_[n] = false; //? or true? n++; } } diff --git a/src/meshTools/sets/topoSets/faceZoneSet.H b/src/meshTools/sets/topoSets/faceZoneSet.H index cefe642e44ec5dcfcc01257638dec9034a5ca4f9..335bd9edead8f913a2593f975d7becb2d4a2a53e 100644 --- a/src/meshTools/sets/topoSets/faceZoneSet.H +++ b/src/meshTools/sets/topoSets/faceZoneSet.H @@ -129,7 +129,7 @@ public: } - //- Make faceSet part consistent with addressing + //- Sort addressing and make faceSet part consistent with addressing void updateSet(); //- Invert contents. (insert all members 0..maxLen-1 which were not in diff --git a/src/meshTools/sets/topoSets/pointZoneSet.C b/src/meshTools/sets/topoSets/pointZoneSet.C index acab1e51a9f25b44b4270a7f96c81f3675295afb..32f447d1447ed5723d589eb6ed642e9b73bc3a9d 100644 --- a/src/meshTools/sets/topoSets/pointZoneSet.C +++ b/src/meshTools/sets/topoSets/pointZoneSet.C @@ -50,6 +50,10 @@ addToRunTimeSelectionTable(topoSet, pointZoneSet, set); void pointZoneSet::updateSet() { + labelList order; + sortedOrder(addressing_, order); + inplaceReorder(order, addressing_); + pointSet::clearStorage(); pointSet::resize(2*addressing_.size()); forAll(addressing_, i) diff --git a/src/meshTools/sets/topoSets/pointZoneSet.H b/src/meshTools/sets/topoSets/pointZoneSet.H index 9518c5e71d51d374031755e8b7b9e1330f5cfe53..7f93886e0bc71b3b8eddc31231f262df5ab6fe29 100644 --- a/src/meshTools/sets/topoSets/pointZoneSet.H +++ b/src/meshTools/sets/topoSets/pointZoneSet.H @@ -115,7 +115,7 @@ public: return addressing_; } - //- Make pointSet part consistent with addressing + //- Sort addressing and make pointSet part consistent with addressing void updateSet(); //- Invert contents. (insert all members 0..maxLen-1 which were not in