ENH: createPatchDict: renamed dictionary entry

This commit is contained in:
mattijs
2013-12-11 17:16:40 +00:00
parent 644e9f3a48
commit 6f46553895
2 changed files with 20 additions and 19 deletions

View File

@ -83,6 +83,7 @@ label addPatch
pp.inGroups().append(groupName);
}
// Add patch, create calculated everywhere
fvMeshTools::addPatch
(
@ -636,19 +637,18 @@ int main(int argc, char *argv[])
// Note: This is added for the particular case where we want
// master and slave in different groupNames
// (ie 3D thermal baffles)
bool groupBase = false;
if (patchSource.found("groupBase"))
{
groupBase = readBool(patchSource.lookup("groupBase"));
if (groupBase)
Switch sameGroup
(
patchSource.lookupOrDefault("sameGroup", true)
);
if (!sameGroup)
{
groupNameMaster = groupName + "Group_master";
groupNameSlave = groupName + "Group_slave";
patchDictMaster.set("coupleGroup", groupNameMaster);
patchDictSlave.set("coupleGroup", groupNameSlave);
}
}
addPatch(mesh, masterName, groupNameMaster, patchDictMaster);
addPatch(mesh, slaveName, groupNameSlave, patchDictSlave);
@ -818,11 +818,11 @@ int main(int argc, char *argv[])
else
{
const dictionary& patchSource = dict.subDict("patchPairs");
bool groupBase = false;
if (patchSource.found("groupBase"))
{
groupBase = readBool(patchSource.lookup("groupBase"));
}
Switch sameGroup
(
patchSource.lookupOrDefault("sameGroup", true)
);
const word& groupName = selectors[selectorI].name();
@ -833,7 +833,7 @@ int main(int argc, char *argv[])
"patchFields"
);
if (!groupBase)
if (sameGroup)
{
// Add coupleGroup to all entries
forAllIter(dictionary, patchFieldsDict, iter)

View File

@ -52,8 +52,9 @@ baffles
{
type mappedWall;
sampleMode nearestPatchFace;
//Group master and slave in different groups. (default off)
groupBase on;
// Put master and slave patch in same group (default on)
// Otherwise makeup group names xxx_master and xxx_slave
sameGroup off;
patchFields
{
#include "./0/include/wallBafflePatches"