Fix: Correct REMOVE option for setSet utility
This commit is contained in:
parent
ac941215d5
commit
1344797239
1 changed files with 11 additions and 7 deletions
|
@ -325,7 +325,7 @@ void printAllSets(const polyMesh& mesh, Ostream& os)
|
||||||
|
|
||||||
|
|
||||||
// Physically remove a set
|
// Physically remove a set
|
||||||
void removeSet
|
bool removeSet
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const word& setType,
|
const word& setType,
|
||||||
|
@ -346,7 +346,11 @@ void removeSet
|
||||||
fileName object = objects[setName]->objectPath();
|
fileName object = objects[setName]->objectPath();
|
||||||
Info<< "Removing file " << object << endl;
|
Info<< "Removing file " << object << endl;
|
||||||
rm(object);
|
rm(object);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -392,11 +396,7 @@ bool doCommand
|
||||||
|
|
||||||
IOobject::readOption r;
|
IOobject::readOption r;
|
||||||
|
|
||||||
if (action == topoSetSource::REMOVE)
|
if
|
||||||
{
|
|
||||||
removeSet(mesh, setType, setName);
|
|
||||||
}
|
|
||||||
else if
|
|
||||||
(
|
(
|
||||||
(action == topoSetSource::NEW)
|
(action == topoSetSource::NEW)
|
||||||
|| (action == topoSetSource::CLEAR)
|
|| (action == topoSetSource::CLEAR)
|
||||||
|
@ -414,7 +414,11 @@ bool doCommand
|
||||||
currentSet.resize(max(currentSet.size(), typSize));
|
currentSet.resize(max(currentSet.size(), typSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!currentSetPtr.valid())
|
if (action == topoSetSource::REMOVE)
|
||||||
|
{
|
||||||
|
ok = removeSet(mesh, setType, setName);
|
||||||
|
}
|
||||||
|
else if (!currentSetPtr.valid())
|
||||||
{
|
{
|
||||||
Info<< " Cannot construct/load set "
|
Info<< " Cannot construct/load set "
|
||||||
<< topoSet::localPath(mesh, setName) << endl;
|
<< topoSet::localPath(mesh, setName) << endl;
|
||||||
|
|
Reference in a new issue