// checking for duplicates
std::set<label> controlPointSet;
auto ret = controlPointSet.insert(p);
if(ret2.second != true)
{
// p is a duplicate
}
// checking if already in other set
auto ret = boundaryPointSet.find(p);
if(ret != boundaryPointSet.end())
{
// p is in boundaryPointSet
}
// checking if alread in map
auto iter = interiorPatchPointGlobalLocalMap.find(i_global);
if(iter != interiorPatchPointGlobalLocalMap.end())
{
// the key i_global is in the map
// access the corresponding value:
label i_interior_local = iter->second;
...
}