Commit b329ea6f authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Added convenience function to access film solution dict

parent ff916073
...@@ -59,12 +59,10 @@ bool Foam::surfaceFilmModels::kinematicSingleLayer::read() ...@@ -59,12 +59,10 @@ bool Foam::surfaceFilmModels::kinematicSingleLayer::read()
{ {
if (surfaceFilmModel::read()) if (surfaceFilmModel::read())
{ {
const dictionary& solution = solution().lookup("momentumPredictor") >> momentumPredictor_;
filmRegion_.solutionDict().subDict("PISO"); solution().lookup("nOuterCorr") >> nOuterCorr_;
solution.lookup("momentumPredictor") >> momentumPredictor_; solution().lookup("nCorr") >> nCorr_;
solution.lookup("nOuterCorr") >> nOuterCorr_; solution().lookup("nNonOrthCorr") >> nNonOrthCorr_;
solution.lookup("nCorr") >> nCorr_;
solution.lookup("nNonOrthCorr") >> nNonOrthCorr_;
coeffs_.lookup("Cf") >> Cf_; coeffs_.lookup("Cf") >> Cf_;
...@@ -579,7 +577,7 @@ Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer ...@@ -579,7 +577,7 @@ Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer
time_.timeName(), time_.timeName(),
filmRegion_, filmRegion_,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::AUTO_WRITE
), ),
filmRegion_, filmRegion_,
dimensionedVector("zero", dimless, vector::zero), dimensionedVector("zero", dimless, vector::zero),
...@@ -593,7 +591,7 @@ Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer ...@@ -593,7 +591,7 @@ Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer
time_.timeName(), time_.timeName(),
filmRegion_, filmRegion_,
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE IOobject::AUTO_WRITE
), ),
filmRegion_, filmRegion_,
dimensionedScalar("zero", dimArea, 0.0), dimensionedScalar("zero", dimArea, 0.0),
...@@ -603,28 +601,10 @@ Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer ...@@ -603,28 +601,10 @@ Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer
filmTopPatchIDs_(0), filmTopPatchIDs_(0),
filmBottomPatchIDs_(0), filmBottomPatchIDs_(0),
momentumPredictor_ momentumPredictor_(solution().lookup("momentumPredictor")),
( nOuterCorr_(readLabel(solution().lookup("nOuterCorr"))),
filmRegion_.solutionDict().subDict("PISO").lookup("momentumPredictor") nCorr_(readLabel(solution().lookup("nCorr"))),
), nNonOrthCorr_(readLabel(solution().lookup("nNonOrthCorr"))),
nOuterCorr_
(
readLabel
(
filmRegion_.solutionDict().subDict("PISO").lookup("nOuterCorr")
)
),
nCorr_
(
readLabel(filmRegion_.solutionDict().subDict("PISO").lookup("nCorr"))
),
nNonOrthCorr_
(
readLabel
(
filmRegion_.solutionDict().subDict("PISO").lookup("nNonOrthCorr")
)
),
cumulativeContErr_(0.0), cumulativeContErr_(0.0),
Cf_(readScalar(coeffs_.lookup("Cf"))), Cf_(readScalar(coeffs_.lookup("Cf"))),
......
...@@ -343,6 +343,9 @@ public: ...@@ -343,6 +343,9 @@ public:
// Solution parameters // Solution parameters
//- Return the film region solution dictionary
inline const dictionary& solution() const;
//- Return the momentum predictor //- Return the momentum predictor
inline const Switch& momentumPredictor() const; inline const Switch& momentumPredictor() const;
......
...@@ -41,6 +41,13 @@ Foam::surfaceFilmModels::kinematicSingleLayer::magSf() const ...@@ -41,6 +41,13 @@ Foam::surfaceFilmModels::kinematicSingleLayer::magSf() const
} }
inline const Foam::dictionary&
Foam::surfaceFilmModels::kinematicSingleLayer::solution() const
{
return filmRegion_.solutionDict().subDict("PISO");
}
inline const Foam::Switch& inline const Foam::Switch&
Foam::surfaceFilmModels::kinematicSingleLayer::momentumPredictor() const Foam::surfaceFilmModels::kinematicSingleLayer::momentumPredictor() const
{ {
......
Supports Markdown
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