Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
07bbae0c
Commit
07bbae0c
authored
Oct 24, 2020
by
Mark Olesen
Browse files
STYLE: use brace constructors for Foam::zero and Foam::one
- makes it clearer that these are constructors and not function calls
parent
98d05fa8
Changes
35
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C
View file @
07bbae0c
...
...
@@ -446,7 +446,7 @@ int main(int argc, char *argv[])
// Default exposed patch id
labelList
exposedPatchIDs
(
one
()
,
-
1
);
labelList
exposedPatchIDs
(
one
{}
,
-
1
);
if
(
args
.
found
(
"patches"
))
{
...
...
applications/utilities/postProcessing/dataConversion/foamToVTK/convertProcessorPatches.H
View file @
07bbae0c
...
...
@@ -95,7 +95,7 @@ Description
auto
writer
=
autoPtr
<
vtk
::
patchWriter
>::
New
(
meshProxy
.
mesh
(),
labelList
(
one
()
,
pp
.
index
()),
labelList
(
one
{}
,
pp
.
index
()),
writeOpts
,
nearCellValue
,
(
...
...
applications/utilities/postProcessing/dataConversion/foamToVTK/convertVolumeFields.H
View file @
07bbae0c
...
...
@@ -195,7 +195,7 @@ Description
auto
writer
=
autoPtr
<
vtk
::
patchWriter
>::
New
(
meshProxy
.
mesh
(),
labelList
(
one
()
,
pp
.
index
()),
labelList
(
one
{}
,
pp
.
index
()),
writeOpts
,
nearCellValue
,
// Output patch: "boundary"/name
...
...
applications/utilities/preProcessing/PDRsetFields/pdrFields/obstacles/PDRobstacle.C
View file @
07bbae0c
...
...
@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019
-2020
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -571,7 +571,7 @@ Foam::meshedSurface Foam::PDRobstacle::surface() const
// pts += obs.pt;
faceList
fcs
(
one
()
,
face
(
identity
(
4
)));
faceList
fcs
(
one
{}
,
face
(
identity
(
4
)));
surf
.
transfer
(
pts
,
fcs
);
...
...
applications/utilities/preProcessing/changeDictionary/changeDictionary.C
View file @
07bbae0c
...
...
@@ -122,7 +122,7 @@ HashTable<wordList> extractPatchGroups(const dictionary& boundaryDict)
}
else
{
groupToPatch
.
insert
(
groupName
,
wordList
(
one
()
,
patchName
));
groupToPatch
.
insert
(
groupName
,
wordList
(
one
{}
,
patchName
));
}
}
}
...
...
src/OpenFOAM/db/Time/timeSelector.C
View file @
07bbae0c
...
...
@@ -287,7 +287,7 @@ Foam::instantList Foam::timeSelector::selectIfPresent
}
// No timeSelector option specified. Do not change runTime.
return
instantList
(
one
()
,
instant
(
runTime
.
value
(),
runTime
.
timeName
()));
return
instantList
(
one
{}
,
instant
(
runTime
.
value
(),
runTime
.
timeName
()));
}
...
...
src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
View file @
07bbae0c
...
...
@@ -497,7 +497,7 @@ Foam::polyBoundaryMesh::groupPatchIDs() const
}
else
{
groupPatchIDs
.
insert
(
groupName
,
labelList
(
one
()
,
patchi
));
groupPatchIDs
.
insert
(
groupName
,
labelList
(
one
{}
,
patchi
));
}
}
}
...
...
src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C
View file @
07bbae0c
...
...
@@ -258,7 +258,7 @@ Foam::labelList Foam::faBoundaryMesh::indices
if
(
patchId
>=
0
)
{
return
labelList
(
one
()
,
patchId
);
return
labelList
(
one
{}
,
patchId
);
}
}
...
...
src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C
View file @
07bbae0c
...
...
@@ -209,7 +209,7 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
if
(
volumetric_
||
rhoName_
==
"none"
)
{
updateValues
(
one
()
);
updateValues
(
one
{}
);
}
else
{
...
...
src/finiteVolume/fields/fvPatchFields/derived/flowRateOutletVelocity/flowRateOutletVelocityFvPatchVectorField.C
View file @
07bbae0c
...
...
@@ -192,7 +192,7 @@ void Foam::flowRateOutletVelocityFvPatchVectorField::updateCoeffs()
if
(
volumetric_
||
rhoName_
==
"none"
)
{
updateValues
(
one
()
);
updateValues
(
one
{}
);
}
else
{
...
...
src/finiteVolume/fields/fvPatchFields/derived/matchedFlowRateOutletVelocity/matchedFlowRateOutletVelocityFvPatchVectorField.C
View file @
07bbae0c
...
...
@@ -211,7 +211,7 @@ void Foam::matchedFlowRateOutletVelocityFvPatchVectorField::updateCoeffs()
if
(
volumetric_
)
{
updateValues
(
inletPatchID
,
one
()
,
one
()
);
updateValues
(
inletPatchID
,
one
{}
,
one
{}
);
}
else
{
...
...
src/functionObjects/field/externalCoupled/externalCoupled.C
View file @
07bbae0c
...
...
@@ -616,7 +616,7 @@ bool Foam::functionObjects::externalCoupled::read(const dictionary& dict)
regionToGroups_
.
insert
(
regionGroupNames_
.
last
(),
labelList
(
one
()
,
nGroups
)
labelList
(
one
{}
,
nGroups
)
);
}
groupNames_
.
append
(
groupName
);
...
...
src/functionObjects/utilities/vtkWrite/vtkWrite.C
View file @
07bbae0c
...
...
@@ -457,7 +457,7 @@ bool Foam::functionObjects::vtkWrite::write()
auto
writer
=
autoPtr
<
vtk
::
patchWriter
>::
New
(
meshProxy
.
mesh
(),
labelList
(
one
()
,
pp
.
index
()),
labelList
(
one
{}
,
pp
.
index
()),
writeOpts_
,
// Output name for patch: "boundary"/name
(
...
...
src/mesh/blockMesh/PDRblockMesh/PDRblock.C
View file @
07bbae0c
...
...
@@ -534,7 +534,7 @@ Foam::PDRblock::PDRblock
bentry
.
name_
=
"patch"
+
Foam
::
name
(
patchi
);
bentry
.
type_
=
"patch"
;
bentry
.
size_
=
0
;
bentry
.
faces_
=
labelList
(
one
()
,
patchi
);
bentry
.
faces_
=
labelList
(
one
{}
,
patchi
);
}
reset
(
xgrid
,
ygrid
,
zgrid
);
...
...
src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C
View file @
07bbae0c
...
...
@@ -484,7 +484,7 @@ Foam::extendedEdgeMesh::extendedEdgeMesh
const
boolList
&
surfBaffleRegions
)
:
extendedEdgeMesh
(
one
::
minus
()
)
extendedEdgeMesh
(
one
::
minus
{}
)
{
// Extract and reorder the data from surfaceFeatures
const
triSurface
&
surf
=
sFeat
.
surface
();
...
...
@@ -547,7 +547,7 @@ Foam::extendedEdgeMesh::extendedEdgeMesh
const
labelUList
&
featurePoints
)
:
extendedEdgeMesh
(
one
::
minus
()
)
extendedEdgeMesh
(
one
::
minus
{}
)
{
sortPointsAndEdges
(
...
...
src/meshTools/searchableSurfaces/searchableDisk/searchableDisk.H
View file @
07bbae0c
...
...
@@ -161,7 +161,7 @@ public:
// Usually the element centres (should be of length size()).
virtual
tmp
<
pointField
>
coordinates
()
const
{
return
tmp
<
pointField
>::
New
(
one
()
,
origin
());
return
tmp
<
pointField
>::
New
(
one
{}
,
origin
());
}
//- Get bounding spheres (centre and radius squared), one per element.
...
...
src/meshTools/sets/cellSources/boxToCell/boxToCell.C
View file @
07bbae0c
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018
-2020
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -137,7 +137,7 @@ Foam::boxToCell::boxToCell
)
:
topoSetCellSource
(
mesh
),
bbs_
(
one
()
,
treeBoundBox
(
checkIs
(
is
)))
bbs_
(
one
{}
,
treeBoundBox
(
checkIs
(
is
)))
{}
...
...
src/meshTools/sets/cellSources/cellToCell/cellToCell.C
View file @
07bbae0c
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018
-2020
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -60,7 +60,7 @@ Foam::cellToCell::cellToCell
)
:
topoSetCellSource
(
mesh
),
names_
(
one
()
,
setName
)
names_
(
one
{}
,
setName
)
{}
...
...
@@ -89,7 +89,7 @@ Foam::cellToCell::cellToCell
)
:
topoSetCellSource
(
mesh
),
names_
(
one
()
,
word
(
checkIs
(
is
)))
names_
(
one
{}
,
word
(
checkIs
(
is
)))
{}
...
...
src/meshTools/sets/cellSources/faceToCell/faceToCell.C
View file @
07bbae0c
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018
-2020
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -144,7 +144,7 @@ Foam::faceToCell::faceToCell
)
:
topoSetCellSource
(
mesh
),
names_
(
one
()
,
setName
),
names_
(
one
{}
,
setName
),
option_
(
option
)
{}
...
...
@@ -175,7 +175,7 @@ Foam::faceToCell::faceToCell
)
:
topoSetCellSource
(
mesh
),
names_
(
one
()
,
word
(
checkIs
(
is
))),
names_
(
one
{}
,
word
(
checkIs
(
is
))),
option_
(
faceActionNames_
.
read
(
checkIs
(
is
)))
{}
...
...
src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C
View file @
07bbae0c
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-20
18
OpenCFD Ltd.
Copyright (C) 2016-20
20
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -120,7 +120,7 @@ Foam::faceZoneToCell::faceZoneToCell
)
:
topoSetCellSource
(
mesh
),
selectedZones_
(
one
()
,
zoneName
),
selectedZones_
(
one
{}
,
zoneName
),
option_
(
option
)
{}
...
...
@@ -152,7 +152,7 @@ Foam::faceZoneToCell::faceZoneToCell
)
:
topoSetCellSource
(
mesh
),
selectedZones_
(
one
()
,
wordRe
(
checkIs
(
is
))),
selectedZones_
(
one
{}
,
wordRe
(
checkIs
(
is
))),
option_
(
faceActionNames_
.
read
(
checkIs
(
is
)))
{}
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment