mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- 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");
This commit is contained in:
@ -633,8 +633,8 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells
|
||||
|
||||
if (checkCollapse)
|
||||
{
|
||||
minArea = readScalar(motionDict.lookup("minArea"));
|
||||
maxNonOrtho = readScalar(motionDict.lookup("maxNonOrtho"));
|
||||
motionDict.readEntry("minArea", minArea);
|
||||
motionDict.readEntry("maxNonOrtho", maxNonOrtho);
|
||||
|
||||
Info<< "markFacesOnProblemCells :"
|
||||
<< " Deleting all-anchor surface cells only if"
|
||||
@ -1205,7 +1205,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
|
||||
const labelList allFaces(identity(mesh_.nFaces()));
|
||||
label nWrongFaces = 0;
|
||||
|
||||
//const scalar minV(readScalar(motionDict.lookup("minVol", true)));
|
||||
//const scalar minV(motionDict.get<scalar>("minVol", true));
|
||||
//if (minV > -GREAT)
|
||||
//{
|
||||
// polyMeshGeometry::checkFacePyramids
|
||||
@ -1234,7 +1234,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
|
||||
// nWrongFaces = nNewWrongFaces;
|
||||
//}
|
||||
|
||||
scalar minArea(readScalar(motionDict.lookup("minArea")));
|
||||
scalar minArea(motionDict.get<scalar>("minArea"));
|
||||
if (minArea > -SMALL)
|
||||
{
|
||||
polyMeshGeometry::checkFaceArea
|
||||
@ -1261,7 +1261,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric
|
||||
nWrongFaces = nNewWrongFaces;
|
||||
}
|
||||
|
||||
scalar minDet(readScalar(motionDict.lookup("minDeterminant")));
|
||||
scalar minDet(motionDict.get<scalar>("minDeterminant"));
|
||||
if (minDet > -1)
|
||||
{
|
||||
polyMeshGeometry::checkCellDeterminant
|
||||
|
||||
Reference in New Issue
Block a user