diff --git a/meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C b/meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C index ee39d5693eaf969ee9629638c5f7cde674151df6..b976e817526550b5378319a2e3efe44cc4e10e6b 100644 --- a/meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C +++ b/meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C @@ -63,7 +63,7 @@ void Foam::Module::cartesian2DMeshGenerator::createCartesianMesh() if ( - meshDict_.lookupOrDefault<bool> + meshDict_.getOrDefault<bool> ( "decomposePolyhedraIntoTetsAndPyrs", false diff --git a/meshLibrary/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C b/meshLibrary/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C index 32717bedc429e81b5c4cb1ef5d16fe815e1f37fc..675dbcde2affe40a6f7748809b3dfa612bfcfe50 100644 --- a/meshLibrary/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C +++ b/meshLibrary/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C @@ -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) { diff --git a/meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C b/meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C index d9bcfcd7316766ddcf08f784a8da34d274fd0dca..b2b5ebde700d6f19c1874455ef47da76eab37b89 100644 --- a/meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C +++ b/meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C @@ -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) diff --git a/meshLibrary/utilities/anisotropicMeshing/coordinateModification/boxScaling.C b/meshLibrary/utilities/anisotropicMeshing/coordinateModification/boxScaling.C index 44889f08f62f9afe42b3b01370f157b47df6b8c7..23222f6b4b1c04be6ded4e0dee77a9a2bd1b16a4 100644 --- a/meshLibrary/utilities/anisotropicMeshing/coordinateModification/boxScaling.C +++ b/meshLibrary/utilities/anisotropicMeshing/coordinateModification/boxScaling.C @@ -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(); } diff --git a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C index 0a28efbd2018e6ecb689d2db7d2dc29b7529a8a0..33272040bc64744350a2a782ffb321cf7f8c7439 100644 --- a/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C +++ b/meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C @@ -499,7 +499,7 @@ void Foam::Module::refineBoundaryLayers::readSettings if ( - patchDict.lookupOrDefault<bool> + patchDict.getOrDefault<bool> ( "allowDiscontinuity", false diff --git a/meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/boundaryPatchBase.C b/meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/boundaryPatchBase.C index a15447d381151d2e7b1c48d8dc5ed1f46d4bc2a6..d1818a267c30ee4aa3da3cbe18933179c9e17ad8 100644 --- a/meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/boundaryPatchBase.C +++ b/meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/boundaryPatchBase.C @@ -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")) {} diff --git a/meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/processorBoundaryPatch.C b/meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/processorBoundaryPatch.C index 961766376fcb92a038edaa79774be21d5242a2f2..d6bbeeecfb6872a7252863dc7345c5b013018dab 100644 --- a/meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/processorBoundaryPatch.C +++ b/meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/processorBoundaryPatch.C @@ -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")) {} diff --git a/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressing.C b/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressing.C index 75ca5fc9e82be8ae7b3dc5b2aa09c2798a8b7c5b..fff27187f5058aed28ec2f8624601a49d6a8c7b1 100644 --- a/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressing.C +++ b/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressing.C @@ -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; } diff --git a/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingCreation.C b/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingCreation.C index a0e54b729614b0415efcd23f8f51394eacc25833..c47939561bac5a288df9e6aeae9f4feaa9817494 100644 --- a/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingCreation.C +++ b/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingCreation.C @@ -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) diff --git a/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingGluedMesh.C b/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingGluedMesh.C index b28153bcdbab89e1eb0bbd59bea43937f9877df7..2cd4b0109d49c946122137d2660ede472664c59b 100644 --- a/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingGluedMesh.C +++ b/meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingGluedMesh.C @@ -41,7 +41,7 @@ void Foam::Module::meshOctreeAddressing::checkGluedRegions() if ( !useDATABoxes_ - || !meshDict_.lookupOrDefault<bool>("checkForGluedMesh", false) + || !meshDict_.getOrDefault<bool>("checkForGluedMesh", false) ) { return; diff --git a/meshLibrary/utilities/octrees/meshOctree/meshOctreeAutomaticRefinement/meshOctreeAutomaticRefinement.C b/meshLibrary/utilities/octrees/meshOctree/meshOctreeAutomaticRefinement/meshOctreeAutomaticRefinement.C index bc928e9ca51e34b2de80e5d6c4739411d0fac7fe..3c92da69a3f806fe632df11a22b46bd8f97da11b 100644 --- a/meshLibrary/utilities/octrees/meshOctree/meshOctreeAutomaticRefinement/meshOctreeAutomaticRefinement.C +++ b/meshLibrary/utilities/octrees/meshOctree/meshOctreeAutomaticRefinement/meshOctreeAutomaticRefinement.C @@ -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 diff --git a/meshLibrary/voronoiMesh/voronoiMeshGenerator/voronoiMeshGenerator.C b/meshLibrary/voronoiMesh/voronoiMeshGenerator/voronoiMeshGenerator.C index 32278f793112addc5821b88ff2c140256675ab3f..d684b78ded9d188a7793467aa60a22347f8e0f2c 100644 --- a/meshLibrary/voronoiMesh/voronoiMeshGenerator/voronoiMeshGenerator.C +++ b/meshLibrary/voronoiMesh/voronoiMeshGenerator/voronoiMeshGenerator.C @@ -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) {