mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: avoid deprecated lookup methods
This commit is contained in:
committed by
Andrew Heather
parent
0ae939e8f8
commit
b5d775a691
@ -779,7 +779,7 @@ int main(int argc, char *argv[])
|
|||||||
const bool overwrite = args.found("overwrite");
|
const bool overwrite = args.found("overwrite");
|
||||||
const bool checkGeometry = args.found("checkGeometry");
|
const bool checkGeometry = args.found("checkGeometry");
|
||||||
const bool surfaceSimplify = args.found("surfaceSimplify");
|
const bool surfaceSimplify = args.found("surfaceSimplify");
|
||||||
const bool dryRun = args.optionFound("dry-run");
|
const bool dryRun = args.found("dry-run");
|
||||||
|
|
||||||
if (dryRun)
|
if (dryRun)
|
||||||
{
|
{
|
||||||
@ -788,7 +788,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "createNamedMesh.H"
|
#include "createNamedMesh.H"
|
||||||
Info<< "Read mesh in = "
|
Info<< "Read mesh in = "
|
||||||
<< runTime.cpuTimeIncrement() << " s" << endl;
|
<< runTime.cpuTimeIncrement() << " s" << endl;
|
||||||
|
|||||||
@ -303,26 +303,25 @@ bool Foam::distributedTriSurfaceMesh::read()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
procBb_[Pstream::myProcNo()] =
|
dict_.readEntry("bounds", procBb_[Pstream::myProcNo()]);
|
||||||
List<treeBoundBox>(dict_.lookup("bounds"));
|
|
||||||
Pstream::gatherList(procBb_);
|
Pstream::gatherList(procBb_);
|
||||||
Pstream::scatterList(procBb_);
|
Pstream::scatterList(procBb_);
|
||||||
|
|
||||||
// Wanted distribution type
|
// Wanted distribution type
|
||||||
distType_ = distributionTypeNames_.lookup("distributionType", dict_);
|
distType_ = distributionTypeNames_.get("distributionType", dict_);
|
||||||
|
|
||||||
// Merge distance
|
// Merge distance
|
||||||
mergeDist_ = readScalar(dict_.lookup("mergeDistance"));
|
dict_.readEntry("mergeDistance", mergeDist_);
|
||||||
|
|
||||||
// Distribution type
|
// Distribution type
|
||||||
surfaceClosed_ = dict_.lookupOrDefault<bool>("closed", false);
|
surfaceClosed_ = dict_.getOrDefault<bool>("closed", false);
|
||||||
|
|
||||||
outsideVolType_ = volumeType::UNKNOWN;
|
outsideVolType_ = volumeType::names.getOrDefault
|
||||||
word volType;
|
(
|
||||||
if (dict_.readIfPresent<word>("outsideVolumeType", volType))
|
"outsideVolumeType",
|
||||||
{
|
dict_,
|
||||||
outsideVolType_ = volumeType::names[volType];
|
volumeType::UNKNOWN
|
||||||
}
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -2669,7 +2668,7 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
|
|||||||
// Optionally override settings from provided dictionary
|
// Optionally override settings from provided dictionary
|
||||||
{
|
{
|
||||||
// Wanted distribution type
|
// Wanted distribution type
|
||||||
distType_ = distributionTypeNames_.lookupOrDefault
|
distributionTypeNames_.readIfPresent
|
||||||
(
|
(
|
||||||
"distributionType",
|
"distributionType",
|
||||||
dict_,
|
dict_,
|
||||||
@ -2686,7 +2685,7 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh
|
|||||||
surfaceClosed_ = closed;
|
surfaceClosed_ = closed;
|
||||||
}
|
}
|
||||||
|
|
||||||
outsideVolType_ = volumeType::names.lookupOrDefault
|
outsideVolType_ = volumeType::names.getOrDefault
|
||||||
(
|
(
|
||||||
"outsideVolumeType",
|
"outsideVolumeType",
|
||||||
dict_,
|
dict_,
|
||||||
|
|||||||
@ -117,7 +117,7 @@ Foam::waveMakerPointPatchVectorField::waveMakerPointPatchVectorField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValuePointPatchField<vector>(p, iF, dict, false),
|
fixedValuePointPatchField<vector>(p, iF, dict, false),
|
||||||
motionType_(motionTypeNames.lookup("motionType", dict)),
|
motionType_(motionTypeNames.get("motionType", dict)),
|
||||||
n_(dict.get<vector>("n")),
|
n_(dict.get<vector>("n")),
|
||||||
gHat_(Zero),
|
gHat_(Zero),
|
||||||
initialDepth_(dict.get<scalar>("initialDepth")),
|
initialDepth_(dict.get<scalar>("initialDepth")),
|
||||||
|
|||||||
Reference in New Issue
Block a user