STYLE: revert bitSet/HashSet setMany() to set() method (issue #837)

- improves backward compatibility and more naming consistency.
  Retain setMany(iter1, iter2) to avoid ambiguity with the
  PackedList::set(index, value) method.
This commit is contained in:
Mark Olesen
2018-05-29 17:38:02 +02:00
parent 3de9b2f675
commit 6b6b36afd3
79 changed files with 243 additions and 213 deletions

View File

@ -188,10 +188,10 @@ int main(int argc, char *argv[])
Info<< "setB : " << setB << endl;
labelPair pair(12, 15);
setB.setMany(pair);
setB.set(pair);
Info<< "setB : " << setB << endl;
setB.unsetMany(pair);
setB.unset(pair);
labelHashSet setC(1);
@ -257,7 +257,7 @@ int main(int argc, char *argv[])
someLst[elemI] = elemI*elemI;
}
label added = setD.setMany(someLst);
label added = setD.set(someLst);
Info<< "added " << added << " from " << someLst.size() << endl;
Info<< "setD : " << flatOutput(setD) << endl;

View File

@ -294,7 +294,7 @@ int main(int argc, char *argv[])
Info<< "\nclear/assign from labelList\n";
list4.clear();
list4.setMany(labelList{0, 1, 2, 3, 12, 13, 14, 19, 20, 21});
list4.set(labelList{0, 1, 2, 3, 12, 13, 14, 19, 20, 21});
report(list4, true);

View File

@ -94,7 +94,7 @@ int main(int argc, char *argv[])
e4.start() = e4.end() = -1;
Info<< "insert from list\n";
labelHashSet newIndices({2, -1, 2, 1, 4, 1, 2, 3});
e4.insertMany(newIndices.toc());
e4.insert(newIndices.toc());
printInfo(e4);
e4.start() = e4.end() = -1;
@ -105,12 +105,12 @@ int main(int argc, char *argv[])
FixedList<label, 8> otherIndices{12, 2, -1, 1, 4, 1, 2, 3};
e4.start() = e4.end() = -1;
Info<< "insert from list: " << otherIndices << nl;
e4.insertMany(otherIndices);
e4.insert(otherIndices);
printInfo(e4);
e4.start() = e4.end();
Info<< "erase from list: " << otherIndices << nl;
Info<< "removed " << e4.eraseMany(otherIndices) << " values" << nl;
Info<< "removed " << e4.erase(otherIndices) << " values" << nl;
printInfo(e4);
for (label i : {-1, 0, 1, 3})

View File

@ -374,7 +374,7 @@ void Foam::cellSplitter::setRefinement
const cell& cFaces = mesh_.cells()[celli];
faceUpToDate.unsetMany(cFaces);
faceUpToDate.unset(cFaces);
}
forAll(faceUpToDate, facei)

View File

@ -120,7 +120,7 @@ int main(int argc, char *argv[])
{
const labelList& pCells = mesh.pointCells()[meshPointi];
cutCells.insertMany(pCells);
cutCells.insert(pCells);
}
}
@ -153,7 +153,7 @@ int main(int argc, char *argv[])
const polyPatch& pp = mesh.boundaryMesh()[patchi];
const labelList& meshPoints = pp.meshPoints();
vertOnPatch.setMany(meshPoints);
vertOnPatch.set(meshPoints);
}
for (const label patchi : patchSet)

View File

@ -184,7 +184,7 @@ int main(int argc, char *argv[])
const DynamicList<label>& bin = bins[binI];
cellSet cells(mesh, "vol" + name(binI), bin.size());
cells.insertMany(bin);
cells.insert(bin);
Info<< " " << lowerLimits[binI] << " .. " << upperLimits[binI]
<< " : writing " << bin.size() << " cells to cellSet "

View File

@ -633,7 +633,7 @@ int main(int argc, char *argv[])
);
cellSet cutSet(mesh, "cutSet", cutCells.size());
cutSet.insertMany(cutCells);
cutSet.insert(cutCells);
// Gets cuts across cells from cuts through edges.
Info<< "Writing " << cutSet.size() << " cells to cut to cellSet "

View File

@ -956,7 +956,7 @@ int main(int argc, char *argv[])
forAll(dofVertIndices, patchi)
{
const labelList& foamVerts = dofVertIndices[patchi];
dofGroups[patchi].insertMany(foamVerts);
dofGroups[patchi].insert(foamVerts);
}
List<DynamicList<face>> dynPatchFaces(dofVertIndices.size());

View File

@ -344,7 +344,7 @@ void writePointCells
{
const labelList& cEdges = mesh.cellEdges()[pCells[i]];
allEdges.insertMany(cEdges);
allEdges.insert(cEdges);
}

View File

@ -795,7 +795,7 @@ int main(int argc, char *argv[])
forAll(addedCells, facei)
{
const labelList& aCells = addedCells[facei];
addedCellsSet.insertMany(aCells);
addedCellsSet.insert(aCells);
}
}
}

View File

@ -527,7 +527,7 @@ label findUncoveredPatchFace
{
// Make set of extruded faces.
labelHashSet extrudeFaceSet(extrudeMeshFaces.size());
extrudeFaceSet.insertMany(extrudeMeshFaces);
extrudeFaceSet.insert(extrudeMeshFaces);
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
const labelList& eFaces = mesh.edgeFaces()[meshEdgeI];
@ -561,7 +561,7 @@ label findUncoveredCyclicPatchFace
{
// Make set of extruded faces.
labelHashSet extrudeFaceSet(extrudeMeshFaces.size());
extrudeFaceSet.insertMany(extrudeMeshFaces);
extrudeFaceSet.insert(extrudeMeshFaces);
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
const labelList& eFaces = mesh.edgeFaces()[meshEdgeI];

View File

@ -1053,7 +1053,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
nInvalidPolyhedra++;
wrongFaces.insertMany(cells[cI]);
wrongFaces.insert(cells[cI]);
}
}
@ -1093,7 +1093,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
if (nInternalFaces[cI] <= 1)
{
oneInternalFaceCells++;
wrongFaces.insertMany(cells[cI]);
wrongFaces.insert(cells[cI]);
}
}
@ -1109,7 +1109,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
{
const face f = pMesh.faces()[facei];
ptToBeLimited.setMany(f);
ptToBeLimited.set(f);
}
// // Limit connected cells
@ -1126,7 +1126,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
// {
// label ptI = f[fPtI];
// const labelList& pC = ptCells[ptI];
// limitCells.insertMany(pC);
// limitCells.insert(pC);
// }
// }
@ -1136,7 +1136,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
// {
// const labelList& cP = cellPts[celli];
// ptToBeLimited.setMany(cP);
// ptToBeLimited.set(cP);
// }
@ -2537,7 +2537,7 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints
{
const face& f = faces[fI];
ptUsed.setMany(f);
ptUsed.set(f);
}
label pointi = 0;
@ -2587,8 +2587,8 @@ Foam::labelList Foam::conformalVoronoiMesh::removeUnusedCells
// Scan all faces to find all of the cells that are used
cellUsed.setMany(owner);
cellUsed.setMany(neighbour);
cellUsed.set(owner);
cellUsed.set(neighbour);
label celli = 0;

