mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use Zero when zero-initializing types
- makes the intent clearer and avoids the need for additional
constructor casting. Eg,
labelList(10, Zero) vs. labelList(10, 0)
scalarField(10, Zero) vs. scalarField(10, scalar(0))
vectorField(10, Zero) vs. vectorField(10, vector::zero)
This commit is contained in:
@ -11,7 +11,7 @@ labelListList donorCell(mesh.nInternalFaces());
|
||||
scalarListList weightCellCells(mesh.nInternalFaces());
|
||||
|
||||
// Interpolated HbyA faces
|
||||
vectorField UIntFaces(mesh.nInternalFaces(), vector::zero);
|
||||
vectorField UIntFaces(mesh.nInternalFaces(), Zero);
|
||||
|
||||
// Determine receptor neighbour cells
|
||||
labelList receptorNeigCell(mesh.nInternalFaces(), -1);
|
||||
@ -23,7 +23,7 @@ labelList receptorNeigCell(mesh.nInternalFaces(), -1);
|
||||
|
||||
label nZones = gMax(zoneID)+1;
|
||||
PtrList<fvMeshSubset> meshParts(nZones);
|
||||
labelList nCellsPerZone(nZones, 0);
|
||||
labelList nCellsPerZone(nZones, Zero);
|
||||
|
||||
// A mesh subset for each zone
|
||||
forAll(meshParts, zonei)
|
||||
@ -173,7 +173,7 @@ labelList receptorNeigCell(mesh.nInternalFaces(), -1);
|
||||
}
|
||||
|
||||
// contravariant U
|
||||
vectorField U1Contrav(mesh.nInternalFaces(), vector::zero);
|
||||
vectorField U1Contrav(mesh.nInternalFaces(), Zero);
|
||||
|
||||
surfaceVectorField faceNormals(mesh.Sf()/mesh.magSf());
|
||||
|
||||
@ -192,7 +192,8 @@ forAll(isNeiInterpolatedFace, faceI)
|
||||
if (cellId != -1)
|
||||
{
|
||||
const vector& n = faceNormals[faceI];
|
||||
vector n1 = vector::zero;
|
||||
vector n1(Zero);
|
||||
|
||||
// 2-D cases
|
||||
if (mesh.nSolutionD() == 2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user