mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: fvOptions - cache modelType so that derived classes can generate appropriate coeffs_ dict
This commit is contained in:
@ -255,6 +255,7 @@ Foam::fv::option::option
|
||||
)
|
||||
:
|
||||
name_(name),
|
||||
modelType_(modelType),
|
||||
mesh_(mesh),
|
||||
dict_(dict),
|
||||
coeffs_(dict.subDict(modelType + "Coeffs")),
|
||||
|
||||
@ -94,7 +94,10 @@ protected:
|
||||
// Protected data
|
||||
|
||||
//- Source name
|
||||
word name_;
|
||||
const word name_;
|
||||
|
||||
//- Model type
|
||||
const word modelType_;
|
||||
|
||||
//- Reference to the mesh database
|
||||
const fvMesh& mesh_;
|
||||
|
||||
@ -96,7 +96,7 @@ bool Foam::fv::option::read(const dictionary& dict)
|
||||
dict.lookup("duration") >> duration_;
|
||||
}
|
||||
|
||||
coeffs_ = dict.subDict(type() + "Coeffs");
|
||||
coeffs_ = dict.subDict(modelType_ + "Coeffs");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user