View File

@ -1369,7 +1369,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
for (const label pointi : protrudingBoundaryPoints)
{
const labelList& pCells = mesh.pointCells()[pointi];
protrudingCells.insertMany(pCells);
protrudingCells.insert(pCells);
}
label protrudingCellsSize = protrudingCells.size();

View File

@ -891,7 +891,7 @@ void Foam::meshDualiser::setRefinement
{
const labelList& fEdges = mesh_.faceEdges()[facei];
isBoundaryEdge.setMany(fEdges);
isBoundaryEdge.set(fEdges);
}

View File

@ -349,7 +349,7 @@ int main(int argc, char *argv[])
forAll(oldToNew, oldCelli)
{
const labelList& added = oldToNew[oldCelli];
newCells.insertMany(added);
newCells.insert(added);
}
Info<< "Writing refined cells ("

View File

@ -300,7 +300,7 @@ void Foam::regionSide::walkAllPointConnectedFaces
{
const labelList& fEdges = mesh.faceEdges()[facei];
regionEdges.insertMany(fEdges);
regionEdges.insert(fEdges);
}

View File

@ -311,7 +311,7 @@ int main(int argc, char *argv[])
wordHashSet names;
forAllConstIters(rp, iter)
{
names.insertMany(iter.object());
names.insert(iter.object());
}
regionNames = names.sortedToc();

View File

@ -451,7 +451,7 @@ void Foam::domainDecomposition::decomposeMesh()
const labelList& facePoints = fcs[mag(facei) - 1];
// Mark the face points as being used
pointsInUse.setMany(facePoints);
pointsInUse.set(facePoints);
}
procPointAddressing_[proci] = pointsInUse.sortedToc();

View File

@ -186,7 +186,7 @@ int main(int argc, char *argv[])
wordHashSet names;
forAllConstIters(rp, iter)
{
names.insertMany(iter.object());
names.insert(iter.object());
}
regionNames = names.sortedToc();

View File

