Commit b5d775a6 authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

STYLE: avoid deprecated lookup methods

parent 0ae939e8
......@@ -779,7 +779,7 @@ int main(int argc, char *argv[])
const bool overwrite = args.found("overwrite");
const bool checkGeometry = args.found("checkGeometry");
const bool surfaceSimplify = args.found("surfaceSimplify");
const bool dryRun = args.optionFound("dry-run");
const bool dryRun = args.found("dry-run");
if (dryRun)
{
......@@ -788,7 +788,6 @@ int main(int argc, char *argv[])
}
#include "createNamedMesh.H"
Info<< "Read mesh in = "
<< runTime.cpuTimeIncrement() << " s" << endl;
......
......@@ -303,26 +303,25 @@ bool Foam::distributedTriSurfaceMesh::read()
}
else
{
procBb_[Pstream::myProcNo()] =
List<treeBoundBox>(dict_.lookup("bounds"));
dict_.readEntry("bounds", procBb_[Pstream::myProcNo()]);
Pstream::gatherList(procBb_);
Pstream::scatterList(procBb_);
// Wanted distribution type
distType_ = distributionTypeNames_.lookup("distributionType", dict_);
distType_ = distributionTypeNames_.get("distributionType", dict_);
// Merge distance
mergeDist_ = readScalar(dict_.lookup("mergeDistance"));
dict_.readEntry("mergeDistance", mergeDist_);
// Distribution type
surfaceClosed_ = dict_.lookupOrDefault<bool>("closed", false);
surfaceClosed_ = dict_.getOrDefault<bool>("closed", false);
outsideVolType_ = volumeType::UNKNOWN;
word volType;
if (dict_.readIfPresent<word>("outsideVolumeType", volType))
{
outsideVolType_ = volumeType::names[volType];
}
outsideVolType_ = volumeType::names.getOrDefault
(
"outsideVolumeType",
dict_,
volumeType::UNKNOWN
);
}
return true;
......@@ -2669,7 +2668,7 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
// Optionally override settings from provided dictionary
{
// Wanted distribution type
distType_ = distributionTypeNames_.lookupOrDefault
distributionTypeNames_.readIfPresent
(
"distributionType",
dict_,
......@@ -2686,7 +2685,7 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
surfaceClosed_ = closed;
}
outsideVolType_ = volumeType::names.lookupOrDefault
outsideVolType_ = volumeType::names.getOrDefault
(
"outsideVolumeType",
dict_,
......
......@@ -117,7 +117,7 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
)
:
fixedValuePointPatchField<vector>(p, iF, dict, false),
motionType_(motionTypeNames.lookup("motionType", dict)),
motionType_(motionTypeNames.get("motionType", dict)),
n_(dict.get<vector>("n")),
gHat_(Zero),
initialDepth_(dict.get<scalar>("initialDepth")),
......
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