sorted addressing

This commit is contained in:
mattijs
2009-09-29 20:32:08 +01:00
parent 821635d186
commit c178021ebc
6 changed files with 17 additions and 7 deletions

View File

@ -50,6 +50,10 @@ addToRunTimeSelectionTable(topoSet, cellZoneSet, set);
void cellZoneSet::updateSet() void cellZoneSet::updateSet()
{ {
labelList order;
sortedOrder(addressing_, order);
inplaceReorder(order, addressing_);
cellSet::clearStorage(); cellSet::clearStorage();
cellSet::resize(2*addressing_.size()); cellSet::resize(2*addressing_.size());
forAll(addressing_, i) forAll(addressing_, i)

View File

@ -58,9 +58,6 @@ class cellZoneSet
labelList addressing_; labelList addressing_;
// Private Member Functions
public: public:
//- Runtime type information //- Runtime type information
@ -115,7 +112,7 @@ public:
return addressing_; return addressing_;
} }
//- Make cellSet part consistent with addressing //- Sort addressing and make cellSet part consistent with addressing
void updateSet(); void updateSet();
//- Invert contents. (insert all members 0..maxLen-1 which were not in //- Invert contents. (insert all members 0..maxLen-1 which were not in

View File

@ -50,6 +50,11 @@ addToRunTimeSelectionTable(topoSet, faceZoneSet, set);
void faceZoneSet::updateSet() void faceZoneSet::updateSet()
{ {
labelList order;
sortedOrder(addressing_, order);
inplaceReorder(order, addressing_);
inplaceReorder(order, flipMap_);
faceSet::clearStorage(); faceSet::clearStorage();
faceSet::resize(2*addressing_.size()); faceSet::resize(2*addressing_.size());
forAll(addressing_, i) forAll(addressing_, i)
@ -145,7 +150,7 @@ void faceZoneSet::invert(const label maxLen)
if (!found(faceI)) if (!found(faceI))
{ {
addressing_[n] = faceI; addressing_[n] = faceI;
flipMap_[n] = true; //? or false? flipMap_[n] = false; //? or true?
n++; n++;
} }
} }

View File

@ -129,7 +129,7 @@ public:
} }
//- Make faceSet part consistent with addressing //- Sort addressing and make faceSet part consistent with addressing
void updateSet(); void updateSet();
//- Invert contents. (insert all members 0..maxLen-1 which were not in //- Invert contents. (insert all members 0..maxLen-1 which were not in

View File

@ -50,6 +50,10 @@ addToRunTimeSelectionTable(topoSet, pointZoneSet, set);
void pointZoneSet::updateSet() void pointZoneSet::updateSet()
{ {
labelList order;
sortedOrder(addressing_, order);
inplaceReorder(order, addressing_);
pointSet::clearStorage(); pointSet::clearStorage();
pointSet::resize(2*addressing_.size()); pointSet::resize(2*addressing_.size());
forAll(addressing_, i) forAll(addressing_, i)

View File

@ -115,7 +115,7 @@ public:
return addressing_; return addressing_;
} }
//- Make pointSet part consistent with addressing //- Sort addressing and make pointSet part consistent with addressing
void updateSet(); void updateSet();
//- Invert contents. (insert all members 0..maxLen-1 which were not in //- Invert contents. (insert all members 0..maxLen-1 which were not in