Skip to content
Commits on Source (1)
......@@ -63,7 +63,7 @@ void Foam::Module::cartesian2DMeshGenerator::createCartesianMesh()
if
(
meshDict_.lookupOrDefault<bool>
meshDict_.getOrDefault<bool>
(
"decomposePolyhedraIntoTetsAndPyrs",
false
......
......@@ -64,7 +64,7 @@ void Foam::Module::cartesianMeshGenerator::createCartesianMesh()
if
(
meshDict_.lookupOrDefault<bool>
meshDict_.getOrDefault<bool>
(
"decomposePolyhedraIntoTetsAndPyrs",
false
......@@ -177,11 +177,7 @@ void Foam::Module::cartesianMeshGenerator::optimiseFinalMesh()
{
// untangle the surface if needed
const bool enforceConstraints =
meshDict_.lookupOrDefault<bool>
(
"enforceGeometryConstraints",
false
);
meshDict_.getOrDefault<bool>("enforceGeometryConstraints", false);
if (true)
{
......
......@@ -149,11 +149,7 @@ void Foam::Module::tetMeshGenerator::optimiseFinalMesh()
{
// final optimisation
const bool enforceConstraints =
meshDict_.lookupOrDefault<bool>
(
"enforceGeometryConstraints",
false
);
meshDict_.getOrDefault<bool>("enforceGeometryConstraints", false);
meshOptimizer optimizer(mesh_);
if (enforceConstraints)
......
......@@ -301,9 +301,9 @@ void Foam::Module::boxScaling::operator=(const dictionary& d)
lengthVec_.z() = 0.0;
}
scaleVec_.x() = dict.lookupOrDefault<scalar>("scaleX", 1.0);
scaleVec_.y() = dict.lookupOrDefault<scalar>("scaleY", 1.0);
scaleVec_.z() = dict.lookupOrDefault<scalar>("scaleZ", 1.0);
scaleVec_.x() = dict.getOrDefault<scalar>("scaleX", 1.0);
scaleVec_.y() = dict.getOrDefault<scalar>("scaleY", 1.0);
scaleVec_.z() = dict.getOrDefault<scalar>("scaleZ", 1.0);
calculateBndBox();
}
......
......@@ -499,7 +499,7 @@ void Foam::Module::refineBoundaryLayers::readSettings
if
(
patchDict.lookupOrDefault<bool>
patchDict.getOrDefault<bool>
(
"allowDiscontinuity",
false
......
......@@ -63,7 +63,7 @@ Foam::Module::boundaryPatchBase::New
const dictionary& dict
)
{
word type(dict.lookup("type"));
word type(dict.get<word>("type"));
// Check patch type - allowed types are processor and patch
// Other patch types are treated as ordinary patches
......@@ -125,9 +125,9 @@ Foam::Module::boundaryPatchBase::boundaryPatchBase
)
:
name_(name),
type_(dict.lookup("type")),
nFaces_(readLabel(dict.lookup("nFaces"))),
startFace_(readLabel(dict.lookup("startFace")))
type_(dict.get<word>("type")),
nFaces_(dict.get<label>("nFaces")),
startFace_(dict.get<label>("startFace"))
{}
......
......@@ -79,8 +79,8 @@ Foam::Module::processorBoundaryPatch::processorBoundaryPatch
)
:
boundaryPatchBase(name, dict),
myProcNo_(readLabel(dict.lookup("myProcNo"))),
neighbProcNo_(readLabel(dict.lookup("neighbProcNo")))
myProcNo_(dict.get<label>("myProcNo")),
neighbProcNo_(dict.get<label>("neighbProcNo"))
{}
......
......@@ -142,12 +142,12 @@ Foam::Module::meshOctreeAddressing::meshOctreeAddressing
globalLeafToLocalPtr_(nullptr),
leafAtProcsPtr_(nullptr)
{
if (!useDATABoxes && dict.found("keepCellsIntersectingBoundary"))
if (!useDATABoxes_)
{
useDATABoxes_ = readBool(dict.lookup("keepCellsIntersectingBoundary"));
dict.readIfPresent("keepCellsIntersectingBoundary", useDATABoxes_);
}
if (dict.lookupOrDefault<bool>("nonManifoldMeshing", false))
if (dict.getOrDefault<bool>("nonManifoldMeshing", false))
{
useDATABoxes_ = true;
}
......
......@@ -520,7 +520,7 @@ void Foam::Module::meshOctreeAddressing::findUsedBoxes() const
boxType[leafI] |= MESHCELL;
}
if (meshDict_.lookupOrDefault<bool>("nonManifoldMeshing", false))
if (meshDict_.getOrDefault<bool>("nonManifoldMeshing", false))
{
# ifdef USE_OMP
# pragma omp parallel for schedule(dynamic, 40)
......
......@@ -41,7 +41,7 @@ void Foam::Module::meshOctreeAddressing::checkGluedRegions()
if
(
!useDATABoxes_
|| !meshDict_.lookupOrDefault<bool>("checkForGluedMesh", false)
|| !meshDict_.getOrDefault<bool>("checkForGluedMesh", false)
)
{
return;
......
......@@ -180,9 +180,9 @@ Foam::Module::meshOctreeAutomaticRefinement::meshOctreeAutomaticRefinement
curvaturePtr_(nullptr),
maxRefLevel_(0)
{
if (!useDATABoxes_ && dict.found("keepCellsIntersectingBoundary"))
if (!useDATABoxes_)
{
useDATABoxes_ = readBool(dict.lookup("keepCellsIntersectingBoundary"));
dict.readIfPresent("keepCellsIntersectingBoundary", useDATABoxes_);
}
// calculate maximum allowed refinement level from the minimum cell size
......
......@@ -208,11 +208,7 @@ void Foam::Module::voronoiMeshGenerator::optimiseFinalMesh()
{
// untangle the surface if needed
const bool enforceConstraints =
meshDict_.lookupOrDefault<bool>
(
"enforceGeometryConstraints",
false
);
meshDict_.getOrDefault<bool>("enforceGeometryConstraints", false);
if (true)
{
......