33 template<
class SetType>
34 void Foam::polyMeshFilter::updateSets(
const polyTopoChangeMap& map)
36 HashTable<const SetType*> sets =
37 map.mesh().objectRegistry::lookupClass<
const SetType>();
39 forAllIter(
typename HashTable<const SetType*>, sets, iter)
41 SetType& set =
const_cast<SetType&
>(*iter());
49 map.mesh().facesInstance(),
53 IOobjectList fileSets(Objects.lookupClass(SetType::typeName));
57 if (!sets.found(iter.key()))
69 template<
class SetType>
70 void Foam::polyMeshFilter::copySets
72 const polyMesh& oldMesh,
73 const polyMesh& newMesh
76 HashTable<const SetType*> sets =
77 oldMesh.objectRegistry::lookupClass<
const SetType>();
81 const SetType& set = *iter();
83 if (newMesh.objectRegistry::foundObject<SetType>(set.name()))
85 const SetType& origSet =
86 newMesh.objectRegistry::lookupObject<SetType>(set.name());
88 const_cast<SetType&
>(origSet) = set;
89 const_cast<SetType&
>(origSet).sync(newMesh);
95 new SetType(newMesh, set.name(), set, set.writeOpt())
99 newSet->sync(newMesh);
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.