@ -227,7 +227,7 @@ void Foam::vtkPVFoam::updateInfoLagrangian
for (const instant& t : dbPtr_().times())
{
names.insertMany
names.insert
(
readDir
(

View File

@ -123,7 +123,7 @@ Foam::boundaryInfo::boundaryInfo(const Time& runTime, const word& regionName)
if (dict.found("inGroups"))
{
dict.lookup("inGroups") >> groups_[patchI];
allGroupNames_.insertMany(groups_[patchI]);
allGroupNames_.insert(groups_[patchI]);
}
}
}

View File

@ -202,7 +202,7 @@ int main(int argc, char *argv[])
for (const wordRe& zoneName : zoneNames)
{
labelList zoneIDs = findStrings(zoneName, allZoneNames);
includeFaceZones.insertMany(zoneIDs);
includeFaceZones.insert(zoneIDs);
if (zoneIDs.empty())
{

View File

@ -262,7 +262,7 @@ public:
// Setting single or multiple values
//- Single index/value assign
//- Assign a single index/value
using PackedList<1>::set;
//- Set specified bits from another bitset.
@ -346,29 +346,41 @@ public:
// Either increases the size of the bitSet or is a no-op.
inline bitSet& extend(const bitSet& other);
//- Set the listed locations to true.
// Does auto-vivify for non-existent entries.
inline void setMany(const labelUList& locations);
//- Set the listed locations to true.
// Does auto-vivify for non-existent entries.
inline void setMany(const labelUIndList& locations);
//- Set the locations listed by the iterator range,
// auto-vivify entries if needed.
//
// \return number of locations changed
template<class InputIter>
void setMany(InputIter first, InputIter last);
label setMany(InputIter first, InputIter last);
//- Unset the listed locations, never auto-vivifies.
inline void unsetMany(const labelUList& locations);
//- Set the listed locations to true.
// Does auto-vivify for non-existent entries.
//
// \return number of locations changed
inline label set(const labelUList& locations);
//- Unset the listed locations, never auto-vivifies.
inline void unsetMany(const labelUIndList& locations);
//- Set the listed locations to true.
// Does auto-vivify for non-existent entries.
//
// \return number of locations changed
inline label set(const labelUIndList& locations);
//- Unset the locations listed by the iterator range,
//- never auto-vivify entries.
//
// \return number of locations changed
template<class InputIter>
void unsetMany(InputIter first, InputIter last);
label unset(InputIter first, InputIter last);
//- Unset the listed locations, never auto-vivifies.
//
// \return number of locations changed
inline label unset(const labelUList& locations);
//- Unset the listed locations, never auto-vivifies.
//
// \return number of locations changed
inline label unset(const labelUIndList& locations);
// Access helpers

View File

@ -531,27 +531,27 @@ inline void Foam::bitSet::set(const bitSet& bitset)
}
inline void Foam::bitSet::setMany(const labelUList& locations)
inline Foam::label Foam::bitSet::set(const labelUList& locations)
{
setMany(locations.begin(), locations.end());
return setMany(locations.begin(), locations.end());
}
inline void Foam::bitSet::setMany(const labelUIndList& locations)
inline Foam::label Foam::bitSet::set(const labelUIndList& locations)
{
setMany(locations.begin(), locations.end());
return setMany(locations.begin(), locations.end());
}
inline void Foam::bitSet::unsetMany(const labelUList& locations)
inline Foam::label Foam::bitSet::unset(const labelUList& locations)
{
unsetMany(locations.begin(), locations.end());
return unset(locations.begin(), locations.end());
}
inline void Foam::bitSet::unsetMany(const labelUIndList& locations)
inline Foam::label Foam::bitSet::unset(const labelUIndList& locations)
{
unsetMany(locations.begin(), locations.end());
return unset(locations.begin(), locations.end());
}

View File

@ -28,31 +28,45 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class InputIter>
void Foam::bitSet::setMany(InputIter first, InputIter last)
Foam::label Foam::bitSet::setMany(InputIter first, InputIter last)
{
// Check the max expected value first
const auto max = std::max_element(first, last);
const label len = (max != last ? (1 + *max) : 0);
label changed = 0;
if (len > 0)
{
reserve(len);
for (; first != last; ++first)
{
set(*first);
if (set(*first))
{
++changed;
}
}
}
return changed;
}
template<class InputIter>
void Foam::bitSet::unsetMany(InputIter first, InputIter last)
Foam::label Foam::bitSet::unset(InputIter first, InputIter last)
{
label changed = 0;
for (; first != last; ++first)
{
unset(*first);
if (unset(*first))
{
++changed;
}
}
return changed;
}

View File

@ -42,7 +42,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::assignMany
{
if (!this->capacity())
{
// Could be zero-sized from a previous transfer()?
// Zero-sized from a previous transfer()?
this->resize(2*nItems);
}
else
@ -155,7 +155,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::insert
template<class Key, class Hash>
template<unsigned Size>
inline Foam::label Foam::HashSet<Key, Hash>::insertMany
inline Foam::label Foam::HashSet<Key, Hash>::insert
(
const FixedList<Key, Size>& list
)
@ -165,7 +165,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::insertMany
template<class Key, class Hash>
inline Foam::label Foam::HashSet<Key, Hash>::insertMany
inline Foam::label Foam::HashSet<Key, Hash>::insert
(
const UList<Key>& list
)
@ -175,7 +175,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::insertMany
template<class Key, class Hash>
inline Foam::label Foam::HashSet<Key, Hash>::insertMany
inline Foam::label Foam::HashSet<Key, Hash>::insert
(
const UIndirectList<Key>& list
)
@ -208,7 +208,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::unset
template<class Key, class Hash>
template<unsigned Size>
inline Foam::label Foam::HashSet<Key, Hash>::unsetMany
inline Foam::label Foam::HashSet<Key, Hash>::unset
(
const FixedList<Key, Size>& list
)
@ -218,7 +218,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::unsetMany
template<class Key, class Hash>
inline Foam::label Foam::HashSet<Key, Hash>::unsetMany
inline Foam::label Foam::HashSet<Key, Hash>::unset
(
const UList<Key>& list
)
@ -228,7 +228,7 @@ inline Foam::label Foam::HashSet<Key, Hash>::unsetMany
template<class Key, class Hash>
inline Foam::label Foam::HashSet<Key, Hash>::unsetMany
inline Foam::label Foam::HashSet<Key, Hash>::unset
(
const UIndirectList<Key>& list
)

View File

@ -204,15 +204,15 @@ public:
//- Insert keys from the list of Key
// \return The number of new elements inserted
template<unsigned Size>
inline label insertMany(const FixedList<Key, Size>& list);
inline label insert(const FixedList<Key, Size>& list);
//- Insert keys from the list of Key
// \return The number of new elements inserted
inline label insertMany(const UList<Key>& list);
inline label insert(const UList<Key>& list);
//- Insert keys from the list of Key
// \return The number of new elements inserted
inline label insertMany(const UIndirectList<Key>& list);
inline label insert(const UIndirectList<Key>& list);
//- Same as insert (no value to overwrite)
template<class InputIter>
@ -229,27 +229,35 @@ public:
//- Same as insert (no value to overwrite)
template<unsigned Size>
inline label setMany(const FixedList<Key, Size>& list)
inline label set(const FixedList<Key, Size>& list)
{
return insertMany(list);
return insert(list);
}
//- Same as insertMany (no value to overwrite)
inline label setMany(const UList<Key>& list)
//- Same as insert (no value to overwrite)
inline label set(const UList<Key>& list)
{
return insertMany(list);
return insert(list);
}
//- Same as insertMany (no value to overwrite)
inline label setMany(const UIndirectList<Key>& list)
//- Same as insert (no value to overwrite)
inline label set(const UIndirectList<Key>& list)
{
return insertMany(list);
return insert(list);
}
//- Same as insert (no value to overwrite)
// \note Method name compatibility with bitSet
template<class InputIter>
inline label setMany(InputIter first, InputIter last)
{
return insert(first, last);
}
//- Unset the keys listed in the input iterator range
// \return The number of items removed
template<class InputIter>
inline label unset(InputIter first, const InputIter last);
inline label unset(InputIter first, InputIter last);
//- Unset the listed keys - same as erase
// \return The number of items removed
@ -258,15 +266,15 @@ public:
//- Unset the listed keys - same as erase
// \return The number of items removed
template<unsigned Size>
inline label unsetMany(const FixedList<Key, Size>& list);
inline label unset(const FixedList<Key, Size>& list);
//- Unset the listed keys - same as erase
// \return The number of items removed
inline label unsetMany(const UList<Key>& list);
inline label unset(const UList<Key>& list);
//- Unset the listed keys - same as erase
// \return The number of items removed
inline label unsetMany(const UIndirectList<Key>& list);
inline label unset(const UIndirectList<Key>& list);
// STL iterators

View File

@ -444,7 +444,7 @@ inline Foam::label Foam::HashTable<T, Key, Hash>::erase
template<class T, class Key, class Hash>
template<unsigned Size>
inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany
inline Foam::label Foam::HashTable<T, Key, Hash>::erase
(
const FixedList<Key, Size>& keys
)
@ -454,7 +454,7 @@ inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany
template<class T, class Key, class Hash>
inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany
inline Foam::label Foam::HashTable<T, Key, Hash>::erase
(
const UList<Key>& keys
)
@ -766,9 +766,9 @@ void Foam::HashTable<T, Key, Hash>::operator=
<< abort(FatalError);
}
// Could be zero-sized from a previous transfer()
if (!capacity_)
{
// Zero-sized from a previous transfer()?
resize(rhs.capacity_);
}
else
@ -789,9 +789,9 @@ void Foam::HashTable<T, Key, Hash>::operator=
std::initializer_list<std::pair<Key, T>> rhs
)
{
// Could be zero-sized from a previous transfer()
if (!capacity_)
{
// Zero-sized from a previous transfer()?
resize(2*rhs.size());
}
else

View File

@ -507,11 +507,11 @@ public:
//- Remove table entries given by the listed keys
// \return The number of items removed
template<unsigned Size>
inline label eraseMany(const FixedList<Key, Size>& keys);
inline label erase(const FixedList<Key, Size>& keys);
//- Remove table entries given by the listed keys
// \return The number of items removed
inline label eraseMany(const UList<Key>& keys);
inline label erase(const UList<Key>& keys);
//- Retain table entries given by keys of the other hash-table.
//

View File

@ -305,7 +305,7 @@ bool Foam::functionObjectList::readFunctionObject
else if (args.size() > 1)
{
funcDict.set("fields", args);
requiredFields.insertMany(args);
requiredFields.insert(args);
}
else if (funcDict.found("field"))
{
@ -313,7 +313,7 @@ bool Foam::functionObjectList::readFunctionObject
}
else if (funcDict.found("fields"))
{
requiredFields.insertMany(wordReList(funcDict.lookup("fields")));
requiredFields.insert(wordReList(funcDict.lookup("fields")));
}
// Insert named arguments

View File

@ -181,12 +181,6 @@ public:
// Similar to a HashTable::insert().
inline bool insert(const label index);
//- Fill open slots with the indices if they did not previously exist.
// Returns true on success. Negative labels never insert.
// Return the number of slots filled.
// Similar to a HashTable::insert().
inline label insert(std::initializer_list<label> list);
//- Insert values, using begin/end iterators.
template<class InputIter>
inline label insert(InputIter begIter, InputIter endIter);
@ -194,15 +188,21 @@ public:
//- Fill open slots with the indices if they did not previously exist.
// Returns true on success. Negative labels never insert.
// Return the number of slots filled.
// Similar to a HashTable::insertMany().
template<unsigned Size>
inline label insertMany(const FixedList<label, Size>& list);
// Similar to a HashTable::insert().
inline label insert(std::initializer_list<label> list);
//- Fill open slots with the indices if they did not previously exist.
// Returns true on success. Negative labels never insert.
// Return the number of slots filled.
// Similar to a HashTable::insertMany().
inline label insertMany(const labelUList& list);
// Similar to a HashTable::insert().
template<unsigned Size>
inline label insert(const FixedList<label, Size>& list);
//- Fill open slots with the indices if they did not previously exist.
// Returns true on success. Negative labels never insert.
// Return the number of slots filled.
// Similar to a HashTable::insert().
inline label insert(const labelUList& list);
//- Remove an existing index from the edge and set its location to '-1'.
@ -210,22 +210,22 @@ public:
// Similar to a HashTable::erase().
inline label erase(const label index);
//- Remove existing indices from the edge and set locations to '-1'.
// Returns the number of changes.
inline label erase(std::initializer_list<label> list);
//- Remove values, using begin/end iterators.
template<class InputIter>
inline label erase(InputIter begIter, InputIter endIter);
//- Remove existing indices from the edge and set locations to '-1'.
// Returns the number of changes.
template<unsigned Size>
inline label eraseMany(const FixedList<label, Size>& list);
inline label erase(std::initializer_list<label> list);
//- Remove existing indices from the edge and set locations to '-1'.
// Returns the number of changes.
inline label eraseMany(const labelUList& list);
template<unsigned Size>
inline label erase(const FixedList<label, Size>& list);
//- Remove existing indices from the edge and set locations to '-1'.
// Returns the number of changes.
inline label erase(const labelUList& list);
// Geometric functions

View File

@ -300,13 +300,13 @@ inline Foam::label Foam::edge::insert(std::initializer_list<label> list)
template<unsigned Size>
inline Foam::label Foam::edge::insertMany(const FixedList<label, Size>& list)
inline Foam::label Foam::edge::insert(const FixedList<label, Size>& list)
{
return insert(list.begin(), list.end());
}
inline Foam::label Foam::edge::insertMany(const labelUList& list)
inline Foam::label Foam::edge::insert(const labelUList& list)
{
return insert(list.begin(), list.end());
}
@ -366,13 +366,13 @@ inline Foam::label Foam::edge::erase(std::initializer_list<label> list)
template<unsigned Size>
inline Foam::label Foam::edge::eraseMany(const FixedList<label, Size>& list)
inline Foam::label Foam::edge::erase(const FixedList<label, Size>& list)
{
return erase(list.begin(), list.end());
}
inline Foam::label Foam::edge::eraseMany(const labelUList& list)
inline Foam::label Foam::edge::erase(const labelUList& list)
{
return erase(list.begin(), list.end());
}

View File

@ -784,7 +784,7 @@ Foam::labelHashSet Foam::polyBoundaryMesh::patchSet
// Treat the given patch names as wild-cards and search the set
// of all patch names for matches
labelList patchIDs = findStrings(patchName, allPatchNames);
ids.insertMany(patchIDs);
ids.insert(patchIDs);
if (patchIDs.empty())
{
@ -799,7 +799,7 @@ Foam::labelHashSet Foam::polyBoundaryMesh::patchSet
{
const word& name = allGroupNames[groupIDs[i]];
const labelList& extraPatchIDs = groupPatchIDs()[name];
ids.insertMany(extraPatchIDs);
ids.insert(extraPatchIDs);
}
if (groupIDs.empty() && warnNotFound)

View File

@ -445,7 +445,7 @@ Foam::bitSet Foam::ZoneMesh<ZoneType, MeshType>::findMatching
const labelList indices = this->findIndices(key);
forAll(indices, i)
{
bitset.setMany
bitset.set
(
static_cast<const labelList&>(this->operator[](indices[i]))
);

View File

@ -74,7 +74,7 @@ const Foam::labelList& Foam::primitiveMesh::cellPoints
for (const label facei : cFaces)
{
set.insertMany(fcs[facei]);
set.insert(fcs[facei]);
}
storage.clear();

View File

@ -643,7 +643,7 @@ const Foam::labelList& Foam::primitiveMesh::cellEdges
for (const label facei : cFaces)
{
set.insertMany(faceEdges(facei));
set.insert(faceEdges(facei));
}
storage.clear();

View File

@ -165,7 +165,7 @@ void Foam::vtk::vtuSizing::reset
const face& f = mesh.faces()[facei];
nFaceLabels_ += f.size();
hashUniqId.insertMany(f);
hashUniqId.insert(f);
}
// Legacy format only uses the face-stream.

View File

@ -545,7 +545,7 @@ void Foam::vtk::vtuSizing::populateArrays
const face& f = mesh.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
hashUniqId.insertMany(f);
hashUniqId.insert(f);
// number of labels for this face
faceOutput[faceIndexer++] = f.size();

View File

@ -329,7 +329,7 @@ void Foam::attachDetach::detachInterface
{ // Protection and memory management
// Make a map of master cells for quick reject
labelHashSet mcMap(2*mc.size());
mcMap.insertMany(mc);
mcMap.insert(mc);
// Go through all the faces in the masterCellFaceMap. If the
// cells around them are not already used, add all of their
@ -345,7 +345,7 @@ void Foam::attachDetach::detachInterface
{
// Cell not found. Add its faces to the map
const cell& curFaces = cells[ownCell];
masterCellFaceMap.insertMany(curFaces);
masterCellFaceMap.insert(curFaces);
}
// Do the neighbour side if face is internal
@ -357,7 +357,7 @@ void Foam::attachDetach::detachInterface
{
// Cell not found. Add its faces to the map
const cell& curFaces = cells[neiCell];
masterCellFaceMap.insertMany(curFaces);
masterCellFaceMap.insert(curFaces);
}
}
}

View File

@ -228,7 +228,7 @@ Foam::wordList Foam::fvMeshDistribute::mergeWordList(const wordList& procNames)
wordHashSet mergedNames;
forAll(allNames, proci)
{
mergedNames.insertMany(allNames[proci]);
mergedNames.insert(allNames[proci]);
}
return mergedNames.toc();
}

View File

@ -99,7 +99,7 @@ Foam::labelHashSet Foam::motionSmootherAlgo::getPoints
for (const label faceId : faceLabels)
{
usedPoints.insertMany(mesh_.faces()[faceId]);
usedPoints.insert(mesh_.faces()[faceId]);
}
return usedPoints;
@ -115,7 +115,7 @@ Foam::labelHashSet Foam::motionSmootherAlgo::getPoints
for (const label faceId : faceLabels)
{
usedPoints.insertMany(mesh_.faces()[faceId]);
usedPoints.insert(mesh_.faces()[faceId]);
}
return usedPoints;
@ -328,7 +328,7 @@ void Foam::motionSmootherAlgo::getAffectedFacesAndPoints
{
const cell& cFaces = mesh_.cells()[pCells[pCelli]];
nbrFaces.insertMany(cFaces);
nbrFaces.insert(cFaces);
}
}
nbrFaces.sync(mesh_);
@ -338,7 +338,7 @@ void Foam::motionSmootherAlgo::getAffectedFacesAndPoints
for (const label facei : nbrFaces)
{
const face& f = mesh_.faces()[facei];
isAffectedPoint.setMany(f);
isAffectedPoint.set(f);
}
}
}
@ -944,14 +944,14 @@ bool Foam::motionSmootherAlgo::scaleMesh
const label own = mesh_.faceOwner()[facei];
const cell& ownFaces = mesh_.cells()[own];
newWrongFaces.insertMany(ownFaces);
newWrongFaces.insert(ownFaces);
if (facei < mesh_.nInternalFaces())
{
const label nei = mesh_.faceNeighbour()[facei];
const cell& neiFaces = mesh_.cells()[nei];
newWrongFaces.insertMany(neiFaces);
newWrongFaces.insert(neiFaces);
}
}
wrongFaces.transfer(newWrongFaces);

