mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: have -noSync option to prevent topoSet/setSet automatically syncing coupled faces.
This commit is contained in:
@ -439,6 +439,7 @@ bool doCommand
|
|||||||
const word& actionName,
|
const word& actionName,
|
||||||
const bool writeVTKFile,
|
const bool writeVTKFile,
|
||||||
const bool writeCurrentTime,
|
const bool writeCurrentTime,
|
||||||
|
const bool noSync,
|
||||||
Istream& is
|
Istream& is
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -581,7 +582,7 @@ bool doCommand
|
|||||||
// Set will have been modified.
|
// Set will have been modified.
|
||||||
|
|
||||||
// Synchronize for coupled patches.
|
// Synchronize for coupled patches.
|
||||||
currentSet.sync(mesh);
|
if (!noSync) currentSet.sync(mesh);
|
||||||
|
|
||||||
// Write
|
// Write
|
||||||
if (writeVTKFile)
|
if (writeVTKFile)
|
||||||
@ -834,6 +835,11 @@ int main(int argc, char *argv[])
|
|||||||
"file",
|
"file",
|
||||||
"process in batch mode, using input from specified file"
|
"process in batch mode, using input from specified file"
|
||||||
);
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noSync",
|
||||||
|
"do not synchronise selection across coupled patches"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -842,6 +848,7 @@ int main(int argc, char *argv[])
|
|||||||
const bool writeVTK = !args.optionFound("noVTK");
|
const bool writeVTK = !args.optionFound("noVTK");
|
||||||
const bool loop = args.optionFound("loop");
|
const bool loop = args.optionFound("loop");
|
||||||
const bool batch = args.optionFound("batch");
|
const bool batch = args.optionFound("batch");
|
||||||
|
const bool noSync = args.optionFound("noSync");
|
||||||
|
|
||||||
if (loop && !batch)
|
if (loop && !batch)
|
||||||
{
|
{
|
||||||
@ -1008,7 +1015,8 @@ int main(int argc, char *argv[])
|
|||||||
setName,
|
setName,
|
||||||
actionName,
|
actionName,
|
||||||
writeVTK,
|
writeVTK,
|
||||||
loop, // if in looping mode dump sets to time directory
|
loop, // if in looping mode dump sets to time directory
|
||||||
|
noSync,
|
||||||
is
|
is
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -49,11 +49,18 @@ int main(int argc, char *argv[])
|
|||||||
"specify an alternative dictionary for the topoSet dictionary"
|
"specify an alternative dictionary for the topoSet dictionary"
|
||||||
);
|
);
|
||||||
# include "addRegionOption.H"
|
# include "addRegionOption.H"
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"noSync",
|
||||||
|
"do not synchronise selection across coupled patches"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createNamedPolyMesh.H"
|
# include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
|
const bool noSync = args.optionFound("noSync");
|
||||||
|
|
||||||
const word dictName("topoSetDict");
|
const word dictName("topoSetDict");
|
||||||
|
|
||||||
fileName dictPath = dictName;
|
fileName dictPath = dictName;
|
||||||
@ -152,7 +159,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
source().applyToSet(action, currentSet());
|
source().applyToSet(action, currentSet());
|
||||||
// Synchronize for coupled patches.
|
// Synchronize for coupled patches.
|
||||||
currentSet().sync(mesh);
|
if (!noSync) currentSet().sync(mesh);
|
||||||
currentSet().write();
|
currentSet().write();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -186,7 +193,7 @@ int main(int argc, char *argv[])
|
|||||||
// Combine new value of currentSet with old one.
|
// Combine new value of currentSet with old one.
|
||||||
currentSet().subset(oldSet());
|
currentSet().subset(oldSet());
|
||||||
// Synchronize for coupled patches.
|
// Synchronize for coupled patches.
|
||||||
currentSet().sync(mesh);
|
if (!noSync) currentSet().sync(mesh);
|
||||||
currentSet().write();
|
currentSet().write();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user