- use the dictionary 'get' methods instead of readScalar for
additional checking
Unchecked: readScalar(dict.lookup("key"));
Checked: dict.get<scalar>("key");
- In templated classes that also inherit from a dictionary, an additional
'template' keyword will be required. Eg,
this->coeffsDict().template get<scalar>("key");
For this common use case, the predefined getXXX shortcuts may be
useful. Eg,
this->coeffsDict().getScalar("key");
6 lines
194 B
C
6 lines
194 B
C
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
|
|
|
|
label nAlphaCorr(alphaControls.get<label>("nAlphaCorr"));
|
|
|
|
label nAlphaSubCycles(alphaControls.get<label>("nAlphaSubCycles"));
|