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:
@ -49,18 +49,18 @@ namespace Foam
|
||||
Foam::SIBS::SIBS(const ODESystem& ode, const dictionary& dict)
|
||||
:
|
||||
ODESolver(ode, dict),
|
||||
a_(iMaxX_, 0.0),
|
||||
alpha_(kMaxX_, 0.0),
|
||||
d_p_(n_, kMaxX_, 0.0),
|
||||
x_p_(kMaxX_, 0.0),
|
||||
err_(kMaxX_, 0.0),
|
||||
a_(iMaxX_, Zero),
|
||||
alpha_(kMaxX_, Zero),
|
||||
d_p_(n_, kMaxX_, Zero),
|
||||
x_p_(kMaxX_, Zero),
|
||||
err_(kMaxX_, Zero),
|
||||
|
||||
yTemp_(n_, 0.0),
|
||||
ySeq_(n_, 0.0),
|
||||
yErr_(n_, 0.0),
|
||||
yTemp_(n_, Zero),
|
||||
ySeq_(n_, Zero),
|
||||
yErr_(n_, Zero),
|
||||
dydx0_(n_),
|
||||
dfdx_(n_, 0.0),
|
||||
dfdy_(n_, 0.0),
|
||||
dfdx_(n_, Zero),
|
||||
dfdy_(n_, Zero),
|
||||
first_(1),
|
||||
epsOld_(-1.0)
|
||||
{}
|
||||
|
||||
@ -119,7 +119,7 @@ Foam::label Foam::Distribution<Type>::index
|
||||
// Underflow of this List, storage increase and remapping
|
||||
// required
|
||||
|
||||
List<scalar> newCmptDistribution(2*cmptDistribution.size(), 0.0);
|
||||
List<scalar> newCmptDistribution(2*cmptDistribution.size(), Zero);
|
||||
|
||||
label sOld = cmptDistribution.size();
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ Foam::labelListList Foam::invertOneToMany
|
||||
const labelUList& map
|
||||
)
|
||||
{
|
||||
labelList sizes(len, 0);
|
||||
labelList sizes(len, Zero);
|
||||
|
||||
for (const label newIdx : map)
|
||||
{
|
||||
|
||||
@ -695,7 +695,7 @@ void Foam::invertManyToMany
|
||||
)
|
||||
{
|
||||
// The output list sizes
|
||||
labelList sizes(len, 0);
|
||||
labelList sizes(len, Zero);
|
||||
|
||||
for (const InputIntListType& sublist : input)
|
||||
{
|
||||
|
||||
@ -42,6 +42,13 @@ inline Foam::SortableList<T>::SortableList(const label size)
|
||||
{}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::SortableList<T>::SortableList(const label size, const zero)
|
||||
:
|
||||
List<T>(size, zero())
|
||||
{}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::SortableList<T>::SortableList(const label size, const T& val)
|
||||
:
|
||||
|
||||
@ -71,7 +71,11 @@ public:
|
||||
// The indices remain empty until the list is sorted
|
||||
inline explicit SortableList(const label size);
|
||||
|
||||
//- Construct given size and initial value. Sort later on
|
||||
//- Construct zero-initialized with given size, sort later.
|
||||
// The indices remain empty until the list is sorted
|
||||
inline SortableList(const label size, const zero);
|
||||
|
||||
//- Construct given size and initial value, sorting later.
|
||||
// The indices remain empty until the list is sorted
|
||||
inline SortableList(const label size, const T& val);
|
||||
|
||||
|
||||
@ -796,7 +796,7 @@ Foam::label Foam::decomposedBlockData::calcNumProcs
|
||||
(
|
||||
reinterpret_cast<const char*>(&nSendProcs),
|
||||
List<int>(nProcs, sizeof(nSendProcs)),
|
||||
List<int>(nProcs, 0),
|
||||
List<int>(nProcs, Zero),
|
||||
reinterpret_cast<char*>(&n),
|
||||
sizeof(n),
|
||||
comm
|
||||
|
||||
@ -58,7 +58,7 @@ void Foam::UPstream::setParRun(const label nProcs, const bool haveThreads)
|
||||
haveThreads_ = haveThreads;
|
||||
|
||||
freeCommunicator(UPstream::worldComm);
|
||||
label comm = allocateCommunicator(-1, labelList(1, label(0)), false);
|
||||
label comm = allocateCommunicator(-1, labelList(1, Zero), false);
|
||||
if (comm != UPstream::worldComm)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
@ -382,7 +382,7 @@ Foam::UPstream::treeCommunication_(10);
|
||||
Foam::UPstream::communicator serialComm
|
||||
(
|
||||
-1,
|
||||
Foam::labelList(1, Foam::label(0)),
|
||||
Foam::labelList(1, Foam::Zero),
|
||||
false
|
||||
);
|
||||
|
||||
|
||||
@ -275,9 +275,9 @@ void Foam::Pstream::exchange
|
||||
List<char*> charRecvBufs(sendBufs.size());
|
||||
|
||||
labelList nRecv(sendBufs.size());
|
||||
labelList startRecv(sendBufs.size(), 0);
|
||||
labelList startRecv(sendBufs.size(), Zero);
|
||||
labelList nSend(sendBufs.size());
|
||||
labelList startSend(sendBufs.size(), 0);
|
||||
labelList startSend(sendBufs.size(), Zero);
|
||||
|
||||
for (label iter = 0; iter < nIter; iter++)
|
||||
{
|
||||
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::geometricZeroField
|
||||
|
||||
Description
|
||||
A class representing the concept of a GeometricField of 1 used to avoid
|
||||
A class representing the concept of a GeometricField of 0 used to avoid
|
||||
unnecessary manipulations for objects which are known to be zero at
|
||||
compile-time.
|
||||
|
||||
@ -57,6 +57,14 @@ class geometricZeroField
|
||||
|
||||
public:
|
||||
|
||||
// Public typedefs
|
||||
|
||||
typedef zeroField Internal;
|
||||
typedef zeroField Patch;
|
||||
typedef zeroFieldField Boundary;
|
||||
typedef zero cmptType;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::curve::curve
|
||||
const label l
|
||||
)
|
||||
:
|
||||
scalarField(l, 0.0),
|
||||
scalarField(l, Zero),
|
||||
name_(name),
|
||||
style_(style)
|
||||
{}
|
||||
|
||||
@ -54,7 +54,7 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
|
||||
)
|
||||
:
|
||||
IOobject(io),
|
||||
List<scalar>(2, 0.0),
|
||||
List<scalar>(2, Zero),
|
||||
x0_(0.0),
|
||||
dx_(1.0),
|
||||
log10_(false),
|
||||
@ -93,7 +93,7 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
|
||||
IOobject::NO_WRITE,
|
||||
false // if used in BCs, could be used by multiple patches
|
||||
),
|
||||
List<scalar>(2, 0.0),
|
||||
List<scalar>(2, Zero),
|
||||
x0_(dict.get<scalar>("x0")),
|
||||
dx_(dict.get<scalar>("dx")),
|
||||
log10_(dict.lookupOrDefault<Switch>("log10", false)),
|
||||
|
||||
@ -41,7 +41,7 @@ void Foam::lduAddressing::calcLosort() const
|
||||
// Scan the neighbour list to find out how many times the cell
|
||||
// appears as a neighbour of the face. Done this way to avoid guessing
|
||||
// and resizing list
|
||||
labelList nNbrOfFace(size(), 0);
|
||||
labelList nNbrOfFace(size(), Zero);
|
||||
|
||||
const labelUList& nbr = upperAddr();
|
||||
|
||||
@ -136,7 +136,7 @@ void Foam::lduAddressing::calcLosortStart() const
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
losortStartPtr_ = new labelList(size() + 1, 0);
|
||||
losortStartPtr_ = new labelList(size() + 1, Zero);
|
||||
|
||||
labelList& lsrtStart = *losortStartPtr_;
|
||||
|
||||
@ -259,7 +259,7 @@ Foam::Tuple2<Foam::label, Foam::scalar> Foam::lduAddressing::band() const
|
||||
const labelUList& owner = lowerAddr();
|
||||
const labelUList& neighbour = upperAddr();
|
||||
|
||||
labelList cellBandwidth(size(), 0);
|
||||
labelList cellBandwidth(size(), Zero);
|
||||
|
||||
forAll(neighbour, facei)
|
||||
{
|
||||
|
||||
@ -178,7 +178,7 @@ Foam::scalarField& Foam::lduMatrix::lower()
|
||||
}
|
||||
else
|
||||
{
|
||||
lowerPtr_ = new scalarField(lduAddr().lowerAddr().size(), 0.0);
|
||||
lowerPtr_ = new scalarField(lduAddr().lowerAddr().size(), Zero);
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ Foam::scalarField& Foam::lduMatrix::diag()
|
||||
{
|
||||
if (!diagPtr_)
|
||||
{
|
||||
diagPtr_ = new scalarField(lduAddr().size(), 0.0);
|
||||
diagPtr_ = new scalarField(lduAddr().size(), Zero);
|
||||
}
|
||||
|
||||
return *diagPtr_;
|
||||
@ -207,7 +207,7 @@ Foam::scalarField& Foam::lduMatrix::upper()
|
||||
}
|
||||
else
|
||||
{
|
||||
upperPtr_ = new scalarField(lduAddr().lowerAddr().size(), 0.0);
|
||||
upperPtr_ = new scalarField(lduAddr().lowerAddr().size(), Zero);
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ Foam::scalarField& Foam::lduMatrix::lower(const label nCoeffs)
|
||||
}
|
||||
else
|
||||
{
|
||||
lowerPtr_ = new scalarField(nCoeffs, 0.0);
|
||||
lowerPtr_ = new scalarField(nCoeffs, Zero);
|
||||
}
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ Foam::scalarField& Foam::lduMatrix::diag(const label size)
|
||||
{
|
||||
if (!diagPtr_)
|
||||
{
|
||||
diagPtr_ = new scalarField(size, 0.0);
|
||||
diagPtr_ = new scalarField(size, Zero);
|
||||
}
|
||||
|
||||
return *diagPtr_;
|
||||
@ -254,7 +254,7 @@ Foam::scalarField& Foam::lduMatrix::upper(const label nCoeffs)
|
||||
}
|
||||
else
|
||||
{
|
||||
upperPtr_ = new scalarField(nCoeffs, 0.0);
|
||||
upperPtr_ = new scalarField(nCoeffs, Zero);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -295,7 +295,7 @@ Foam::tmp<Foam::scalarField > Foam::lduMatrix::H1() const
|
||||
{
|
||||
tmp<scalarField > tH1
|
||||
(
|
||||
new scalarField(lduAddr().size(), 0.0)
|
||||
new scalarField(lduAddr().size(), Zero)
|
||||
);
|
||||
|
||||
if (lowerPtr_ || upperPtr_)
|
||||
|
||||
@ -70,7 +70,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
||||
label maxNnbrs = 10;
|
||||
|
||||
// Number of faces for each coarse-cell
|
||||
labelList cCellnFaces(nCoarseCells, 0);
|
||||
labelList cCellnFaces(nCoarseCells, Zero);
|
||||
|
||||
// Setup initial packed storage for coarse-cell faces
|
||||
labelList cCellFaces(maxNnbrs*nCoarseCells);
|
||||
@ -260,7 +260,11 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
||||
// Get reference to fine-level interfaces
|
||||
const lduInterfacePtrsList& fineInterfaces = interfaceLevel(fineLevelIndex);
|
||||
|
||||
nPatchFaces_.set(fineLevelIndex, new labelList(fineInterfaces.size(), 0));
|
||||
nPatchFaces_.set
|
||||
(
|
||||
fineLevelIndex,
|
||||
new labelList(fineInterfaces.size(), Zero)
|
||||
);
|
||||
labelList& nPatchFaces = nPatchFaces_[fineLevelIndex];
|
||||
|
||||
patchFaceRestrictAddressing_.set
|
||||
|
||||
@ -135,7 +135,7 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate
|
||||
|
||||
// memory management
|
||||
{
|
||||
labelList nNbrs(nFineCells, 0);
|
||||
labelList nNbrs(nFineCells, Zero);
|
||||
|
||||
forAll(upperAddr, facei)
|
||||
{
|
||||
|
||||
@ -95,7 +95,7 @@ bool Foam::masterCoarsestGAMGProcAgglomeration::agglomerate()
|
||||
if (nProcs > 1)
|
||||
{
|
||||
// Processor restriction map: per processor the coarse processor
|
||||
labelList procAgglomMap(nProcs, 0);
|
||||
labelList procAgglomMap(nProcs, Zero);
|
||||
|
||||
// Master processor
|
||||
labelList masterProcs;
|
||||
|
||||
@ -150,7 +150,7 @@ Foam::procFacesGAMGProcAgglomeration::processorAgglomeration
|
||||
label singleCellMeshComm = UPstream::allocateCommunicator
|
||||
(
|
||||
mesh.comm(),
|
||||
labelList(1, label(0)) // only processor 0
|
||||
labelList(1, Zero) // only processor 0
|
||||
);
|
||||
|
||||
scalarField faceWeights;
|
||||
|
||||
@ -253,7 +253,7 @@ void Foam::GAMGSolver::agglomerateInterfaceCoefficients
|
||||
coarseInterfaceBouCoeffs.set
|
||||
(
|
||||
inti,
|
||||
new scalarField(nPatchFaces[inti], 0.0)
|
||||
new scalarField(nPatchFaces[inti], Zero)
|
||||
);
|
||||
agglomeration_.restrictField
|
||||
(
|
||||
@ -265,7 +265,7 @@ void Foam::GAMGSolver::agglomerateInterfaceCoefficients
|
||||
coarseInterfaceIntCoeffs.set
|
||||
(
|
||||
inti,
|
||||
new scalarField(nPatchFaces[inti], 0.0)
|
||||
new scalarField(nPatchFaces[inti], Zero)
|
||||
);
|
||||
agglomeration_.restrictField
|
||||
(
|
||||
|
||||
@ -80,7 +80,7 @@ Foam::tmp<Foam::scalarField> Foam::GAMGInterface::agglomerateCoeffs
|
||||
const scalarField& fineCoeffs
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> tcoarseCoeffs(new scalarField(size(), 0.0));
|
||||
tmp<scalarField> tcoarseCoeffs(new scalarField(size(), Zero));
|
||||
scalarField& coarseCoeffs = tcoarseCoeffs.ref();
|
||||
|
||||
if (fineCoeffs.size() != faceRestrictAddressing_.size())
|
||||
|
||||
@ -221,7 +221,7 @@ void Foam::multiply
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
ans = scalarRectangularMatrix(A.m(), C.n(), scalar(0));
|
||||
ans = scalarRectangularMatrix(A.m(), C.n(), Zero);
|
||||
|
||||
for (label i=0; i<A.m(); i++)
|
||||
{
|
||||
@ -265,7 +265,7 @@ void Foam::multiply
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
ans = scalarRectangularMatrix(A.m(), C.n(), scalar(0));
|
||||
ans = scalarRectangularMatrix(A.m(), C.n(), Zero);
|
||||
|
||||
for (label i=0; i<A.m(); i++)
|
||||
{
|
||||
|
||||
@ -249,7 +249,7 @@ void Foam::multiply
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
ans = Matrix<Form, Type>(A.m(), B.n(), scalar(0));
|
||||
ans = Matrix<Form, Type>(A.m(), B.n(), Zero);
|
||||
|
||||
for (label i=0; i<A.m(); i++)
|
||||
{
|
||||
|
||||
@ -242,7 +242,7 @@ Foam::commSchedule::commSchedule
|
||||
|
||||
// Sort schedule_ by processor
|
||||
|
||||
labelList nProcScheduled(nProcs, 0);
|
||||
labelList nProcScheduled(nProcs, Zero);
|
||||
|
||||
// Count
|
||||
forAll(schedule_, i)
|
||||
|
||||
@ -152,7 +152,7 @@ Foam::labelList Foam::bandCompression
|
||||
)
|
||||
{
|
||||
// Count number of neighbours
|
||||
labelList numNbrs(offsets.size()-1, 0);
|
||||
labelList numNbrs(offsets.size()-1, Zero);
|
||||
forAll(numNbrs, celli)
|
||||
{
|
||||
label start = offsets[celli];
|
||||
|
||||
@ -132,7 +132,7 @@ Foam::labelList Foam::lduPrimitiveMesh::upperTriOrder
|
||||
const labelUList& upper
|
||||
)
|
||||
{
|
||||
labelList nNbrs(nCells, 0);
|
||||
labelList nNbrs(nCells, Zero);
|
||||
|
||||
// Count number of upper neighbours
|
||||
forAll(lower, facei)
|
||||
@ -377,7 +377,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh
|
||||
|
||||
|
||||
label nOtherInterfaces = 0;
|
||||
labelList nCoupledFaces(nMeshes, 0);
|
||||
labelList nCoupledFaces(nMeshes, Zero);
|
||||
|
||||
for (label procMeshI = 0; procMeshI < nMeshes; procMeshI++)
|
||||
{
|
||||
|
||||
@ -84,9 +84,9 @@ Foam::cellShape Foam::degenerateMatcher::match(const faceList& faces)
|
||||
return match
|
||||
(
|
||||
faces,
|
||||
labelList(faces.size(), 0), // cell 0 is owner of all faces
|
||||
0, // cell 0
|
||||
identity(faces.size()) // cell 0 consists of all faces
|
||||
labelList(faces.size(), Zero), // cell 0 is owner of all faces
|
||||
0, // cell 0
|
||||
identity(faces.size()) // cell 0 consists of all faces
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -287,10 +287,10 @@ bool Foam::hexMatcher::isA(const faceList& faces)
|
||||
return matchShape
|
||||
(
|
||||
true,
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), 0), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), Zero), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -346,10 +346,10 @@ bool Foam::prismMatcher::isA(const faceList& faces)
|
||||
return matchShape
|
||||
(
|
||||
true,
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), 0), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), Zero), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -268,10 +268,10 @@ bool Foam::pyrMatcher::isA(const faceList& faces)
|
||||
return matchShape
|
||||
(
|
||||
true,
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), 0), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), Zero), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -227,10 +227,10 @@ bool Foam::tetMatcher::isA(const faceList& faces)
|
||||
return matchShape
|
||||
(
|
||||
true,
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), 0), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), Zero), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -273,10 +273,10 @@ bool Foam::tetWedgeMatcher::isA(const faceList& faces)
|
||||
return matchShape
|
||||
(
|
||||
true,
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), 0), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), Zero), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -373,10 +373,10 @@ bool Foam::wedgeMatcher::isA(const faceList& faces)
|
||||
return matchShape
|
||||
(
|
||||
true,
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), 0), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
faces, // all faces in mesh
|
||||
labelList(faces.size(), Zero), // cell 0 is owner of all faces
|
||||
0, // cell label
|
||||
identity(faces.size()) // faces of cell 0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ void Foam::pointMapper::calcAddressing() const
|
||||
{
|
||||
// Mapped from a single point
|
||||
addr[pointi] = labelList(1, cm[pointi]);
|
||||
w[pointi] = scalarList(1, 1.0);
|
||||
w[pointi] = scalarList(1, scalar(1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,8 +134,8 @@ void Foam::pointMapper::calcAddressing() const
|
||||
if (addr[pointi].empty())
|
||||
{
|
||||
// Mapped from a dummy point. Take point 0 with weight 1.
|
||||
addr[pointi] = labelList(1, label(0));
|
||||
w[pointi] = scalarList(1, 1.0);
|
||||
addr[pointi] = labelList(1, Zero);
|
||||
w[pointi] = scalarList(1, scalar(1));
|
||||
|
||||
insertedPoints[nInsertedPoints] = pointi;
|
||||
nInsertedPoints++;
|
||||
|
||||
@ -83,14 +83,14 @@ void Foam::pointPatchMapper::calcAddressing() const
|
||||
if (ppm[i] >= 0)
|
||||
{
|
||||
addr[i] = labelList(1, ppm[i]);
|
||||
w[i] = scalarList(1, 1.0);
|
||||
w[i] = scalarList(1, scalar(1));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inserted point.
|
||||
///// Map from point0 (arbitrary choice)
|
||||
//addr[i] = labelList(1, label(0));
|
||||
//w[i] = scalarList(1, 1.0);
|
||||
//addr[i] = labelList(1, Zero);
|
||||
//w[i] = scalarList(1, scalar(1));
|
||||
hasUnmapped_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1234,7 +1234,7 @@ void Foam::globalMeshData::calcPointBoundaryFaces
|
||||
|
||||
// 1. Count
|
||||
|
||||
labelList nPointFaces(coupledPatch().nPoints(), 0);
|
||||
labelList nPointFaces(coupledPatch().nPoints(), Zero);
|
||||
|
||||
forAll(bMesh, patchi)
|
||||
{
|
||||
|
||||
@ -262,8 +262,8 @@ void Foam::cellMapper::calcAddressing() const
|
||||
if (addr[celli].empty())
|
||||
{
|
||||
// Mapped from a dummy cell
|
||||
addr[celli] = labelList(1, label(0));
|
||||
w[celli] = scalarList(1, 1.0);
|
||||
addr[celli] = labelList(1, Zero);
|
||||
w[celli] = scalarList(1, scalar(1));
|
||||
|
||||
insertedCells[nInsertedCells] = celli;
|
||||
nInsertedCells++;
|
||||
|
||||
@ -177,8 +177,8 @@ void Foam::faceMapper::calcAddressing() const
|
||||
if (addr[facei].empty())
|
||||
{
|
||||
// Mapped from a dummy face
|
||||
addr[facei] = labelList(1, label(0));
|
||||
w[facei] = scalarList(1, 1.0);
|
||||
addr[facei] = labelList(1, Zero);
|
||||
w[facei] = scalarList(1, scalar(1));
|
||||
|
||||
insertedFaces[nInsertedFaces] = facei;
|
||||
nInsertedFaces++;
|
||||
|
||||
@ -311,7 +311,7 @@ Foam::mapDistribute::mapDistribute
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Count per transformIndex
|
||||
label nTrafo = globalTransforms.transformPermutations().size();
|
||||
labelList nPerTransform(nTrafo, 0);
|
||||
labelList nPerTransform(nTrafo, Zero);
|
||||
forAll(transformedElements, i)
|
||||
{
|
||||
labelPair elem = transformedElements[i];
|
||||
@ -420,7 +420,7 @@ Foam::mapDistribute::mapDistribute
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Count per transformIndex
|
||||
label nTrafo = globalTransforms.transformPermutations().size();
|
||||
labelList nPerTransform(nTrafo, 0);
|
||||
labelList nPerTransform(nTrafo, Zero);
|
||||
forAll(transformedElements, celli)
|
||||
{
|
||||
const labelPairList& elems = transformedElements[celli];
|
||||
|
||||
@ -289,7 +289,7 @@ void Foam::mapDistributeBase::calcCompactAddressing
|
||||
compactMap.setSize(Pstream::nProcs());
|
||||
|
||||
// Count all (non-local) elements needed. Just for presizing map.
|
||||
labelList nNonLocal(Pstream::nProcs(), 0);
|
||||
labelList nNonLocal(Pstream::nProcs(), Zero);
|
||||
|
||||
forAll(elements, i)
|
||||
{
|
||||
@ -338,7 +338,7 @@ void Foam::mapDistributeBase::calcCompactAddressing
|
||||
compactMap.setSize(Pstream::nProcs());
|
||||
|
||||
// Count all (non-local) elements needed. Just for presizing map.
|
||||
labelList nNonLocal(Pstream::nProcs(), 0);
|
||||
labelList nNonLocal(Pstream::nProcs(), Zero);
|
||||
|
||||
forAll(cellCells, cellI)
|
||||
{
|
||||
@ -616,8 +616,8 @@ Foam::mapDistributeBase::mapDistributeBase
|
||||
}
|
||||
|
||||
// Per processor the number of samples we have to send/receive.
|
||||
labelList nSend(Pstream::nProcs(), 0);
|
||||
labelList nRecv(Pstream::nProcs(), 0);
|
||||
labelList nSend(Pstream::nProcs(), Zero);
|
||||
labelList nRecv(Pstream::nProcs(), Zero);
|
||||
|
||||
forAll(sendProcs, sampleI)
|
||||
{
|
||||
|
||||
@ -55,7 +55,7 @@ Foam::label Foam::polyMeshTetDecomposition::findSharedBasePoint
|
||||
|
||||
const point& oCc = pC[oCI];
|
||||
|
||||
List<scalar> tetQualities(2, 0.0);
|
||||
List<scalar> tetQualities(2, Zero);
|
||||
|
||||
forAll(f, faceBasePtI)
|
||||
{
|
||||
|
||||
@ -58,7 +58,7 @@ void Foam::primitiveMesh::calcCellCells() const
|
||||
{
|
||||
// 1. Count number of internal faces per cell
|
||||
|
||||
labelList ncc(nCells(), 0);
|
||||
labelList ncc(nCells(), Zero);
|
||||
|
||||
const labelList& own = faceOwner();
|
||||
const labelList& nei = faceNeighbour();
|
||||
|
||||
@ -88,18 +88,18 @@ void Foam::primitiveMesh::makeCellCentresAndVols
|
||||
// face centres
|
||||
|
||||
vectorField cEst(nCells(), Zero);
|
||||
labelField nCellFaces(nCells(), 0);
|
||||
labelField nCellFaces(nCells(), Zero);
|
||||
|
||||
forAll(own, facei)
|
||||
{
|
||||
cEst[own[facei]] += fCtrs[facei];
|
||||
nCellFaces[own[facei]] += 1;
|
||||
++nCellFaces[own[facei]];
|
||||
}
|
||||
|
||||
forAll(nei, facei)
|
||||
{
|
||||
cEst[nei[facei]] += fCtrs[facei];
|
||||
nCellFaces[nei[facei]] += 1;
|
||||
++nCellFaces[nei[facei]];
|
||||
}
|
||||
|
||||
forAll(cEst, celli)
|
||||
|
||||
@ -50,7 +50,7 @@ void Foam::primitiveMesh::calcCells
|
||||
|
||||
// 1. Count number of faces per cell
|
||||
|
||||
labelList ncf(nCells, 0);
|
||||
labelList ncf(nCells, Zero);
|
||||
|
||||
forAll(own, facei)
|
||||
{
|
||||
|
||||
@ -1147,7 +1147,7 @@ bool Foam::primitiveMesh::checkCellsZipUp
|
||||
|
||||
const edgeList cellEdges = c[celli].edges(f);
|
||||
|
||||
labelList edgeUsage(cellEdges.size(), 0);
|
||||
labelList edgeUsage(cellEdges.size(), Zero);
|
||||
|
||||
forAll(curFaces, facei)
|
||||
{
|
||||
|
||||
@ -61,7 +61,7 @@ void Foam::primitiveMesh::calcPointCells() const
|
||||
|
||||
// Count number of cells per point
|
||||
|
||||
labelList npc(nPoints(), 0);
|
||||
labelList npc(nPoints(), Zero);
|
||||
|
||||
forAll(cf, celli)
|
||||
{
|
||||
|
||||
@ -316,7 +316,7 @@ Type Foam::Function1Types::TableBase<Type>::integrate
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::scalarField> Foam::Function1Types::TableBase<Type>::x() const
|
||||
{
|
||||
tmp<scalarField> tfld(new scalarField(table_.size(), 0.0));
|
||||
tmp<scalarField> tfld(new scalarField(table_.size(), Zero));
|
||||
scalarField& fld = tfld.ref();
|
||||
|
||||
forAll(table_, i)
|
||||
|
||||
@ -83,7 +83,7 @@ Foam::polynomialFunction Foam::polynomialFunction::cloneIntegralMinus1
|
||||
|
||||
Foam::polynomialFunction::polynomialFunction(const label order)
|
||||
:
|
||||
scalarList(order, 0.0),
|
||||
scalarList(order, Zero),
|
||||
logActive_(false),
|
||||
logCoeff_(0.0)
|
||||
{
|
||||
|
||||
@ -306,7 +306,7 @@ void Foam::globalIndexAndTransform::determineTransformPermutations()
|
||||
|
||||
|
||||
// Encode index for 0 sign
|
||||
labelList permutationIndices(nIndependentTransforms(), 0);
|
||||
labelList permutationIndices(nIndependentTransforms(), Zero);
|
||||
nullTransformIndex_ = encodeTransformIndex(permutationIndices);
|
||||
}
|
||||
|
||||
|
||||
@ -111,7 +111,7 @@ Foam::labelList Foam::globalIndexAndTransform::decodeTransformIndex
|
||||
const label transformIndex
|
||||
) const
|
||||
{
|
||||
labelList permutation(transforms_.size(), 0);
|
||||
labelList permutation(transforms_.size(), Zero);
|
||||
|
||||
label t = transformIndex;
|
||||
forAll(permutation, i)
|
||||
@ -415,7 +415,7 @@ Foam::labelList Foam::globalIndexAndTransform::transformIndicesForPatches
|
||||
const labelHashSet& patchis
|
||||
) const
|
||||
{
|
||||
labelList permutation(transforms_.size(), 0);
|
||||
labelList permutation(transforms_.size(), Zero);
|
||||
|
||||
labelList selectedTransformIs(0);
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat
|
||||
{
|
||||
return tmp<scalarField>
|
||||
(
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), 0.0)
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), Zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -350,7 +350,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const scalarField& Tp(*this);
|
||||
|
||||
scalarField qr(Tp.size(), 0);
|
||||
scalarField qr(Tp.size(), Zero);
|
||||
if (qrName_ != "none")
|
||||
{
|
||||
qr =
|
||||
|
||||
@ -45,7 +45,7 @@ fixedIncidentRadiationFvPatchScalarField
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF),
|
||||
temperatureCoupledBase(patch(), "undefined", "undefined", "undefined-K"),
|
||||
qrIncident_(p.size(), 0.0)
|
||||
qrIncident_(p.size(), Zero)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -62,10 +62,10 @@ outletMachNumberPressureFvPatchScalarField
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
M_(dict.lookupOrDefault<scalar>("M", 0.0)),
|
||||
M_(dict.lookupOrDefault<scalar>("M", 0)),
|
||||
pBack_(dict.get<scalar>("pBack")),
|
||||
c1_(dict.lookupOrDefault<scalar>("c1", 0.0)),
|
||||
A1_(dict.lookupOrDefault<scalar>("A1", 0.0)),
|
||||
c1_(dict.lookupOrDefault<scalar>("c1", 0)),
|
||||
A1_(dict.lookupOrDefault<scalar>("A1", 0)),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
|
||||
@ -100,7 +100,7 @@ thermalBaffle1DFvPatchScalarField
|
||||
qs_(p.size(), 0),
|
||||
solidDict_(dict),
|
||||
solidPtr_(),
|
||||
qrPrevious_(p.size(), 0.0),
|
||||
qrPrevious_(p.size(), Zero),
|
||||
qrRelaxation_
|
||||
(
|
||||
dict.lookupOrDefaultCompat("qrRelaxation", {{"relaxation", 1712}}, 1)
|
||||
@ -365,7 +365,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
patch().template lookupPatchField<volScalarField, scalar>(TName_);
|
||||
|
||||
|
||||
scalarField qr(Tp.size(), 0.0);
|
||||
scalarField qr(Tp.size(), Zero);
|
||||
|
||||
if (qrName_ != "none")
|
||||
{
|
||||
@ -386,7 +386,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
||||
mapDist.distribute(nbrTp);
|
||||
|
||||
// solid properties
|
||||
scalarField kappas(patch().size(), 0.0);
|
||||
scalarField kappas(patch().size(), Zero);
|
||||
forAll(kappas, i)
|
||||
{
|
||||
kappas[i] = solid().kappa(0.0, (Tp[i] + nbrTp[i])/2.0);
|
||||
|
||||
@ -189,8 +189,8 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
|
||||
);
|
||||
|
||||
// Swap to obtain full local values of neighbour internal field
|
||||
tmp<scalarField> nbrIntFld(new scalarField(nbrField.size(), 0.0));
|
||||
tmp<scalarField> nbrKDelta(new scalarField(nbrField.size(), 0.0));
|
||||
tmp<scalarField> nbrIntFld(new scalarField(nbrField.size(), Zero));
|
||||
tmp<scalarField> nbrKDelta(new scalarField(nbrField.size(), Zero));
|
||||
|
||||
if (contactRes_ == 0.0)
|
||||
{
|
||||
|
||||
@ -219,13 +219,13 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
|
||||
scalarField KDelta(kappa(Tp)*patch().deltaCoeffs());
|
||||
|
||||
scalarField qr(Tp.size(), 0.0);
|
||||
scalarField qr(Tp.size(), Zero);
|
||||
if (qrName_ != "none")
|
||||
{
|
||||
qr = patch().lookupPatchField<volScalarField, scalar>(qrName_);
|
||||
}
|
||||
|
||||
scalarField qrNbr(Tp.size(), 0.0);
|
||||
scalarField qrNbr(Tp.size(), Zero);
|
||||
if (qrNbrName_ != "none")
|
||||
{
|
||||
qrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(qrNbrName_);
|
||||
@ -260,7 +260,7 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
else
|
||||
{
|
||||
mCpDtNbr.setSize(Tp.size(), 0.0);
|
||||
mCpDtNbr.setSize(Tp.size(), Zero);
|
||||
}
|
||||
}
|
||||
|
||||
@ -285,7 +285,7 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||
else
|
||||
{
|
||||
// Issue warning?
|
||||
mCpDt.setSize(Tp.size(), 0.0);
|
||||
mCpDt.setSize(Tp.size(), Zero);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -37,8 +37,8 @@ Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
Tinf_(p.size(), 0.0),
|
||||
alphaWall_(p.size(), 0.0)
|
||||
Tinf_(p.size(), Zero),
|
||||
alphaWall_(p.size(), Zero)
|
||||
{
|
||||
refValue() = 0.0;
|
||||
refGrad() = 0.0;
|
||||
|
||||
@ -121,7 +121,7 @@ dynamicLagrangian<BasicTurbulenceModel>::dynamicLagrangian
|
||||
filterPtr_(LESfilter::New(U.mesh(), this->coeffDict())),
|
||||
filter_(filterPtr_()),
|
||||
|
||||
flm0_("flm0", flm_.dimensions(), 0.0),
|
||||
flm0_("flm0", flm_.dimensions(), Zero),
|
||||
fmm0_("fmm0", fmm_.dimensions(), VSMALL)
|
||||
{
|
||||
if (type == typeName)
|
||||
|
||||
@ -262,7 +262,7 @@ v2f<BasicTurbulenceModel>::v2f
|
||||
this->mesh_
|
||||
),
|
||||
v2Min_(dimensionedScalar("v2Min", v2_.dimensions(), SMALL)),
|
||||
fMin_(dimensionedScalar("fMin", f_.dimensions(), 0.0))
|
||||
fMin_(dimensionedScalar("fMin", f_.dimensions(), Zero))
|
||||
{
|
||||
bound(k_, this->kMin_);
|
||||
bound(epsilon_, this->epsilonMin_);
|
||||
|
||||
@ -145,8 +145,8 @@ void Foam::epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
cornerWeights_[patchi] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
G_.setSize(internalField().size(), 0.0);
|
||||
epsilon_.setSize(internalField().size(), 0.0);
|
||||
G_.setSize(internalField().size(), Zero);
|
||||
epsilon_.setSize(internalField().size(), Zero);
|
||||
|
||||
initialised_ = true;
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ Foam::nutUBlendedWallFunctionFvPatchScalarField::calcUTau
|
||||
Up -= n*(n & Up);
|
||||
const scalarField magUp(mag(Up));
|
||||
|
||||
tmp<scalarField> tuTaup(new scalarField(patch().size(), 0.0));
|
||||
tmp<scalarField> tuTaup(new scalarField(patch().size(), Zero));
|
||||
scalarField& uTaup = tuTaup.ref();
|
||||
|
||||
const scalarField& nutw = *this;
|
||||
|
||||
@ -59,7 +59,7 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcNut() const
|
||||
tmp<scalarField> tyPlus = calcYPlus(magUp);
|
||||
scalarField& yPlus = tyPlus.ref();
|
||||
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), Zero));
|
||||
scalarField& nutw = tnutw.ref();
|
||||
|
||||
forAll(yPlus, facei)
|
||||
@ -94,7 +94,7 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcYPlus
|
||||
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
||||
const scalarField& nuw = tnuw();
|
||||
|
||||
tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0));
|
||||
tmp<scalarField> tyPlus(new scalarField(patch().size(), Zero));
|
||||
scalarField& yPlus = tyPlus.ref();
|
||||
|
||||
if (roughnessHeight_ > 0.0)
|
||||
|
||||
@ -86,7 +86,7 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
||||
|
||||
const scalarField& nutw = *this;
|
||||
|
||||
tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
|
||||
tmp<scalarField> tuTau(new scalarField(patch().size(), Zero));
|
||||
scalarField& uTau = tuTau.ref();
|
||||
|
||||
forAll(uTau, facei)
|
||||
|
||||
@ -71,7 +71,7 @@ tmp<scalarField> nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus
|
||||
const scalarField& Rey
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> tuPlus(new scalarField(patch().size(), 0.0));
|
||||
tmp<scalarField> tuPlus(new scalarField(patch().size(), Zero));
|
||||
scalarField& uPlus = tuPlus.ref();
|
||||
|
||||
forAll(uPlus, facei)
|
||||
|
||||
@ -56,7 +56,7 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcNut() const
|
||||
tmp<scalarField> tyPlus = calcYPlus(magUp);
|
||||
const scalarField& yPlus = tyPlus();
|
||||
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), Zero));
|
||||
scalarField& nutw = tnutw.ref();
|
||||
|
||||
forAll(yPlus, facei)
|
||||
@ -91,7 +91,7 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcYPlus
|
||||
const tmp<scalarField> tnuw = turbModel.nu(patchi);
|
||||
const scalarField& nuw = tnuw();
|
||||
|
||||
tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0));
|
||||
tmp<scalarField> tyPlus(new scalarField(patch().size(), Zero));
|
||||
scalarField& yPlus = tyPlus.ref();
|
||||
|
||||
forAll(yPlus, facei)
|
||||
|
||||
@ -134,8 +134,8 @@ nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField
|
||||
)
|
||||
:
|
||||
nutkWallFunctionFvPatchScalarField(p, iF),
|
||||
Ks_(p.size(), 0.0),
|
||||
Cs_(p.size(), 0.0)
|
||||
Ks_(p.size(), Zero),
|
||||
Cs_(p.size(), Zero)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const
|
||||
|
||||
const scalar Cmu25 = pow025(Cmu_);
|
||||
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
|
||||
tmp<scalarField> tnutw(new scalarField(patch().size(), Zero));
|
||||
scalarField& nutw = tnutw.ref();
|
||||
|
||||
forAll(nutw, facei)
|
||||
|
||||
@ -112,7 +112,7 @@ Stokes<BasicTurbulenceModel>::nut
|
||||
{
|
||||
return tmp<scalarField>
|
||||
(
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), 0.0)
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), Zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -210,7 +210,7 @@ Foam::laminarModel<BasicTurbulenceModel>::nut
|
||||
{
|
||||
return tmp<scalarField>
|
||||
(
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), 0.0)
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), Zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ nutkAtmRoughWallFunctionFvPatchScalarField
|
||||
)
|
||||
:
|
||||
nutkWallFunctionFvPatchScalarField(p, iF),
|
||||
z0_(p.size(), 0.0)
|
||||
z0_(p.size(), Zero)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -338,7 +338,7 @@ void Foam::porosityModels::powerLawLopesdaCosta::calcForce
|
||||
vectorField& force
|
||||
) const
|
||||
{
|
||||
scalarField Udiag(U.size(), 0.0);
|
||||
scalarField Udiag(U.size(), Zero);
|
||||
const scalarField& V = mesh_.V();
|
||||
|
||||
apply(Udiag, V, rho, U);
|
||||
|
||||
@ -94,7 +94,7 @@ void Foam::combustionModels::EDC<ReactionThermo>::correct()
|
||||
tmp<volScalarField> trho(this->rho());
|
||||
const volScalarField& rho = trho();
|
||||
|
||||
scalarField tauStar(epsilon.size(), 0);
|
||||
scalarField tauStar(epsilon.size(), Zero);
|
||||
|
||||
if (version_ == EDCversions::v2016)
|
||||
{
|
||||
|
||||
@ -113,7 +113,7 @@ void Foam::reactionRateFlameAreaModels::relaxation::correct
|
||||
|
||||
const volScalarField omegaInf(correlation_.omega0Sigma(sigmaTotal));
|
||||
|
||||
dimensionedScalar sigma0("sigma0", sigma.dimensions(), 0.0);
|
||||
dimensionedScalar sigma0("sigma0", sigma.dimensions(), Zero);
|
||||
|
||||
const volScalarField tau(C_*mag(sigmaTotal));
|
||||
|
||||
|
||||
@ -158,7 +158,7 @@ diffusionMulticomponent
|
||||
YfStream_(reactions_.size(), 1.0),
|
||||
sigma_(reactions_.size(), 0.02),
|
||||
oxidantRes_(this->coeffs().lookup("oxidantRes")),
|
||||
ftCorr_(reactions_.size(), 0.0),
|
||||
ftCorr_(reactions_.size(), Zero),
|
||||
alpha_(1),
|
||||
laminarIgn_(false)
|
||||
{
|
||||
|
||||
@ -36,7 +36,7 @@ Foam::combustionModels::zoneCombustion<ReactionThermo>::filter
|
||||
{
|
||||
fvScalarMatrix& R = tR.ref();
|
||||
scalarField& Su = R.source();
|
||||
scalarField filteredField(Su.size(), 0);
|
||||
scalarField filteredField(Su.size(), Zero);
|
||||
|
||||
forAll(zoneNames_, zonei)
|
||||
{
|
||||
@ -80,7 +80,7 @@ Foam::combustionModels::zoneCombustion<ReactionThermo>::filter
|
||||
) const
|
||||
{
|
||||
scalarField& S = tS.ref();
|
||||
scalarField filteredField(S.size(), 0);
|
||||
scalarField filteredField(S.size(), Zero);
|
||||
|
||||
forAll(zoneNames_, zonei)
|
||||
{
|
||||
|
||||
@ -1285,7 +1285,7 @@ void Foam::ccm::reader::removeUnwanted()
|
||||
// Remove all faces where the owner corresponds to a removed cell
|
||||
// Adjust the nInternalFaces and patch sizes accordingly
|
||||
label adjustInternal = 0;
|
||||
labelList adjustPatchSize(patchSizes_.size(), 0);
|
||||
labelList adjustPatchSize(patchSizes_.size(), Zero);
|
||||
|
||||
label newFaceI = 0;
|
||||
label oldFaceI = nFaces_ - 1;
|
||||
@ -1515,8 +1515,8 @@ void Foam::ccm::reader::cleanupInterfaces()
|
||||
|
||||
// The patch sizes (and the start) will definitely change
|
||||
const labelList origPatchStarts(patchStartList(nInternalFaces_));
|
||||
labelList adjustPatchSize(patchSizes_.size(), 0);
|
||||
labelList bafflePatchCount(patchSizes_.size(), 0);
|
||||
labelList adjustPatchSize(patchSizes_.size(), Zero);
|
||||
labelList bafflePatchCount(patchSizes_.size(), Zero);
|
||||
|
||||
// The new dimensions after merging the domain interfaces:
|
||||
nInternalFaces_ += domInterfaces_.size();
|
||||
@ -2018,7 +2018,7 @@ void Foam::ccm::reader::mergeInplaceInterfaces()
|
||||
Info<< "interface merge faces:" << endl;
|
||||
|
||||
nMergedTotal = 0;
|
||||
labelList adjustPatchSize(patchSizes_.size(), 0);
|
||||
labelList adjustPatchSize(patchSizes_.size(), Zero);
|
||||
forAll(interfacesToMerge, mergeI)
|
||||
{
|
||||
const label patch0 = interfacePatches[interfacesToMerge[mergeI]][0];
|
||||
|
||||
@ -54,7 +54,7 @@ void Foam::meshReader::calcPointCells() const
|
||||
|
||||
// Initialize the list of labels which will hold the count of the
|
||||
// actual number of cells per point during the analysis
|
||||
labelList cellCount(nPoints, 0);
|
||||
labelList cellCount(nPoints, Zero);
|
||||
|
||||
// Note. Unlike the standard point-cell algorithm, which asks the cell for
|
||||
// the supporting point labels, we need to work based on the cell faces.
|
||||
|
||||
@ -320,7 +320,7 @@ void Foam::meshReader::createPolyBoundary()
|
||||
|
||||
// check the mesh for face mismatch
|
||||
// (faces addressed once or more than twice)
|
||||
labelList markupFaces(meshFaces_.size(), 0);
|
||||
labelList markupFaces(meshFaces_.size(), Zero);
|
||||
|
||||
forAll(cellPolys_, celli)
|
||||
{
|
||||
|
||||
@ -593,7 +593,7 @@ void Foam::polyDualMesh::dualPatch
|
||||
// 1 : done e.start()
|
||||
// 2 : done e.end()
|
||||
// 3 : done both
|
||||
labelList doneEdgeSide(meshEdges.size(), 0);
|
||||
labelList doneEdgeSide(meshEdges.size(), Zero);
|
||||
|
||||
bitSet donePoint(patch.nPoints(), false);
|
||||
|
||||
@ -1283,7 +1283,7 @@ void Foam::polyDualMesh::calcDual
|
||||
|
||||
|
||||
// Create patches
|
||||
labelList patchSizes(patches.size(), 0);
|
||||
labelList patchSizes(patches.size(), Zero);
|
||||
|
||||
forAll(dualRegion, facei)
|
||||
{
|
||||
@ -1293,7 +1293,7 @@ void Foam::polyDualMesh::calcDual
|
||||
}
|
||||
}
|
||||
|
||||
labelList patchStarts(patches.size(), 0);
|
||||
labelList patchStarts(patches.size(), Zero);
|
||||
|
||||
label facei = nInternalFaces;
|
||||
|
||||
|
||||
@ -621,8 +621,8 @@ void Foam::fileFormats::STARCDMeshReader::readBoundary
|
||||
word patchType;
|
||||
|
||||
labelList mapToFoamPatchId(1000, label(-1));
|
||||
labelList nPatchFaces(1000, label(0));
|
||||
labelList origRegion(1000, label(0));
|
||||
labelList nPatchFaces(1000, Zero);
|
||||
labelList origRegion(1000, Zero);
|
||||
patchTypes_.setSize(1000);
|
||||
|
||||
//
|
||||
|
||||
@ -37,7 +37,7 @@ void Foam::dynamicRefineFvMesh::mapNewInternalFaces
|
||||
typedef GeometricField<T, fvsPatchField, surfaceMesh> GeoField;
|
||||
|
||||
//- Make flat field for ease of looping
|
||||
Field<T> tsFld(this->nFaces(), pTraits<T>::zero);
|
||||
Field<T> tsFld(this->nFaces(), Zero);
|
||||
SubField<T>(tsFld, this->nInternalFaces()) = sFld.internalField();
|
||||
|
||||
const typename GeoField::Boundary& bFld = sFld.boundaryField();
|
||||
@ -64,7 +64,7 @@ void Foam::dynamicRefineFvMesh::mapNewInternalFaces
|
||||
{
|
||||
// Loop over all owner/neighbour cell faces
|
||||
// and find already mapped ones (master-faces):
|
||||
T tmpValue = pTraits<T>::zero;
|
||||
T tmpValue(pTraits<T>::zero);
|
||||
label counter = 0;
|
||||
|
||||
const cell& ownFaces = cells[owner[facei]];
|
||||
|
||||
@ -1725,7 +1725,7 @@ void Foam::boundaryMesh::changeFaces
|
||||
|
||||
// Count number of faces for each patch
|
||||
|
||||
labelList nFaces(patches_.size(), 0);
|
||||
labelList nFaces(patches_.size(), Zero);
|
||||
|
||||
forAll(patchIDs, facei)
|
||||
{
|
||||
|
||||
@ -1437,7 +1437,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
{
|
||||
const pointZoneMesh& pointZones = mesh.pointZones();
|
||||
|
||||
labelList rowSizes(pointZoneNames.size(), 0);
|
||||
labelList rowSizes(pointZoneNames.size(), Zero);
|
||||
|
||||
forAll(pointZoneNames, nameI)
|
||||
{
|
||||
@ -1467,7 +1467,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
{
|
||||
const faceZoneMesh& faceZones = mesh.faceZones();
|
||||
|
||||
labelList rowSizes(faceZoneNames.size(), 0);
|
||||
labelList rowSizes(faceZoneNames.size(), Zero);
|
||||
|
||||
forAll(faceZoneNames, nameI)
|
||||
{
|
||||
@ -1499,7 +1499,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
{
|
||||
const cellZoneMesh& cellZones = mesh.cellZones();
|
||||
|
||||
labelList rowSizes(cellZoneNames.size(), 0);
|
||||
labelList rowSizes(cellZoneNames.size(), Zero);
|
||||
|
||||
forAll(cellZoneNames, nameI)
|
||||
{
|
||||
@ -1693,7 +1693,7 @@ Foam::labelList Foam::fvMeshDistribute::countCells
|
||||
const labelList& distribution
|
||||
)
|
||||
{
|
||||
labelList nCells(Pstream::nProcs(), 0);
|
||||
labelList nCells(Pstream::nProcs(), Zero);
|
||||
forAll(distribution, celli)
|
||||
{
|
||||
label newProc = distribution[celli];
|
||||
|
||||
@ -357,7 +357,7 @@ void Foam::fvMeshSubset::subsetZones()
|
||||
// +1 : part of faceZone, flipped
|
||||
// -1 : ,, , unflipped
|
||||
// 0 : not part of faceZone
|
||||
labelList zone(baseMesh().nFaces(), 0);
|
||||
labelList zone(baseMesh().nFaces(), Zero);
|
||||
forAll(fz, j)
|
||||
{
|
||||
if (fz.flipMap()[j])
|
||||
@ -619,7 +619,7 @@ void Foam::fvMeshSubset::setCellSubset
|
||||
// Note that this is not really necessary - but means we can size things
|
||||
// correctly. Also makes handling coupled faces much easier.
|
||||
|
||||
labelList nCellsUsingFace(oldFaces.size(), 0);
|
||||
labelList nCellsUsingFace(oldFaces.size(), Zero);
|
||||
|
||||
label nFacesInSet = 0;
|
||||
forAll(oldFaces, oldFacei)
|
||||
@ -707,7 +707,7 @@ void Foam::fvMeshSubset::setCellSubset
|
||||
globalPatchMap = identity(oldPatches.size());
|
||||
}
|
||||
|
||||
labelList boundaryPatchSizes(nbSize, 0);
|
||||
labelList boundaryPatchSizes(nbSize, Zero);
|
||||
|
||||
|
||||
// Make a global-to-local point map
|
||||
|
||||
@ -1138,7 +1138,7 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells)
|
||||
|
||||
// Per cell the number of faces with valid cuts. Is used as quick
|
||||
// rejection to see if cell can be cut.
|
||||
labelList nCutFaces(mesh().nCells(), 0);
|
||||
labelList nCutFaces(mesh().nCells(), Zero);
|
||||
|
||||
forAll(allFaceCuts, facei)
|
||||
{
|
||||
|
||||
@ -238,8 +238,8 @@ void Foam::multiDirRefinement::refineHex8
|
||||
hexRef8 hexRefiner
|
||||
(
|
||||
mesh,
|
||||
labelList(mesh.nCells(), 0), // cellLevel
|
||||
labelList(mesh.nPoints(), 0), // pointLevel
|
||||
labelList(mesh.nCells(), Zero), // cellLevel
|
||||
labelList(mesh.nPoints(), Zero), // pointLevel
|
||||
refinementHistory
|
||||
(
|
||||
IOobject
|
||||
@ -342,7 +342,7 @@ void Foam::multiDirRefinement::refineHex8
|
||||
{
|
||||
addedCells_[consistentCells[i]].setSize(8);
|
||||
}
|
||||
labelList nAddedCells(addedCells_.size(), 0);
|
||||
labelList nAddedCells(addedCells_.size(), Zero);
|
||||
|
||||
const labelList& cellMap = morphMap.cellMap();
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ Foam::wallLayerCells::wallLayerCells
|
||||
{
|
||||
const face& f = mesh.faces()[facei];
|
||||
|
||||
point mid(0.0, 0.0, 0.0);
|
||||
point mid(Zero);
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
|
||||
@ -239,7 +239,7 @@ void Foam::displacementInterpolationMotionSolver::calcInterpolation()
|
||||
// ~~~~~~~~~~~~~~~
|
||||
|
||||
// Count all the points inbetween rangeI and rangeI+1
|
||||
labelList nRangePoints(rangeToCoord.size(), 0);
|
||||
labelList nRangePoints(rangeToCoord.size(), Zero);
|
||||
|
||||
forAll(meshCoords, pointi)
|
||||
{
|
||||
|
||||
@ -949,7 +949,7 @@ void Foam::polyMeshAdder::mergePointZones
|
||||
// Extract back into zones
|
||||
|
||||
// 1. Count
|
||||
labelList nPoints(zoneNames.size(), 0);
|
||||
labelList nPoints(zoneNames.size(), Zero);
|
||||
forAll(pointToZone, allPointi)
|
||||
{
|
||||
label zoneI = pointToZone[allPointi];
|
||||
@ -1127,7 +1127,7 @@ void Foam::polyMeshAdder::mergeFaceZones
|
||||
// Extract back into zones
|
||||
|
||||
// 1. Count
|
||||
labelList nFaces(zoneNames.size(), 0);
|
||||
labelList nFaces(zoneNames.size(), Zero);
|
||||
forAll(faceToZone, allFacei)
|
||||
{
|
||||
label zoneI = faceToZone[allFacei];
|
||||
@ -1271,7 +1271,7 @@ void Foam::polyMeshAdder::mergeCellZones
|
||||
// Extract back into zones
|
||||
|
||||
// 1. Count
|
||||
labelList nCells(zoneNames.size(), 0);
|
||||
labelList nCells(zoneNames.size(), Zero);
|
||||
forAll(cellToZone, allCelli)
|
||||
{
|
||||
label zoneI = cellToZone[allCelli];
|
||||
@ -1506,7 +1506,7 @@ Foam::autoPtr<Foam::polyMesh> Foam::polyMeshAdder::add
|
||||
label nCells;
|
||||
|
||||
// Sizes per patch
|
||||
labelList nFaces(allPatchNames.size(), 0);
|
||||
labelList nFaces(allPatchNames.size(), Zero);
|
||||
|
||||
// Maps
|
||||
labelList from0ToAllFaces(mesh0.nFaces(), -1);
|
||||
@ -1720,7 +1720,7 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
||||
labelList allNeighbour;
|
||||
label nInternalFaces;
|
||||
// Sizes per patch
|
||||
labelList nFaces(allPatchNames.size(), 0);
|
||||
labelList nFaces(allPatchNames.size(), Zero);
|
||||
label nCells;
|
||||
|
||||
// Maps
|
||||
|
||||
@ -108,7 +108,7 @@ Foam::label Foam::polyMeshFilter::filterFacesLoop(const label nOriginalBadFaces)
|
||||
label nOuterIterations = 0;
|
||||
|
||||
// Maintain the number of times a point has been part of a bad face
|
||||
labelList pointErrorCount(mesh_.nPoints(), 0);
|
||||
labelList pointErrorCount(mesh_.nPoints(), Zero);
|
||||
|
||||
bitSet newErrorPoint(mesh_.nPoints());
|
||||
edgeCollapser::checkMeshQuality
|
||||
@ -1011,7 +1011,7 @@ Foam::label Foam::polyMeshFilter::filterEdges
|
||||
minEdgeLen_.resize(mesh_.nEdges(), minLen());
|
||||
faceFilterFactor_.resize(0);
|
||||
|
||||
labelList pointErrorCount(mesh_.nPoints(), 0);
|
||||
labelList pointErrorCount(mesh_.nPoints(), Zero);
|
||||
|
||||
// Main loop
|
||||
// ~~~~~~~~~
|
||||
|
||||
@ -1112,7 +1112,7 @@ void Foam::addPatchCellLayer::setRefinement
|
||||
// ~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
{
|
||||
labelList n(mesh_.nPoints(), 0);
|
||||
labelList n(mesh_.nPoints(), Zero);
|
||||
labelUIndList(n, meshPoints) = nPointLayers;
|
||||
syncTools::syncPointList(mesh_, n, maxEqOp<label>(), label(0));
|
||||
|
||||
@ -1136,7 +1136,7 @@ void Foam::addPatchCellLayer::setRefinement
|
||||
|
||||
// Check that nPointLayers equals the max layers of connected faces
|
||||
// (or 0). Anything else makes no sense.
|
||||
labelList nFromFace(mesh_.nPoints(), 0);
|
||||
labelList nFromFace(mesh_.nPoints(), Zero);
|
||||
forAll(nFaceLayers, i)
|
||||
{
|
||||
const face& f = pp[i];
|
||||
|
||||
@ -558,7 +558,7 @@ void Foam::combineFaces::setRefinement
|
||||
}
|
||||
|
||||
// Running count of number of faces using a point
|
||||
labelList nPointFaces(mesh_.nPoints(), 0);
|
||||
labelList nPointFaces(mesh_.nPoints(), Zero);
|
||||
|
||||
const labelListList& pointFaces = mesh_.pointFaces();
|
||||
|
||||
|
||||
@ -1939,7 +1939,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory)
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
labelList(mesh_.nCells(), 0)
|
||||
labelList(mesh_.nCells(), Zero)
|
||||
),
|
||||
pointLevel_
|
||||
(
|
||||
@ -1952,7 +1952,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory)
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
labelList(mesh_.nPoints(), 0)
|
||||
labelList(mesh_.nPoints(), Zero)
|
||||
),
|
||||
level0Edge_
|
||||
(
|
||||
@ -2553,7 +2553,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement
|
||||
|
||||
// Determine per point the max cell level. (done as count, not
|
||||
// as cell level purely for ease)
|
||||
labelList maxPointCount(mesh_.nPoints(), 0);
|
||||
labelList maxPointCount(mesh_.nPoints(), Zero);
|
||||
|
||||
forAll(maxPointCount, pointi)
|
||||
{
|
||||
@ -3624,7 +3624,7 @@ Foam::labelListList Foam::hexRef8::setRefinement
|
||||
labelListList cellAnchorPoints(mesh_.nCells());
|
||||
|
||||
{
|
||||
labelList nAnchorPoints(mesh_.nCells(), 0);
|
||||
labelList nAnchorPoints(mesh_.nCells(), Zero);
|
||||
|
||||
forAll(cellMidPoint, celli)
|
||||
{
|
||||
@ -4882,7 +4882,7 @@ void Foam::hexRef8::checkRefinementLevels
|
||||
if (maxPointDiff != -1)
|
||||
{
|
||||
// Determine per point the max cell level.
|
||||
labelList maxPointLevel(mesh_.nPoints(), 0);
|
||||
labelList maxPointLevel(mesh_.nPoints(), Zero);
|
||||
|
||||
forAll(maxPointLevel, pointi)
|
||||
{
|
||||
@ -5091,7 +5091,7 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const
|
||||
// -2 certainly not split point
|
||||
// >= label of master cell
|
||||
labelList splitMaster(mesh_.nPoints(), -1);
|
||||
labelList splitMasterLevel(mesh_.nPoints(), 0);
|
||||
labelList splitMasterLevel(mesh_.nPoints(), Zero);
|
||||
|
||||
// Unmark all with not 8 cells
|
||||
//const labelListList& pointCells = mesh_.pointCells();
|
||||
|
||||
@ -261,7 +261,10 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
||||
IOobject rio(io);
|
||||
rio.rename("cellLevel");
|
||||
rio.readOpt() = IOobject::NO_READ;
|
||||
cellLevelPtr_.reset(new labelIOList(rio, labelList(mesh.nCells(), 0)));
|
||||
cellLevelPtr_.reset
|
||||
(
|
||||
new labelIOList(rio, labelList(mesh.nCells(), Zero))
|
||||
);
|
||||
}
|
||||
|
||||
bool hasPointLevel = returnReduce(pointLevelPtr_.valid(), orOp<bool>());
|
||||
@ -272,7 +275,7 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
||||
rio.readOpt() = IOobject::NO_READ;
|
||||
pointLevelPtr_.reset
|
||||
(
|
||||
new labelIOList(rio, labelList(mesh.nPoints(), 0))
|
||||
new labelIOList(rio, labelList(mesh.nPoints(), Zero))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1028,7 +1028,7 @@ Foam::autoPtr<Foam::refinementHistory> Foam::refinementHistory::clone
|
||||
if (active_)
|
||||
{
|
||||
// Mark selected cells with '1'
|
||||
labelList decomposition(visibleCells_.size(), 0);
|
||||
labelList decomposition(visibleCells_.size(), Zero);
|
||||
forAll(cellMap, i)
|
||||
{
|
||||
decomposition[cellMap[i]] = 1;
|
||||
@ -1039,7 +1039,7 @@ Foam::autoPtr<Foam::refinementHistory> Foam::refinementHistory::clone
|
||||
labelList splitCellProc(splitCells_.size(), -1);
|
||||
// Per splitCell entry the number of live cells that move to that
|
||||
// processor
|
||||
labelList splitCellNum(splitCells_.size(), 0);
|
||||
labelList splitCellNum(splitCells_.size(), Zero);
|
||||
|
||||
forAll(visibleCells_, cellI)
|
||||
{
|
||||
@ -1283,7 +1283,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
||||
// Per splitCell entry the processor it moves to
|
||||
labelList splitCellProc(splitCells_.size(), -1);
|
||||
// Per splitCell entry the number of live cells that move to that processor
|
||||
labelList splitCellNum(splitCells_.size(), 0);
|
||||
labelList splitCellNum(splitCells_.size(), Zero);
|
||||
|
||||
forAll(visibleCells_, celli)
|
||||
{
|
||||
|
||||
@ -456,7 +456,7 @@ void Foam::polyTopoChange::makeCells
|
||||
cellFaceOffsets.setSize(cellMap_.size() + 1);
|
||||
|
||||
// Faces per cell
|
||||
labelList nNbrs(cellMap_.size(), 0);
|
||||
labelList nNbrs(cellMap_.size(), Zero);
|
||||
|
||||
// 1. Count faces per cell
|
||||
|
||||
@ -539,7 +539,7 @@ void Foam::polyTopoChange::makeCellCells
|
||||
) const
|
||||
{
|
||||
// Neighbours per cell
|
||||
labelList nNbrs(cellMap_.size(), 0);
|
||||
labelList nNbrs(cellMap_.size(), Zero);
|
||||
|
||||
// 1. Count neighbours (through internal faces) per cell
|
||||
|
||||
@ -1543,7 +1543,7 @@ void Foam::polyTopoChange::resetZones
|
||||
|
||||
// Count points per zone
|
||||
|
||||
labelList nPoints(pointZones.size(), 0);
|
||||
labelList nPoints(pointZones.size(), Zero);
|
||||
|
||||
forAllConstIters(pointZone_, iter)
|
||||
{
|
||||
@ -1629,7 +1629,7 @@ void Foam::polyTopoChange::resetZones
|
||||
{
|
||||
const faceZoneMesh& faceZones = mesh.faceZones();
|
||||
|
||||
labelList nFaces(faceZones.size(), 0);
|
||||
labelList nFaces(faceZones.size(), Zero);
|
||||
|
||||
forAllConstIters(faceZone_, iter)
|
||||
{
|
||||
@ -1744,7 +1744,7 @@ void Foam::polyTopoChange::resetZones
|
||||
{
|
||||
const cellZoneMesh& cellZones = mesh.cellZones();
|
||||
|
||||
labelList nCells(cellZones.size(), 0);
|
||||
labelList nCells(cellZones.size(), Zero);
|
||||
|
||||
forAll(cellZone_, celli)
|
||||
{
|
||||
@ -1885,7 +1885,7 @@ void Foam::polyTopoChange::reorderCoupledFaces
|
||||
labelList oldToNew(identity(faces_.size()));
|
||||
|
||||
// Rotation on new faces.
|
||||
labelList rotation(faces_.size(), 0);
|
||||
labelList rotation(faces_.size(), Zero);
|
||||
|
||||
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||
|
||||
@ -1925,7 +1925,7 @@ void Foam::polyTopoChange::reorderCoupledFaces
|
||||
if (syncParallel || !isA<processorPolyPatch>(boundary[patchi]))
|
||||
{
|
||||
labelList patchFaceMap(patchSizes[patchi], -1);
|
||||
labelList patchFaceRotation(patchSizes[patchi], 0);
|
||||
labelList patchFaceRotation(patchSizes[patchi], Zero);
|
||||
|
||||
const bool changed = boundary[patchi].order
|
||||
(
|
||||
|
||||
@ -99,7 +99,7 @@ Foam::labelList Foam::removeCells::getExposedFaces
|
||||
const labelList& faceNeighbour = mesh_.faceNeighbour();
|
||||
|
||||
// Count cells using face.
|
||||
labelList nCellsUsingFace(mesh_.nFaces(), 0);
|
||||
labelList nCellsUsingFace(mesh_.nFaces(), Zero);
|
||||
|
||||
for (label facei = 0; facei < mesh_.nInternalFaces(); ++facei)
|
||||
{
|
||||
@ -264,7 +264,7 @@ void Foam::removeCells::setRefinement
|
||||
|
||||
// Count starting number of faces using each point.
|
||||
// Update whenever removing a face.
|
||||
labelList nFacesUsingPoint(mesh_.nPoints(), 0);
|
||||
labelList nFacesUsingPoint(mesh_.nPoints(), Zero);
|
||||
|
||||
for (const face& f : faces)
|
||||
{
|
||||
|
||||
@ -689,7 +689,7 @@ Foam::label Foam::removeFaces::compatibleRemoves
|
||||
// - master is lowest numbered in any region
|
||||
// - regions have more than 1 cell
|
||||
{
|
||||
labelList nCells(regionMaster.size(), 0);
|
||||
labelList nCells(regionMaster.size(), Zero);
|
||||
|
||||
forAll(cellRegion, celli)
|
||||
{
|
||||
|
||||
@ -42,7 +42,7 @@ namespace Foam
|
||||
Foam::fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(const IOobject& io)
|
||||
:
|
||||
engineMesh(io),
|
||||
pistonLayers_("pistonLayers", dimLength, 0.0),
|
||||
pistonLayers_("pistonLayers", dimLength, Zero),
|
||||
motionSolver_
|
||||
(
|
||||
*this,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user