View File

@ -262,7 +262,7 @@ void Foam::perfectInterface::setRefinement
{
const labelList& pFaces = mesh.pointFaces()[meshPointi];
affectedFaces.insertMany(pFaces);
affectedFaces.insert(pFaces);
}
}
forAll(pp1, i)

View File

@ -97,7 +97,7 @@ Foam::label Foam::edgeCollapser::checkMeshQuality
{
const face& f = mesh.faces()[facei];
isErrorPoint.setMany(f);
isErrorPoint.set(f);
}
syncTools::syncPointList
@ -222,7 +222,7 @@ void Foam::edgeCollapser::collapseToEdge
labelList faceEdgesNeg = edgesFromPoints(facei, facePtsNeg);
collapseEdge.setMany(faceEdgesNeg);
collapseEdge.set(faceEdgesNeg);
forAll(facePtsNeg, pI)
{
@ -266,7 +266,7 @@ void Foam::edgeCollapser::collapseToEdge
labelList faceEdgesPos = edgesFromPoints(facei, facePtsPos);
collapseEdge.setMany(faceEdgesPos);
collapseEdge.set(faceEdgesPos);
forAll(facePtsPos, pI)
{
@ -364,7 +364,7 @@ void Foam::edgeCollapser::collapseToPoint
const labelList& faceEdges = mesh_.faceEdges()[facei];
collapseEdge.setMany(faceEdges);
collapseEdge.set(faceEdges);
forAll(f, pI)
{
@ -1511,7 +1511,7 @@ bool Foam::edgeCollapser::setRefinement
else
{
// Kept face. Mark vertices
usedPoint.setMany(f);
usedPoint.set(f);
}
}

View File

@ -3764,7 +3764,7 @@ Foam::labelListList Foam::hexRef8::setRefinement
{
const cell& cFaces = mesh_.cells()[celli];
affectedFace.setMany(cFaces);
affectedFace.set(cFaces);
}
}
@ -3782,7 +3782,7 @@ Foam::labelListList Foam::hexRef8::setRefinement
{
const labelList& eFaces = mesh_.edgeFaces(edgeI);
affectedFace.setMany(eFaces);
affectedFace.set(eFaces);
}
}
}
@ -5309,7 +5309,7 @@ Foam::labelList Foam::hexRef8::consistentUnrefinement
{
const labelList& pCells = mesh_.pointCells(pointi);
unrefineCell.setMany(pCells);
unrefineCell.set(pCells);
}
}
@ -5534,7 +5534,7 @@ void Foam::hexRef8::setUnrefinement
{
const labelList& pCells = mesh_.pointCells(splitPointLabels[i]);
cSet.insertMany(pCells);
cSet.insert(pCells);
}
cSet.write();
@ -5558,7 +5558,7 @@ void Foam::hexRef8::setUnrefinement
{
const labelList& pFaces = mesh_.pointFaces()[splitPointLabels[i]];
splitFaces.insertMany(pFaces);
splitFaces.insert(pFaces);
}
// Check with faceRemover what faces will get removed. Note that this

