Commit 8c8cf921 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: distributionModels - pass in construction dict instead of parent dict

parent 7d61b870
......@@ -69,7 +69,7 @@ Foam::distributionModels::distributionModel::distributionModel
cachedRandom& rndGen
)
:
distributionModelDict_(dict.subOrEmptyDict(name + "Distribution")),
distributionModelDict_(dict),
rndGen_(rndGen)
{}
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -50,7 +50,10 @@ Foam::distributionModels::distributionModel::New
<< exit(FatalError);
}
return autoPtr<distributionModel>(cstrIter()(dict, rndGen));
const dictionary distributionDict =
dict.subOrEmptyDict(modelType & "Distribution");
return autoPtr<distributionModel>(cstrIter()(distributionDict, rndGen));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment