mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
bug fix - previously exited after first command as error flag was used instead of ok flag in main while loop
This commit is contained in:
@ -405,20 +405,25 @@ bool doCommand
|
||||
backup(mesh, setName, currentSet, setName + "_old");
|
||||
}
|
||||
|
||||
if (action == topoSetSource::CLEAR)
|
||||
switch (action)
|
||||
{
|
||||
case topoSetSource::CLEAR:
|
||||
{
|
||||
// Already handled above by not reading
|
||||
break;
|
||||
}
|
||||
else if (action == topoSetSource::INVERT)
|
||||
case topoSetSource::INVERT:
|
||||
{
|
||||
currentSet.invert(currentSet.maxSize(mesh));
|
||||
break;
|
||||
}
|
||||
else if (action == topoSetSource::LIST)
|
||||
case topoSetSource::LIST:
|
||||
{
|
||||
currentSet.writeDebug(Pout, mesh, 100);
|
||||
Pout<< endl;
|
||||
break;
|
||||
}
|
||||
else if (action == topoSetSource::SUBSET)
|
||||
case topoSetSource::SUBSET:
|
||||
{
|
||||
if (is >> sourceType)
|
||||
{
|
||||
@ -447,8 +452,9 @@ bool doCommand
|
||||
// Combine new value of currentSet with old one.
|
||||
currentSet.subset(oldSet);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
default:
|
||||
{
|
||||
if (is >> sourceType)
|
||||
{
|
||||
@ -465,6 +471,7 @@ bool doCommand
|
||||
setSource().applyToSet(action, currentSet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (action != topoSetSource::LIST)
|
||||
@ -532,7 +539,7 @@ bool doCommand
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
return !error;
|
||||
}
|
||||
|
||||
|
||||
@ -612,32 +619,37 @@ commandStatus parseType
|
||||
switch(stat)
|
||||
{
|
||||
case polyMesh::UNCHANGED:
|
||||
{
|
||||
Pout<< " mesh not changed." << endl;
|
||||
break;
|
||||
|
||||
}
|
||||
case polyMesh::POINTS_MOVED:
|
||||
{
|
||||
Pout<< " points moved; topology unchanged." << endl;
|
||||
break;
|
||||
|
||||
}
|
||||
case polyMesh::TOPO_CHANGE:
|
||||
{
|
||||
Pout<< " topology changed; patches unchanged." << nl
|
||||
<< " ";
|
||||
printMesh(runTime, mesh);
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
case polyMesh::TOPO_PATCH_CHANGE:
|
||||
{
|
||||
Pout<< " topology changed and patches changed." << nl
|
||||
<< " ";
|
||||
printMesh(runTime, mesh);
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn("parseType") << "Illegal mesh update state "
|
||||
<< stat << abort(FatalError);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return INVALID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user