View File

@ -343,7 +343,7 @@ void Foam::removePoints::setRefinement
// Store faces affected
const labelList& pFaces = mesh_.pointFaces()[pointi];
facesAffected.insertMany(pFaces);
facesAffected.insert(pFaces);
}
}

View File

@ -186,7 +186,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
// edges
for (const label slaveEdgei : curSlaveEdges)
{
usedMasterEdges[slaveEdgei].insertMany(curMasterEdges);
usedMasterEdges[slaveEdgei].insert(curMasterEdges);
}
}
else if (slavePointEdgeHits[pointi] > -1)
@ -211,7 +211,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
{
const labelList& curMasterEdges = masterPointEdges[masterPointi];
usedMasterEdges[masterPointEdgeHits[masterPointi]].insertMany
usedMasterEdges[masterPointEdgeHits[masterPointi]].insert
(
curMasterEdges
);
@ -571,7 +571,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
// << masterPatch.localFaces()[facei]
// << endl;
curMasterEdgesMap.insertMany(masterFaceEdges[facei]);
curMasterEdgesMap.insert(masterFaceEdges[facei]);
}
const labelList curMasterEdges(curMasterEdgesMap.toc());

View File

@ -880,7 +880,7 @@ bool Foam::slidingInterface::projectPoints() const
for (const label facei : curFaceMap)
{
const face& f = masterLocalFaces[facei];
curPointMap.insertMany(f); // Insert all face points
curPointMap.insert(f); // Insert all face points
}
const labelList curMasterPoints = curPointMap.toc();

