Skip to content

Commit

Permalink
snappyHexMesh: the addLayersControls sub-dictionary in snappyHexMeshD…
Browse files Browse the repository at this point in the history
…ict is now optional

If

addLayers       off;

then

addLayersControls
{
.
.
.
}

need not be present in the snappyHexMeshDict.
  • Loading branch information
Henry Weller committed Feb 25, 2022
1 parent 93be3fc commit d87a939
Showing 1 changed file with 7 additions and 11 deletions.
Expand Up @@ -733,9 +733,6 @@ int main(int argc, char *argv[])
// snap-to-surface parameters
const dictionary& snapDict = meshDict.subDict("snapControls");

// layer addition parameters
const dictionary& layerDict = meshDict.subDict("addLayersControls");

// absolute merge distance
const scalar mergeDist = getMergeDistance
(
Expand Down Expand Up @@ -1223,10 +1220,6 @@ int main(int argc, char *argv[])
// Snap parameters
const snapParameters snapParams(snapDict);

// Layer addition parameters
const layerParameters layerParams(layerDict, mesh.boundaryMesh());


if (wantRefine)
{
cpuTime timer;
Expand All @@ -1240,13 +1233,11 @@ int main(int argc, char *argv[])
globalToSlavePatch
);


if (!overwrite && !debugLevel)
{
const_cast<Time&>(mesh.time())++;
}


refineDriver.doRefine
(
refineDict,
Expand All @@ -1256,7 +1247,6 @@ int main(int argc, char *argv[])
motionDict
);


if (!keepPatches && !wantSnap && !wantLayers)
{
removeZeroSizedPatches(mesh);
Expand Down Expand Up @@ -1324,6 +1314,12 @@ int main(int argc, char *argv[])
{
cpuTime timer;

// Layer addition parameters dictionary
const dictionary& layersDict = meshDict.subDict("addLayersControls");

// Layer addition parameters
const layerParameters layerParams(layersDict, mesh.boundaryMesh());

snappyLayerDriver layerDriver
(
meshRefiner,
Expand All @@ -1346,7 +1342,7 @@ int main(int argc, char *argv[])

layerDriver.doLayers
(
layerDict,
layersDict,
motionDict,
layerParams,
preBalance,
Expand Down

0 comments on commit d87a939

Please sign in to comment.