Skip to content
GitLab
Explore
Sign in
Register
This is an archived project. Repository and other project resources are read-only.
Commits on Source (1)
STYLE: avoid deprecated dictionary methods
· c0af2297
Mark OLESEN
authored
Oct 19, 2023
c0af2297
Hide whitespace changes
Inline
Side-by-side
meshLibrary/cartesian2DMesh/cartesian2DMeshGenerator/cartesian2DMeshGenerator.C
View file @
c0af2297
...
...
@@ -63,7 +63,7 @@ void Foam::Module::cartesian2DMeshGenerator::createCartesianMesh()
if
(
meshDict_
.
lookup
OrDefault
<
bool
>
meshDict_
.
get
OrDefault
<
bool
>
(
"decomposePolyhedraIntoTetsAndPyrs"
,
false
...
...
meshLibrary/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C
View file @
c0af2297
...
...
@@ -64,7 +64,7 @@ void Foam::Module::cartesianMeshGenerator::createCartesianMesh()
if
(
meshDict_
.
lookup
OrDefault
<
bool
>
meshDict_
.
get
OrDefault
<
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
)
{
...
...
meshLibrary/tetMesh/tetMeshGenerator/tetMeshGenerator.C
View file @
c0af2297
...
...
@@ -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
)
...
...
meshLibrary/utilities/anisotropicMeshing/coordinateModification/boxScaling.C
View file @
c0af2297
...
...
@@ -301,9 +301,9 @@ void Foam::Module::boxScaling::operator=(const dictionary& d)
lengthVec_
.
z
()
=
0
.
0
;
}
scaleVec_
.
x
()
=
dict
.
lookup
OrDefault
<
scalar
>
(
"scaleX"
,
1
.
0
);
scaleVec_
.
y
()
=
dict
.
lookup
OrDefault
<
scalar
>
(
"scaleY"
,
1
.
0
);
scaleVec_
.
z
()
=
dict
.
lookup
OrDefault
<
scalar
>
(
"scaleZ"
,
1
.
0
);
scaleVec_
.
x
()
=
dict
.
get
OrDefault
<
scalar
>
(
"scaleX"
,
1
.
0
);
scaleVec_
.
y
()
=
dict
.
get
OrDefault
<
scalar
>
(
"scaleY"
,
1
.
0
);
scaleVec_
.
z
()
=
dict
.
get
OrDefault
<
scalar
>
(
"scaleZ"
,
1
.
0
);
calculateBndBox
();
}
...
...
meshLibrary/utilities/boundaryLayers/refineBoundaryLayers/refineBoundaryLayers.C
View file @
c0af2297
...
...
@@ -499,7 +499,7 @@ void Foam::Module::refineBoundaryLayers::readSettings
if
(
patchDict
.
lookup
OrDefault
<
bool
>
patchDict
.
get
OrDefault
<
bool
>
(
"allowDiscontinuity"
,
false
...
...
meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/boundaryPatchBase.C
View file @
c0af2297
...
...
@@ -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"
))
{}
...
...
meshLibrary/utilities/meshes/polyMeshGen/boundaryPatch/processorBoundaryPatch.C
View file @
c0af2297
...
...
@@ -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"
))
{}
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressing.C
View file @
c0af2297
...
...
@@ -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
.
lookup
OrDefault
<
bool
>
(
"nonManifoldMeshing"
,
false
))
if
(
dict
.
get
OrDefault
<
bool
>
(
"nonManifoldMeshing"
,
false
))
{
useDATABoxes_
=
true
;
}
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingCreation.C
View file @
c0af2297
...
...
@@ -520,7 +520,7 @@ void Foam::Module::meshOctreeAddressing::findUsedBoxes() const
boxType
[
leafI
]
|=
MESHCELL
;
}
if
(
meshDict_
.
lookup
OrDefault
<
bool
>
(
"nonManifoldMeshing"
,
false
))
if
(
meshDict_
.
get
OrDefault
<
bool
>
(
"nonManifoldMeshing"
,
false
))
{
# ifdef USE_OMP
# pragma omp parallel for schedule(dynamic, 40)
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeAddressing/meshOctreeAddressingGluedMesh.C
View file @
c0af2297
...
...
@@ -41,7 +41,7 @@ void Foam::Module::meshOctreeAddressing::checkGluedRegions()
if
(
!
useDATABoxes_
||
!
meshDict_
.
lookup
OrDefault
<
bool
>
(
"checkForGluedMesh"
,
false
)
||
!
meshDict_
.
get
OrDefault
<
bool
>
(
"checkForGluedMesh"
,
false
)
)
{
return
;
...
...
meshLibrary/utilities/octrees/meshOctree/meshOctreeAutomaticRefinement/meshOctreeAutomaticRefinement.C
View file @
c0af2297
...
...
@@ -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
...
...
meshLibrary/voronoiMesh/voronoiMeshGenerator/voronoiMeshGenerator.C
View file @
c0af2297
...
...
@@ -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
)
{
...
...