View File

@ -109,7 +109,7 @@ Foam::label Foam::ensightCase::checkTimeset(const labelHashSet& lookup) const
}
// OR
// tsTimes.unsetMany(timesUsed_.toc());
// tsTimes.unset(timesUsed_.toc());
if (tsTimes.empty())
{

View File

@ -1455,7 +1455,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const
procPatch.neighbPoints()[nonGlobalPatchPoints[pointI]];
labelHashSet faceSet;
faceSet.insertMany(pointFaces[curPoint]);
faceSet.insert(pointFaces[curPoint]);
labelList curFaces = faceSet.toc();

View File

@ -36,7 +36,7 @@ void Foam::functionObjects::fieldSelection::addRegistered
{
for (const wordRe& name : *this)
{
set.insertMany(obr_.names<Type>(name));
set.insert(obr_.names<Type>(name));
}
}

View File

@ -38,7 +38,7 @@ void Foam::functionObjects::fileFieldSelection::addFromFile
{
for (const wordRe& fieldName : *this)
{
set.insertMany(allFileObjects.names(Type::typeName, fieldName));
set.insert(allFileObjects.names(Type::typeName, fieldName));
}
}

View File

@ -336,7 +336,7 @@ void Foam::isoAdvection::timeIntegratedFlux()
// 1 - neighbours of neighbours
// 2 - ...
const labelList& nNeighbourCells = cellCells[otherCell];
checkBounding_.setMany(nNeighbourCells);
checkBounding_.set(nNeighbourCells);
}
else
{
@ -1040,7 +1040,7 @@ void Foam::isoAdvection::writeSurfaceCells() const
)
);
cSet.insertMany(surfCells_);
cSet.insert(surfCells_);
cSet.write();
}

View File

@ -242,7 +242,7 @@ void Foam::cellToCellStencil::unionEqOp::operator()
else
{
labelHashSet set(x);
set.insertMany(y);
set.insert(y);
x = set.toc();
}
}

View File

@ -243,7 +243,7 @@ void Foam::cellToFaceStencil::unionEqOp::operator()
else
{
labelHashSet set(x);
set.insertMany(y);
set.insert(y);
x = set.toc();
}
}
@ -382,11 +382,11 @@ void Foam::cellToFaceStencil::calcFaceStencil
const labelList& ownCCells = globalCellCells[own[facei]];
label globalOwn = ownCCells[0];
faceStencilSet.insertMany(ownCCells); // Insert cellCells
faceStencilSet.insert(ownCCells); // Insert cellCells
const labelList& neiCCells = globalCellCells[nei[facei]];
label globalNei = neiCCells[0];
faceStencilSet.insertMany(neiCCells); // Insert cellCells
faceStencilSet.insert(neiCCells); // Insert cellCells
// Guarantee owner first, neighbour second.
faceStencil[facei].setSize(faceStencilSet.size());
@ -416,13 +416,13 @@ void Foam::cellToFaceStencil::calcFaceStencil
const labelList& ownCCells = globalCellCells[own[facei]];
label globalOwn = ownCCells[0];
faceStencilSet.insertMany(ownCCells);
faceStencilSet.insert(ownCCells);
// And the neighbours of the coupled cell
const labelList& neiCCells =
neiGlobalCellCells[facei-mesh_.nInternalFaces()];
label globalNei = neiCCells[0];
faceStencilSet.insertMany(neiCCells);
faceStencilSet.insert(neiCCells);
// Guarantee owner first, neighbour second.
faceStencil[facei].setSize(faceStencilSet.size());
@ -452,7 +452,7 @@ void Foam::cellToFaceStencil::calcFaceStencil
const labelList& ownCCells = globalCellCells[own[facei]];
label globalOwn = ownCCells[0];
faceStencilSet.insertMany(ownCCells);
faceStencilSet.insert(ownCCells);
// Guarantee owner first
faceStencil[facei].setSize(faceStencilSet.size());

View File

@ -146,7 +146,7 @@ bool Foam::functionObjects::turbulenceFields::read(const dictionary& dict)
}
else
{
fieldSet_.insertMany(wordList(dict.lookup("fields")));
fieldSet_.insert(wordList(dict.lookup("fields")));
}
Info<< type() << " " << name() << ": ";

View File

@ -92,7 +92,7 @@ Foam::ParticleErosion<CloudType>::ParticleErosion
<< endl;
}
uniqIds.insertMany(ids);
uniqIds.insert(ids);
}
patchIDs_ = uniqIds.sortedToc();

View File

@ -149,7 +149,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing
<< endl;
}
uniqIds.insertMany(ids);
uniqIds.insert(ids);
}
patchIDs_ = uniqIds.sortedToc();

View File

@ -1021,7 +1021,7 @@ Foam::label Foam::meshRefinement::splitFacesUndo
{
const labelList grownFaces(growFaceCellFace(errorFaces));
errorFaces.clear();
errorFaces.insertMany(grownFaces);
errorFaces.insert(grownFaces);
}

View File

@ -625,7 +625,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles
{
const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[faceI]];
baffledFacesSet.insertMany(ownFaces);
baffledFacesSet.insert(ownFaces);
}
}
// Pick up neighbour side of baffle (added faces)
@ -637,7 +637,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles
{
const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[faceI]];
baffledFacesSet.insertMany(ownFaces);
baffledFacesSet.insert(ownFaces);
}
}
baffledFacesSet.sync(mesh_);

View File

@ -225,13 +225,13 @@ Foam::label Foam::meshRefinement::mergePatchFaces
//
// const cell& ownFaces = cells[mesh_.faceOwner()[facei]];
//
// retestFaces.insertMany(ownFaces);
// retestFaces.insert(ownFaces);
//
// if (mesh_.isInternalFace(facei))
// {
// const cell& neiFaces = cells[mesh_.faceNeighbour()[facei]];
//
// retestFaces.insertMany(neiFaces);
// retestFaces.insert(neiFaces);
// }
// }
// updateMesh(map, retestFaces.toc());
@ -329,7 +329,7 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo
faceSet allSets(mesh_, "allFaceSets", allFaceSets.size());
forAll(allFaceSets, setI)
{
allSets.insertMany(allFaceSets[setI]);
allSets.insert(allFaceSets[setI]);
}
Pout<< "Writing all faces to be merged to set "
<< allSets.objectPath() << endl;

View File

@ -616,7 +616,7 @@ void Foam::snappyLayerDriver::handleNonManifolds
bitSet isCoupledEdge(mesh.nEdges());
const labelList& cpEdges = mesh.globalData().coupledPatchMeshEdges();
isCoupledEdge.setMany(cpEdges);
isCoupledEdge.set(cpEdges);
syncTools::syncEdgeList
(
@ -4663,7 +4663,7 @@ void Foam::snappyLayerDriver::doLayers
if (numLayers[mpi] > 0 || numLayers[spi])
{
isExtrudedZoneFace.setMany(fZone);
isExtrudedZoneFace.set(fZone);
}
}
}

View File

@ -150,13 +150,13 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
// {
// label own = mesh.faceOwner()[facei];
// const cell& ownFaces = mesh.cells()[own];
// newIsFront.setMany(ownFaces);
// newIsFront.set(ownFaces);
//
// if (mesh.isInternalFace(facei))
// {
// label nei = mesh.faceNeighbour()[facei];
// const cell& neiFaces = mesh.cells()[nei];
// newIsFront.setMany(neiFaces);
// newIsFront.set(neiFaces);
// }
// }
// }
@ -186,7 +186,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
if (!isFront[facei] && ownLevel != neiLevel)
{
const face& f = mesh.faces()[facei];
isMovingPoint.setMany(f);
isMovingPoint.set(f);
++nInterface;
}
@ -203,7 +203,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
if (!isFront[facei] && ownLevel != neiLevel)
{
const face& f = mesh.faces()[facei];
isMovingPoint.setMany(f);
isMovingPoint.set(f);
++nInterface;
}
@ -2265,7 +2265,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::snappySnapDriver::repatchToSurface
const label zoneSurfi = zonedSurfaces[i];
const faceZone& fZone = fZones[surfZones[zoneSurfi].faceZoneName()];
isZonedFace.setMany(fZone);
isZonedFace.set(fZone);
}
}

View File

@ -300,7 +300,7 @@ void Foam::cellClassification::markCells
// Mark faces of celli
const labelList& myFaces = mesh_.cells()[celli];
outsideFacesMap.insertMany(myFaces);
outsideFacesMap.insert(myFaces);
}
}

View File

@ -172,7 +172,7 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours
forAll(f, fp)
{
const labelList& pointNbs = patch.pointFaces()[f[fp]];
nbs.insertMany(pointNbs);
nbs.insert(pointNbs);
}
// Subtract ours.

View File

@ -1531,14 +1531,14 @@ void Foam::extendedEdgeMesh::autoMap
label pointI = pointMap[subPointI];
const labelList& pNormals = featurePointNormals()[pointI];
isSubNormal.setMany(pNormals);
isSubNormal.set(pNormals);
}
forAll(edgeMap, subEdgeI)
{
label edgeI = edgeMap[subEdgeI];
const labelList& eNormals = edgeNormals()[edgeI];
isSubNormal.setMany(eNormals);
isSubNormal.set(eNormals);
}
forAll(isSubNormal, normalI)

View File

@ -47,7 +47,7 @@ Foam::treeBoundBox Foam::treeDataFace::calcBb(const label facei) const
void Foam::treeDataFace::update()
{
isTreeFace_.setMany(faceLabels_);
isTreeFace_.set(faceLabels_);
if (cacheBb_)
{

View File

@ -301,7 +301,7 @@ void Foam::meshTools::writeOBJ
forAll(cellLabels, i)
{
const cell& cFaces = cells[cellLabels[i]];
usedFaces.insertMany(cFaces);
usedFaces.insert(cFaces);
}
writeOBJ(os, faces, points, usedFaces.toc());

View File

@ -33,13 +33,9 @@ License
namespace Foam
{
defineTypeNameAndDebug(normalToFace, 0);
addToRunTimeSelectionTable(topoSetSource, normalToFace, word);
addToRunTimeSelectionTable(topoSetSource, normalToFace, istream);
}
@ -160,7 +156,7 @@ void Foam::normalToFace::applyToSet
}
}
set.eraseMany(toBeRemoved);
set.erase(toBeRemoved);
}
}

View File

@ -384,7 +384,7 @@ Foam::labelHashSet Foam::triSurfaceTools::getCollapsedFaces
const labelList& myFaces = surf.edgeFaces()[edgeI];
labelHashSet facesToBeCollapsed(2*myFaces.size());
facesToBeCollapsed.insertMany(myFaces);
facesToBeCollapsed.insert(myFaces);
// From faces using v1 check if they share an edge with faces
// using v2.

View File

@ -162,7 +162,7 @@ void Foam::cellCellStencils::cellVolumeWeight::walkFront
<< " to " << fraction << endl;
}
allCellTypes[own] = INTERPOLATED;
newIsFront.setMany(mesh_.cells()[own]);
newIsFront.set(mesh_.cells()[own]);
}
}
if (mesh_.isInternalFace(faceI))
@ -182,7 +182,7 @@ void Foam::cellCellStencils::cellVolumeWeight::walkFront
}
allCellTypes[nei] = INTERPOLATED;
newIsFront.setMany(mesh_.cells()[nei]);
newIsFront.set(mesh_.cells()[nei]);
}
}
}

View File

@ -85,7 +85,7 @@ Foam::labelList Foam::structuredDecomp::decompose
labelHashSet patchCells(2*nFaces);
for (const label patchi : patchIDs)
{
patchCells.insertMany(pbm[patchi].faceCells());
patchCells.insert(pbm[patchi].faceCells());
}
// Subset the layer of cells next to the patch

View File

@ -160,7 +160,7 @@ Foam::labelList Foam::structuredRenumber::renumber
labelHashSet patchCells(2*nFaces);
for (const label patchId : patchIDs)
{
patchCells.insertMany(pbm[patchId].faceCells());
patchCells.insert(pbm[patchId].faceCells());
}
label nTotalSeeds = returnReduce(patchCells.size(), sumOp<label>());

View File

@ -177,17 +177,17 @@ Foam::label Foam::probes::prepare()
{
wordHashSet currentFields;
currentFields.insertMany(scalarFields_);
currentFields.insertMany(vectorFields_);
currentFields.insertMany(sphericalTensorFields_);
currentFields.insertMany(symmTensorFields_);
currentFields.insertMany(tensorFields_);
currentFields.insert(scalarFields_);
currentFields.insert(vectorFields_);
currentFields.insert(sphericalTensorFields_);
currentFields.insert(symmTensorFields_);
currentFields.insert(tensorFields_);
currentFields.insertMany(surfaceScalarFields_);
currentFields.insertMany(surfaceVectorFields_);
currentFields.insertMany(surfaceSphericalTensorFields_);
currentFields.insertMany(surfaceSymmTensorFields_);
currentFields.insertMany(surfaceTensorFields_);
currentFields.insert(surfaceScalarFields_);
currentFields.insert(surfaceVectorFields_);
currentFields.insert(surfaceSphericalTensorFields_);
currentFields.insert(surfaceSymmTensorFields_);
currentFields.insert(surfaceTensorFields_);
DebugInfo
<< "Probing fields: " << currentFields << nl

View File

@ -243,11 +243,11 @@ bool Foam::surfMeshSamplers::execute()
// The acceptable fields
wordHashSet acceptable(added);
acceptable.insertMany(acceptType<scalar>());
acceptable.insertMany(acceptType<vector>());
acceptable.insertMany(acceptType<sphericalTensor>());
acceptable.insertMany(acceptType<symmTensor>());
acceptable.insertMany(acceptType<tensor>());
acceptable.insert(acceptType<scalar>());
acceptable.insert(acceptType<vector>());
acceptable.insert(acceptType<sphericalTensor>());
acceptable.insert(acceptType<symmTensor>());
acceptable.insert(acceptType<tensor>());
const wordList fields = acceptable.sortedToc();
if (!fields.empty())

View File

@ -1572,7 +1572,7 @@ Foam::isoSurface::isoSurface
{
const face& f = mesh_.faces()[cpp.start()+i];
isBoundaryPoint.setMany(f);
isBoundaryPoint.set(f);
}
}
}
@ -1584,7 +1584,7 @@ Foam::isoSurface::isoSurface
{
const face& f = mesh_.faces()[pp.start()+i];
isBoundaryPoint.setMany(f);
isBoundaryPoint.set(f);
}
}
}

View File

@ -695,7 +695,7 @@ void Foam::isoSurfaceCell::calcSnappedPoint
{
const face& f = mesh_.faces()[facei++];
isBoundaryPoint.setMany(f);
isBoundaryPoint.set(f);
}
}
}

View File

@ -339,7 +339,7 @@ void Foam::triSurface::writeStats(Ostream& os) const
forAll(f, fp)
{
const label pointi = f[fp];
if (pointIsUsed.set(pointi, 1))
if (pointIsUsed.set(pointi))
{
bb.add(points()[pointi]);
++nPoints;

View File

@ -109,7 +109,7 @@ bool Foam::triSurface::stitchTriangles
{
for (const label pointi : f)
{
if (pointIsUsed.set(pointi, 1))
if (pointIsUsed.set(pointi))
{
++nPoints;
}