Use Zero rather than pTraits<Type>::zero unless a static typed '0' is required
This commit is contained in:
parent
aa89254c79
commit
730f89dc9d
@ -122,7 +122,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
ns.internalField() = nsv.internalField()*Cw;
|
||||
|
@ -108,7 +108,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
|
||||
(
|
||||
"zero",
|
||||
dimMass/dimTime/pow(dimLength, 3),
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -131,7 +131,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
||||
(
|
||||
"zero",
|
||||
nsv.dimensions(),
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0);
|
||||
|
@ -60,7 +60,7 @@ void zeroCells
|
||||
{
|
||||
forAll(cells, i)
|
||||
{
|
||||
vf[cells[i]] = pTraits<Type>::zero;
|
||||
vf[cells[i]] = Zero;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ void Foam::BlendedInterfacialModel<ModelType>::correctFixedFluxBCs
|
||||
)
|
||||
{
|
||||
field.boundaryField()[patchI]
|
||||
= pTraits<typename GeometricField::value_type>::zero;
|
||||
= Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -382,7 +382,7 @@ Foam::BlendedInterfacialModel<ModelType>::F() const
|
||||
false
|
||||
),
|
||||
phase1_.mesh(),
|
||||
dimensioned<Type>("zero", ModelType::dimF, pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", ModelType::dimF, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -47,7 +47,7 @@ void Foam::BlendedInterfacialModel<modelType>::correctFixedFluxBCs
|
||||
)
|
||||
{
|
||||
field.boundaryField()[patchI]
|
||||
= pTraits<typename GeometricField::value_type>::zero;
|
||||
= Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -280,7 +280,7 @@ Foam::BlendedInterfacialModel<modelType>::F() const
|
||||
false
|
||||
),
|
||||
pair_.phase1().mesh(),
|
||||
dimensioned<Type>("zero", modelType::dimF, pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", modelType::dimF, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -147,7 +147,7 @@ int main(int argc, char *argv[])
|
||||
const volVectorField& fld = mesh.C();
|
||||
|
||||
// 1. Construct cell data in compact addressing
|
||||
List<point> compactFld(map.constructSize(), pTraits<point>::zero);
|
||||
List<point> compactFld(map.constructSize(), Zero);
|
||||
|
||||
// Insert my internal values
|
||||
forAll(fld, cellI)
|
||||
|
@ -781,7 +781,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<scalar>::zero,
|
||||
scalar(Zero),
|
||||
volScalarField::typeName,
|
||||
scalarFlds
|
||||
);
|
||||
@ -793,7 +793,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<vector>::zero,
|
||||
vector(Zero),
|
||||
volVectorField::typeName,
|
||||
vectorFlds
|
||||
);
|
||||
@ -811,7 +811,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<sphericalTensor>::zero,
|
||||
sphericalTensor(Zero),
|
||||
volSphericalTensorField::typeName,
|
||||
sphericalTensorFlds
|
||||
);
|
||||
@ -823,7 +823,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<symmTensor>::zero,
|
||||
symmTensor(Zero),
|
||||
volSymmTensorField::typeName,
|
||||
symmTensorFlds
|
||||
);
|
||||
@ -835,7 +835,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<tensor>::zero,
|
||||
tensor(Zero),
|
||||
volTensorField::typeName,
|
||||
tensorFlds
|
||||
);
|
||||
@ -849,7 +849,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<scalar>::zero,
|
||||
scalar(Zero),
|
||||
surfaceScalarField::typeName,
|
||||
surfScalarFlds
|
||||
);
|
||||
@ -861,7 +861,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<vector>::zero,
|
||||
vector(Zero),
|
||||
surfaceVectorField::typeName,
|
||||
surfVectorFlds
|
||||
);
|
||||
@ -879,7 +879,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<sphericalTensor>::zero,
|
||||
sphericalTensor(Zero),
|
||||
surfaceSphericalTensorField::typeName,
|
||||
surfSphericalTensorFlds
|
||||
);
|
||||
@ -899,7 +899,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<symmTensor>::zero,
|
||||
symmTensor(Zero),
|
||||
surfaceSymmTensorField::typeName,
|
||||
surfSymmTensorFlds
|
||||
);
|
||||
@ -911,7 +911,7 @@ int main(int argc, char *argv[])
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
pTraits<tensor>::zero,
|
||||
tensor(Zero),
|
||||
surfaceTensorField::typeName,
|
||||
surfTensorFlds
|
||||
);
|
||||
|
@ -182,7 +182,7 @@ void subsetVolFields
|
||||
if (addedPatches.found(patchI))
|
||||
{
|
||||
tSubFld.ref().boundaryField()[patchI] ==
|
||||
pTraits<typename GeoField::value_type>::zero;
|
||||
typename GeoField::value_type(Zero);
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ void subsetSurfaceFields
|
||||
if (addedPatches.found(patchI))
|
||||
{
|
||||
tSubFld.ref().boundaryField()[patchI] ==
|
||||
pTraits<typename GeoField::value_type>::zero;
|
||||
typename GeoField::value_type(Zero);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ void Foam::helpTypes::helpBoundary::fixedValueFieldConditions
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", dimless, Zero)
|
||||
);
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -102,7 +102,7 @@ void ensightCloudField
|
||||
|
||||
if (mag(v) < 1.0e-90)
|
||||
{
|
||||
v = pTraits<Type>::zero;
|
||||
v = Zero;
|
||||
}
|
||||
|
||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
||||
|
@ -182,7 +182,7 @@ void Foam::ensightLagrangianField
|
||||
|
||||
if (mag(val) < 1.0e-90)
|
||||
{
|
||||
val = pTraits<Type>::zero;
|
||||
val = Zero;
|
||||
}
|
||||
|
||||
for (direction cmpt=0; cmpt < pTraits<Type>::nComponents; cmpt++)
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -86,7 +86,7 @@ void ReadAndMapFields
|
||||
(
|
||||
"zero",
|
||||
readField.dimensions(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -252,7 +252,7 @@ int main(int argc, char *argv[])
|
||||
objects,
|
||||
tetDualMesh,
|
||||
pointDualAddressing,
|
||||
pTraits<scalar>::zero, // nullValue
|
||||
Zero, // nullValue
|
||||
psFlds
|
||||
);
|
||||
|
||||
@ -263,7 +263,7 @@ int main(int argc, char *argv[])
|
||||
objects,
|
||||
tetDualMesh,
|
||||
pointDualAddressing,
|
||||
pTraits<vector>::zero, // nullValue
|
||||
Zero, // nullValue
|
||||
pvFlds
|
||||
);
|
||||
|
||||
@ -274,7 +274,7 @@ int main(int argc, char *argv[])
|
||||
objects,
|
||||
tetDualMesh,
|
||||
pointDualAddressing,
|
||||
pTraits<sphericalTensor>::zero, // nullValue
|
||||
Zero, // nullValue
|
||||
pstFlds
|
||||
);
|
||||
|
||||
@ -285,7 +285,7 @@ int main(int argc, char *argv[])
|
||||
objects,
|
||||
tetDualMesh,
|
||||
pointDualAddressing,
|
||||
pTraits<symmTensor>::zero, // nullValue
|
||||
Zero, // nullValue
|
||||
psymmtFlds
|
||||
);
|
||||
|
||||
@ -296,7 +296,7 @@ int main(int argc, char *argv[])
|
||||
objects,
|
||||
tetDualMesh,
|
||||
pointDualAddressing,
|
||||
pTraits<tensor>::zero, // nullValue
|
||||
Zero, // nullValue
|
||||
ptFlds
|
||||
);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,7 +30,7 @@ License
|
||||
template<class T>
|
||||
Foam::Field<T> Foam::channelIndex::regionSum(const Field<T>& cellField) const
|
||||
{
|
||||
Field<T> regionField(cellRegion_().nRegions(), pTraits<T>::zero);
|
||||
Field<T> regionField(cellRegion_().nRegions(), Zero);
|
||||
|
||||
forAll(cellRegion_(), cellI)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,7 +51,7 @@ void printAverage
|
||||
FieldType field(fieldHeader, mesh);
|
||||
|
||||
typename FieldType::value_type sumField =
|
||||
pTraits<typename FieldType::value_type>::zero;
|
||||
Zero;
|
||||
|
||||
if (area > 0)
|
||||
{
|
||||
|
@ -584,8 +584,8 @@ int main(int argc, char *argv[])
|
||||
// I need coarse Sf (Ai), fine Sf (dAi) and fine Cf(r) to calculate Fij
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
pointField compactCoarseCf(map.constructSize(), pTraits<vector>::zero);
|
||||
pointField compactCoarseSf(map.constructSize(), pTraits<vector>::zero);
|
||||
pointField compactCoarseCf(map.constructSize(), Zero);
|
||||
pointField compactCoarseSf(map.constructSize(), Zero);
|
||||
List<List<point>> compactFineSf(map.constructSize());
|
||||
List<List<point>> compactFineCf(map.constructSize());
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,8 +34,8 @@ namespace Foam
|
||||
|
||||
atmBoundaryLayer::atmBoundaryLayer()
|
||||
:
|
||||
flowDir_(pTraits<vector>::zero),
|
||||
zDir_(pTraits<vector>::zero),
|
||||
flowDir_(Zero),
|
||||
zDir_(Zero),
|
||||
kappa_(0.41),
|
||||
Cmu_(0.09),
|
||||
Uref_(0),
|
||||
|
@ -209,9 +209,9 @@ nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField
|
||||
)
|
||||
:
|
||||
nutWallFunctionFvPatchScalarField(p, iF),
|
||||
roughnessHeight_(pTraits<scalar>::zero),
|
||||
roughnessConstant_(pTraits<scalar>::zero),
|
||||
roughnessFactor_(pTraits<scalar>::zero)
|
||||
roughnessHeight_(Zero),
|
||||
roughnessConstant_(Zero),
|
||||
roughnessFactor_(Zero)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -2215,11 +2215,11 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
|
||||
// from nothing so explicitly reset.
|
||||
initPatchFields<volScalarField, processorFvPatchField<scalar>>
|
||||
(
|
||||
pTraits<scalar>::zero
|
||||
Zero
|
||||
);
|
||||
initPatchFields<volVectorField, processorFvPatchField<vector>>
|
||||
(
|
||||
pTraits<vector>::zero
|
||||
Zero
|
||||
);
|
||||
initPatchFields
|
||||
<
|
||||
@ -2227,24 +2227,24 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
|
||||
processorFvPatchField<sphericalTensor>
|
||||
>
|
||||
(
|
||||
pTraits<sphericalTensor>::zero
|
||||
Zero
|
||||
);
|
||||
initPatchFields<volSymmTensorField, processorFvPatchField<symmTensor>>
|
||||
(
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
);
|
||||
initPatchFields<volTensorField, processorFvPatchField<tensor>>
|
||||
(
|
||||
pTraits<tensor>::zero
|
||||
Zero
|
||||
);
|
||||
|
||||
initPatchFields<surfaceScalarField, processorFvsPatchField<scalar>>
|
||||
(
|
||||
pTraits<scalar>::zero
|
||||
Zero
|
||||
);
|
||||
initPatchFields<surfaceVectorField, processorFvsPatchField<vector>>
|
||||
(
|
||||
pTraits<vector>::zero
|
||||
Zero
|
||||
);
|
||||
initPatchFields
|
||||
<
|
||||
@ -2252,7 +2252,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
|
||||
processorFvsPatchField<sphericalTensor>
|
||||
>
|
||||
(
|
||||
pTraits<sphericalTensor>::zero
|
||||
Zero
|
||||
);
|
||||
initPatchFields
|
||||
<
|
||||
@ -2260,11 +2260,11 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
|
||||
processorFvsPatchField<symmTensor>
|
||||
>
|
||||
(
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
);
|
||||
initPatchFields<surfaceTensorField, processorFvsPatchField<tensor>>
|
||||
(
|
||||
pTraits<tensor>::zero
|
||||
Zero
|
||||
);
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -107,35 +107,35 @@ Foam::label Foam::fvMeshTools::addPatch
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<scalar>::zero
|
||||
Zero
|
||||
);
|
||||
addPatchFields<volVectorField>
|
||||
(
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<vector>::zero
|
||||
Zero
|
||||
);
|
||||
addPatchFields<volSphericalTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<sphericalTensor>::zero
|
||||
Zero
|
||||
);
|
||||
addPatchFields<volSymmTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
);
|
||||
addPatchFields<volTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<tensor>::zero
|
||||
Zero
|
||||
);
|
||||
|
||||
// Surface fields
|
||||
@ -145,35 +145,35 @@ Foam::label Foam::fvMeshTools::addPatch
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<scalar>::zero
|
||||
Zero
|
||||
);
|
||||
addPatchFields<surfaceVectorField>
|
||||
(
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<vector>::zero
|
||||
Zero
|
||||
);
|
||||
addPatchFields<surfaceSphericalTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<sphericalTensor>::zero
|
||||
Zero
|
||||
);
|
||||
addPatchFields<surfaceSymmTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
);
|
||||
addPatchFields<surfaceTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchFieldDict,
|
||||
defaultPatchFieldType,
|
||||
pTraits<tensor>::zero
|
||||
Zero
|
||||
);
|
||||
|
||||
// Create reordering list
|
||||
@ -237,36 +237,36 @@ void Foam::fvMeshTools::setPatchFields
|
||||
|
||||
void Foam::fvMeshTools::zeroPatchFields(fvMesh& mesh, const label patchI)
|
||||
{
|
||||
setPatchFields<volScalarField>(mesh, patchI, pTraits<scalar>::zero);
|
||||
setPatchFields<volVectorField>(mesh, patchI, pTraits<vector>::zero);
|
||||
setPatchFields<volScalarField>(mesh, patchI, Zero);
|
||||
setPatchFields<volVectorField>(mesh, patchI, Zero);
|
||||
setPatchFields<volSphericalTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchI,
|
||||
pTraits<sphericalTensor>::zero
|
||||
Zero
|
||||
);
|
||||
setPatchFields<volSymmTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchI,
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
);
|
||||
setPatchFields<volTensorField>(mesh, patchI, pTraits<tensor>::zero);
|
||||
setPatchFields<surfaceScalarField>(mesh, patchI, pTraits<scalar>::zero);
|
||||
setPatchFields<surfaceVectorField>(mesh, patchI, pTraits<vector>::zero);
|
||||
setPatchFields<volTensorField>(mesh, patchI, Zero);
|
||||
setPatchFields<surfaceScalarField>(mesh, patchI, Zero);
|
||||
setPatchFields<surfaceVectorField>(mesh, patchI, Zero);
|
||||
setPatchFields<surfaceSphericalTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchI,
|
||||
pTraits<sphericalTensor>::zero
|
||||
Zero
|
||||
);
|
||||
setPatchFields<surfaceSymmTensorField>
|
||||
(
|
||||
mesh,
|
||||
patchI,
|
||||
pTraits<symmTensor>::zero
|
||||
Zero
|
||||
);
|
||||
setPatchFields<surfaceTensorField>(mesh, patchI, pTraits<tensor>::zero);
|
||||
setPatchFields<surfaceTensorField>(mesh, patchI, Zero);
|
||||
}
|
||||
|
||||
|
||||
|
@ -155,7 +155,7 @@ Foam::motionSmootherAlgo::avg
|
||||
false
|
||||
),
|
||||
fld.mesh(),
|
||||
dimensioned<Type>("zero", fld.dimensions(), pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", fld.dimensions(), Zero)
|
||||
)
|
||||
);
|
||||
GeometricField<Type, pointPatchField, pointMesh>& res = tres.ref();
|
||||
@ -197,7 +197,7 @@ Foam::motionSmootherAlgo::avg
|
||||
mesh,
|
||||
res,
|
||||
plusEqOp<Type>(),
|
||||
pTraits<Type>::zero // null value
|
||||
Type(Zero) // null value
|
||||
);
|
||||
syncTools::syncPointList
|
||||
(
|
||||
|
@ -36,7 +36,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF),
|
||||
profile_(),
|
||||
dir_(pTraits<vector>::zero),
|
||||
dir_(Zero),
|
||||
origin_(0)
|
||||
{}
|
||||
|
||||
@ -51,7 +51,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF, fld),
|
||||
profile_(),
|
||||
dir_(pTraits<vector>::zero),
|
||||
dir_(Zero),
|
||||
origin_(0)
|
||||
{}
|
||||
|
||||
|
@ -95,7 +95,7 @@ Foam::fixedValueFvsPatchField<Type>::valueInternalCoeffs
|
||||
{
|
||||
return tmp<Field<Type>>
|
||||
(
|
||||
new Field<Type>(this->size(), pTraits<Type>::zero)
|
||||
new Field<Type>(this->size(), Zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2
|
||||
(
|
||||
"0",
|
||||
vf.dimensions()/dimTime/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -95,7 +95,7 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2
|
||||
(
|
||||
"0",
|
||||
rho.dimensions()*vf.dimensions()/dimTime/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -178,7 +178,7 @@ CoEulerDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -201,7 +201,7 @@ CoEulerDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
),
|
||||
calculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
|
@ -162,7 +162,7 @@ CrankNicolsonDdtScheme<Type>::ddt0_
|
||||
(
|
||||
"0",
|
||||
dims/dimTime,
|
||||
pTraits<typename GeoField::value_type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -310,7 +310,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -68,7 +68,7 @@ EulerDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -90,7 +90,7 @@ EulerDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
),
|
||||
calculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
|
@ -178,7 +178,7 @@ SLTSDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -200,7 +200,7 @@ SLTSDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
),
|
||||
calculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
|
@ -106,7 +106,7 @@ backwardDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -130,7 +130,7 @@ backwardDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
),
|
||||
calculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
|
@ -74,7 +74,7 @@ localEulerDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -97,7 +97,7 @@ localEulerDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
),
|
||||
calculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
|
@ -61,7 +61,7 @@ steadyStateDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
dt.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -90,7 +90,7 @@ steadyStateDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
vf.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -120,7 +120,7 @@ steadyStateDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
rho.dimensions()*vf.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -150,7 +150,7 @@ steadyStateDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
rho.dimensions()*vf.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -181,7 +181,7 @@ steadyStateDdtScheme<Type>::fvcDdt
|
||||
(
|
||||
"0",
|
||||
rho.dimensions()*vf.dimensions()/dimTime,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -295,7 +295,7 @@ steadyStateDdtScheme<Type>::fvcDdtUfCorr
|
||||
(
|
||||
"0",
|
||||
Uf.dimensions()*dimArea/dimTime,
|
||||
pTraits<typename flux<Type>::type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -325,7 +325,7 @@ steadyStateDdtScheme<Type>::fvcDdtPhiCorr
|
||||
(
|
||||
"0",
|
||||
phi.dimensions()/dimTime,
|
||||
pTraits<typename flux<Type>::type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -358,7 +358,7 @@ steadyStateDdtScheme<Type>::fvcDdtUfCorr
|
||||
(
|
||||
"0",
|
||||
Uf.dimensions()*dimArea/dimTime,
|
||||
pTraits<typename flux<Type>::type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -391,7 +391,7 @@ steadyStateDdtScheme<Type>::fvcDdtPhiCorr
|
||||
(
|
||||
"0",
|
||||
phi.dimensions()/dimTime,
|
||||
pTraits<typename flux<Type>::type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -65,7 +65,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>("0", ssf.dimensions(), pTraits<Type>::zero),
|
||||
dimensioned<Type>("0", ssf.dimensions(), Zero),
|
||||
extrapolatedCalculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
);
|
||||
|
@ -79,7 +79,7 @@ reconstruct
|
||||
(
|
||||
"0",
|
||||
ssf.dimensions()/dimArea,
|
||||
pTraits<GradType>::zero
|
||||
Zero
|
||||
),
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
|
@ -102,7 +102,7 @@ surfaceIntegrate
|
||||
(
|
||||
"0",
|
||||
ssf.dimensions()/dimVol,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
),
|
||||
extrapolatedCalculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
@ -154,7 +154,7 @@ surfaceSum
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>("0", ssf.dimensions(), pTraits<Type>::zero),
|
||||
dimensioned<Type>("0", ssf.dimensions(), Zero),
|
||||
extrapolatedCalculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
);
|
||||
|
@ -75,7 +75,7 @@ Foam::fv::LeastSquaresGrad<Type, Stencil>::calcGrad
|
||||
(
|
||||
"zero",
|
||||
vtf.dimensions()/dimLength,
|
||||
pTraits<GradType>::zero
|
||||
Zero
|
||||
),
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
@ -89,7 +89,7 @@ Foam::fv::LeastSquaresGrad<Type, Stencil>::calcGrad
|
||||
|
||||
// Construct flat version of vtf
|
||||
// including all values referred to by the stencil
|
||||
List<Type> flatVtf(stencil.map().constructSize(), pTraits<Type>::zero);
|
||||
List<Type> flatVtf(stencil.map().constructSize(), Zero);
|
||||
|
||||
// Insert internal values
|
||||
forAll(vtf, celli)
|
||||
|
@ -65,7 +65,7 @@ Foam::fv::gaussGrad<Type>::gradf
|
||||
(
|
||||
"0",
|
||||
ssf.dimensions()/dimLength,
|
||||
pTraits<GradType>::zero
|
||||
Zero
|
||||
),
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
|
@ -71,7 +71,7 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad
|
||||
(
|
||||
"zero",
|
||||
vsf.dimensions()/dimLength,
|
||||
pTraits<GradType>::zero
|
||||
Zero
|
||||
),
|
||||
extrapolatedCalculatedFvPatchField<GradType>::typeName
|
||||
)
|
||||
|
@ -116,7 +116,7 @@ Foam::fv::faceCorrectedSnGrad<Type>::fullGradCorrection
|
||||
sfCorr[facei] = dCorr&fgrad;
|
||||
}
|
||||
|
||||
tsfCorr.ref().boundaryField() = pTraits<Type>::zero;
|
||||
tsfCorr.ref().boundaryField() = Zero;
|
||||
|
||||
return tsfCorr;
|
||||
}
|
||||
|
@ -249,10 +249,10 @@ void Foam::fvMatrix<Type>::setValuesFromList
|
||||
mesh.boundaryMesh()[patchi].whichFace(facei);
|
||||
|
||||
internalCoeffs_[patchi][patchFacei] =
|
||||
pTraits<Type>::zero;
|
||||
Zero;
|
||||
|
||||
boundaryCoeffs_[patchi][patchFacei] =
|
||||
pTraits<Type>::zero;
|
||||
Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -273,7 +273,7 @@ Foam::fvMatrix<Type>::fvMatrix
|
||||
lduMatrix(psi.mesh()),
|
||||
psi_(psi),
|
||||
dimensions_(ds),
|
||||
source_(psi.size(), pTraits<Type>::zero),
|
||||
source_(psi.size(), Zero),
|
||||
internalCoeffs_(psi.mesh().boundary().size()),
|
||||
boundaryCoeffs_(psi.mesh().boundary().size()),
|
||||
faceFluxCorrectionPtr_(NULL)
|
||||
@ -293,7 +293,7 @@ Foam::fvMatrix<Type>::fvMatrix
|
||||
new Field<Type>
|
||||
(
|
||||
psi.mesh().boundary()[patchI].size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
|
||||
@ -303,7 +303,7 @@ Foam::fvMatrix<Type>::fvMatrix
|
||||
new Field<Type>
|
||||
(
|
||||
psi.mesh().boundary()[patchI].size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -433,7 +433,7 @@ Foam::fvMatrix<Type>::fvMatrix
|
||||
new Field<Type>
|
||||
(
|
||||
psi.mesh().boundary()[patchI].size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
|
||||
@ -443,7 +443,7 @@ Foam::fvMatrix<Type>::fvMatrix
|
||||
new Field<Type>
|
||||
(
|
||||
psi.mesh().boundary()[patchI].size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -2292,7 +2292,7 @@ Foam::operator&
|
||||
}
|
||||
else
|
||||
{
|
||||
Mphi.internalField() = pTraits<Type>::zero;
|
||||
Mphi.internalField() = Zero;
|
||||
}
|
||||
|
||||
Mphi.internalField() += M.lduMatrix::H(psi.field()) + M.source();
|
||||
|
@ -70,7 +70,7 @@ Foam::tmp
|
||||
(
|
||||
fld.name(),
|
||||
fld.dimensions(),
|
||||
pTraits<WeightedType>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -37,7 +37,7 @@ void Foam::extendedCellToFaceStencil::collectData
|
||||
)
|
||||
{
|
||||
// 1. Construct cell data in compact addressing
|
||||
List<Type> flatFld(map.constructSize(), pTraits<Type>::zero);
|
||||
List<Type> flatFld(map.constructSize(), Zero);
|
||||
|
||||
// Insert my internal values
|
||||
forAll(fld, cellI)
|
||||
@ -114,7 +114,7 @@ Foam::extendedCellToFaceStencil::weightedSum
|
||||
(
|
||||
fld.name(),
|
||||
fld.dimensions(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -63,7 +63,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum
|
||||
(
|
||||
fld.name(),
|
||||
fld.dimensions(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -37,7 +37,7 @@ void Foam::extendedFaceToCellStencil::collectData
|
||||
)
|
||||
{
|
||||
// 1. Construct face data in compact addressing
|
||||
List<Type> flatFld(map.constructSize(), pTraits<Type>::zero);
|
||||
List<Type> flatFld(map.constructSize(), Zero);
|
||||
|
||||
// Insert my internal values
|
||||
forAll(fld, cellI)
|
||||
@ -108,7 +108,7 @@ Foam::extendedFaceToCellStencil::weightedSum
|
||||
(
|
||||
fld.name(),
|
||||
fld.dimensions(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -68,7 +68,7 @@ Type Foam::interpolationCellPointFace<Type>::interpolate
|
||||
scalar phi[4], phiCandidate[4];
|
||||
label tetLabelCandidate[2], tetPointLabels[2];
|
||||
|
||||
Type t = pTraits<Type>::zero;
|
||||
Type t = Zero;
|
||||
|
||||
// only use face information when the position is on a face
|
||||
if (faceI < 0)
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,7 +35,7 @@ inline Type Foam::pointMVCWeight::interpolate
|
||||
{
|
||||
const labelList& vertices = psip.mesh()().cellPoints()[cellIndex_];
|
||||
|
||||
Type t = pTraits<Type>::zero;
|
||||
Type t = Zero;
|
||||
forAll(vertices, i)
|
||||
{
|
||||
t += psip[vertices[i]]*weights_[i];
|
||||
|
@ -175,7 +175,7 @@ public:
|
||||
{
|
||||
if (!sfCorr.boundaryField()[pi].coupled())
|
||||
{
|
||||
sfCorr.boundaryField()[pi] = pTraits<Type>::zero;
|
||||
sfCorr.boundaryField()[pi] = Zero;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ Foam::linearUpwind<Type>::correction
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>(vf.name(), vf.dimensions(), pTraits<Type>::zero)
|
||||
dimensioned<Type>(vf.name(), vf.dimensions(), Zero)
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -57,7 +57,7 @@ Foam::linearUpwindV<Type>::correction
|
||||
(
|
||||
vf.name(),
|
||||
vf.dimensions(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -222,7 +222,7 @@ public:
|
||||
if (mesh_.isInternalFace(facei))
|
||||
{
|
||||
// Remove correction
|
||||
corr[facei] = pTraits<Type>::zero;
|
||||
corr[facei] = Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ correction
|
||||
}
|
||||
else
|
||||
{
|
||||
pSfCorr = pTraits<Type>::zero;
|
||||
pSfCorr = Zero;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ public:
|
||||
(
|
||||
vf.name(),
|
||||
vf.dimensions(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -143,7 +143,7 @@ void Foam::volPointInterpolation::interpolateInternalField
|
||||
const scalarList& pw = pointWeights_[pointi];
|
||||
const labelList& ppc = pointCells[pointi];
|
||||
|
||||
pf[pointi] = pTraits<Type>::zero;
|
||||
pf[pointi] = Zero;
|
||||
|
||||
forAll(ppc, pointCelli)
|
||||
{
|
||||
@ -192,7 +192,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volPointInterpolation::flatBoundaryField
|
||||
|
||||
forAll(pp, i)
|
||||
{
|
||||
boundaryVals[bFaceI++] = pTraits<Type>::zero;
|
||||
boundaryVals[bFaceI++] = Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -231,7 +231,7 @@ void Foam::volPointInterpolation::interpolateBoundaryField
|
||||
|
||||
Type& val = pfi[pointI];
|
||||
|
||||
val = pTraits<Type>::zero;
|
||||
val = Zero;
|
||||
forAll(pFaces, j)
|
||||
{
|
||||
if (boundaryIsPatchFace_[pFaces[j]])
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,7 +46,7 @@ void Foam::pairPatchAgglomeration::restrictField
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
cf = pTraits<Type>::zero;
|
||||
cf = Zero;
|
||||
|
||||
forAll(ff, i)
|
||||
{
|
||||
|
@ -46,10 +46,10 @@ timeVaryingMappedFixedValuePointPatchField
|
||||
sampleTimes_(0),
|
||||
startSampleTime_(-1),
|
||||
startSampledValues_(0),
|
||||
startAverage_(pTraits<Type>::zero),
|
||||
startAverage_(Zero),
|
||||
endSampleTime_(-1),
|
||||
endSampledValues_(0),
|
||||
endAverage_(pTraits<Type>::zero),
|
||||
endAverage_(Zero),
|
||||
offset_()
|
||||
{}
|
||||
|
||||
@ -74,10 +74,10 @@ timeVaryingMappedFixedValuePointPatchField
|
||||
sampleTimes_(0),
|
||||
startSampleTime_(-1),
|
||||
startSampledValues_(0),
|
||||
startAverage_(pTraits<Type>::zero),
|
||||
startAverage_(Zero),
|
||||
endSampleTime_(-1),
|
||||
endSampledValues_(0),
|
||||
endAverage_(pTraits<Type>::zero),
|
||||
endAverage_(Zero),
|
||||
offset_
|
||||
(
|
||||
ptf.offset_.valid()
|
||||
@ -113,10 +113,10 @@ timeVaryingMappedFixedValuePointPatchField
|
||||
sampleTimes_(0),
|
||||
startSampleTime_(-1),
|
||||
startSampledValues_(0),
|
||||
startAverage_(pTraits<Type>::zero),
|
||||
startAverage_(Zero),
|
||||
endSampleTime_(-1),
|
||||
endSampledValues_(0),
|
||||
endAverage_(pTraits<Type>::zero),
|
||||
endAverage_(Zero),
|
||||
offset_()
|
||||
{
|
||||
if (dict.found("offset"))
|
||||
|
@ -182,7 +182,7 @@ void Foam::fv::rotorDiskSource::writeField
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", dimless, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -157,7 +157,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup
|
||||
(
|
||||
"zero",
|
||||
eqn.dimensions()/dimVolume,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
),
|
||||
false
|
||||
);
|
||||
|
@ -69,8 +69,8 @@ public:
|
||||
//- Constructor
|
||||
integrationResult()
|
||||
:
|
||||
value_(pTraits<Type>::zero),
|
||||
average_(pTraits<Type>::zero)
|
||||
value_(Zero),
|
||||
average_(Zero)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,7 +32,7 @@ Foam::PairCollisionRecord<Type>::PairCollisionRecord()
|
||||
:
|
||||
origProcOfOther_(0),
|
||||
origIdOfOther_(-1),
|
||||
data_(pTraits<Type>::zero)
|
||||
data_(Zero)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,7 +38,7 @@ Foam::WallCollisionRecord<Type>::WallCollisionRecord()
|
||||
:
|
||||
accessed_(false),
|
||||
pRel_(),
|
||||
data_(pTraits<Type>::zero)
|
||||
data_(Zero)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ Foam::AveragingMethod<Type>::AveragingMethod
|
||||
{
|
||||
FieldField<Field, Type>::append
|
||||
(
|
||||
new Field<Type>(size[i], pTraits<Type>::zero)
|
||||
new Field<Type>(size[i], Zero)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -161,7 +161,7 @@ bool Foam::AveragingMethod<Type>::write() const
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", dimless, Zero)
|
||||
);
|
||||
GeometricField<TypeGrad, fvPatchField, volMesh> cellGrad
|
||||
(
|
||||
@ -172,7 +172,7 @@ bool Foam::AveragingMethod<Type>::write() const
|
||||
mesh_
|
||||
),
|
||||
mesh_,
|
||||
dimensioned<TypeGrad>("zero", dimless, pTraits<TypeGrad>::zero)
|
||||
dimensioned<TypeGrad>("zero", dimless, Zero)
|
||||
);
|
||||
GeometricField<Type, pointPatchField, pointMesh> pointValue
|
||||
(
|
||||
@ -183,7 +183,7 @@ bool Foam::AveragingMethod<Type>::write() const
|
||||
mesh_
|
||||
),
|
||||
pointMesh_,
|
||||
dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", dimless, Zero)
|
||||
);
|
||||
GeometricField<TypeGrad, pointPatchField, pointMesh> pointGrad
|
||||
(
|
||||
@ -194,7 +194,7 @@ bool Foam::AveragingMethod<Type>::write() const
|
||||
mesh_
|
||||
),
|
||||
pointMesh_,
|
||||
dimensioned<TypeGrad>("zero", dimless, pTraits<TypeGrad>::zero)
|
||||
dimensioned<TypeGrad>("zero", dimless, Zero)
|
||||
);
|
||||
|
||||
// tet-volume weighted sums
|
||||
|
@ -77,7 +77,7 @@ void Foam::AveragingMethods::Basic<Type>::updateGrad()
|
||||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensioned<Type>("zero", dimless, pTraits<Type>::zero),
|
||||
dimensioned<Type>("zero", dimless, Zero),
|
||||
zeroGradientFvPatchField<Type>::typeName
|
||||
);
|
||||
tempData.internalField() = data_;
|
||||
|
@ -41,7 +41,7 @@ void Foam::bufferedAccumulator<Type>::accumulateAndResetBuffer(const label b)
|
||||
|
||||
averagesTaken_++;
|
||||
|
||||
(*this)[b] = Field<Type>(bufferLength(), pTraits<Type>::zero);
|
||||
(*this)[b] = Field<Type>(bufferLength(), Zero);
|
||||
|
||||
bufferOffsets_[b] = 0;
|
||||
}
|
||||
@ -112,7 +112,7 @@ void Foam::bufferedAccumulator<Type>::setSizes
|
||||
|
||||
forAll((*this), b)
|
||||
{
|
||||
(*this)[b] = Field<Type>(bufferLength, pTraits<Type>::zero);
|
||||
(*this)[b] = Field<Type>(bufferLength, Zero);
|
||||
}
|
||||
|
||||
averagesTaken_ = 0;
|
||||
@ -187,7 +187,7 @@ Foam::Field<Type> Foam::bufferedAccumulator<Type>::averaged() const
|
||||
<< ". Returning empty field."
|
||||
<< endl;
|
||||
|
||||
return Field<Type>(bufferLength(), pTraits<Type>::zero);
|
||||
return Field<Type>(bufferLength(), Zero);
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ Foam::Field<Type> Foam::bufferedAccumulator<Type>::averaged() const
|
||||
template<class Type>
|
||||
void Foam::bufferedAccumulator<Type>::resetAveraging()
|
||||
{
|
||||
accumulationBuffer() = Field<Type>(bufferLength(), pTraits<Type>::zero);
|
||||
accumulationBuffer() = Field<Type>(bufferLength(), Zero);
|
||||
|
||||
averagesTaken_ = 0;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void Foam::correlationFunction<Type>::setTimesAndSizes
|
||||
Field<Type>
|
||||
(
|
||||
tZeroBufferSize,
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ zeroFixedValuePointPatchField
|
||||
:
|
||||
fixedValuePointPatchField<Type>(p, iF, dict, false)
|
||||
{
|
||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
||||
fixedValuePointPatchField<Type>::operator=(Zero);
|
||||
}
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ zeroFixedValuePointPatchField
|
||||
fixedValuePointPatchField<Type>(ptf, p, iF, mapper)
|
||||
{
|
||||
// For safety re-evaluate
|
||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
||||
fixedValuePointPatchField<Type>::operator=(Zero);
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ zeroFixedValuePointPatchField
|
||||
fixedValuePointPatchField<Type>(ptf, iF)
|
||||
{
|
||||
// For safety re-evaluate
|
||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
||||
fixedValuePointPatchField<Type>::operator=(Zero);
|
||||
}
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ T Foam::meshRefinement::gAverage
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
T sum = pTraits<T>::zero;
|
||||
T sum = Zero;
|
||||
label n = 0;
|
||||
|
||||
forAll(values, i)
|
||||
@ -305,7 +305,7 @@ void Foam::meshRefinement::weightedSum
|
||||
}
|
||||
|
||||
sum.setSize(meshPoints.size());
|
||||
sum = pTraits<Type>::zero;
|
||||
sum = Zero;
|
||||
|
||||
forAll(edges, edgeI)
|
||||
{
|
||||
@ -329,7 +329,7 @@ void Foam::meshRefinement::weightedSum
|
||||
meshPoints,
|
||||
sum,
|
||||
plusEqOp<Type>(),
|
||||
pTraits<Type>::zero // null value
|
||||
Type(Zero) // null value
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ void Foam::snappyLayerDriver::averageNeighbours
|
||||
{
|
||||
const pointField& pts = mesh.points();
|
||||
|
||||
average = pTraits<Type>::zero;
|
||||
average = Zero;
|
||||
|
||||
forAll(edges, edgeI)
|
||||
{
|
||||
@ -77,7 +77,7 @@ void Foam::snappyLayerDriver::averageNeighbours
|
||||
meshPoints,
|
||||
average,
|
||||
plusEqOp<Type>(),
|
||||
pTraits<Type>::zero // null value
|
||||
Zero // null value
|
||||
);
|
||||
|
||||
average *= invSumWeight;
|
||||
|
@ -1284,7 +1284,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
|
||||
new Field<Type>
|
||||
(
|
||||
srcAddress_.size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
|
||||
@ -1329,7 +1329,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
|
||||
new Field<Type>
|
||||
(
|
||||
tgtAddress_.size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,7 +70,7 @@ void Foam::mappedPatchBase::distribute
|
||||
map().constructMap(),
|
||||
lst,
|
||||
cop,
|
||||
pTraits<Type>::zero
|
||||
Type(Zero)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -126,7 +126,7 @@ void Foam::mappedPatchBase::reverseDistribute
|
||||
map().subMap(),
|
||||
lst,
|
||||
cop,
|
||||
pTraits<Type>::zero
|
||||
Type(Zero)
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ Type Foam::fieldValues::cellSource::processValues
|
||||
const scalarField& weightField
|
||||
) const
|
||||
{
|
||||
Type result = pTraits<Type>::zero;
|
||||
Type result = Zero;
|
||||
switch (operation_)
|
||||
{
|
||||
case opSum:
|
||||
|
@ -81,7 +81,7 @@ Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::getFieldValues
|
||||
const faceList& faces = surfacePtr_().faces();
|
||||
tmp<Field<Type>> tavg
|
||||
(
|
||||
new Field<Type>(faces.size(), pTraits<Type>::zero)
|
||||
new Field<Type>(faces.size(), Zero)
|
||||
);
|
||||
Field<Type>& avg = tavg.ref();
|
||||
|
||||
@ -127,7 +127,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
|
||||
const scalarField& weightField
|
||||
) const
|
||||
{
|
||||
Type result = pTraits<Type>::zero;
|
||||
Type result = Zero;
|
||||
switch (operation_)
|
||||
{
|
||||
case opSum:
|
||||
@ -148,7 +148,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
|
||||
<< pTraits<Type>::typeName
|
||||
<< exit(FatalError);
|
||||
|
||||
result = pTraits<Type>::zero;
|
||||
result = Zero;
|
||||
break;
|
||||
}
|
||||
case opSumDirectionBalance:
|
||||
@ -159,7 +159,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
|
||||
<< pTraits<Type>::typeName
|
||||
<< exit(FatalError);
|
||||
|
||||
result = pTraits<Type>::zero;
|
||||
result = Zero;
|
||||
break;
|
||||
}
|
||||
case opAverage:
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,7 +36,7 @@ Type Foam::fieldValues::fieldValueDelta::applyOperation
|
||||
const Type& value2
|
||||
) const
|
||||
{
|
||||
Type result = pTraits<Type>::zero;
|
||||
Type result = Zero;
|
||||
|
||||
switch (operation_)
|
||||
{
|
||||
@ -89,8 +89,8 @@ void Foam::fieldValues::fieldValueDelta::processFields(bool& found)
|
||||
const dictionary& results1 = source1Ptr_->resultDict();
|
||||
const dictionary& results2 = source2Ptr_->resultDict();
|
||||
|
||||
Type r1(pTraits<Type>::zero);
|
||||
Type r2(pTraits<Type>::zero);
|
||||
Type r1(Zero);
|
||||
Type r2(Zero);
|
||||
|
||||
forAll(fields1, i)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,7 +63,7 @@ Foam::calcFvcGrad::gradField(const word& gradName, const dimensionSet& dims)
|
||||
(
|
||||
"zero",
|
||||
dims/dimLength,
|
||||
pTraits<gradType>::zero
|
||||
Zero
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -93,7 +93,7 @@ Foam::regionModels::regionModel::mapRegionPatchField
|
||||
new Field<Type>
|
||||
(
|
||||
p.size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -149,7 +149,7 @@ Foam::regionModels::regionModel::mapRegionPatchInternalField
|
||||
new Field<Type>
|
||||
(
|
||||
p.size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ thermalBaffle::thermalBaffle
|
||||
(
|
||||
"zero",
|
||||
dimEnergy/dimArea/dimTime,
|
||||
pTraits<scalar>::zero
|
||||
Zero
|
||||
)
|
||||
),
|
||||
Q_
|
||||
@ -200,7 +200,7 @@ thermalBaffle::thermalBaffle
|
||||
(
|
||||
"zero",
|
||||
dimEnergy/dimVolume/dimTime,
|
||||
pTraits<scalar>::zero
|
||||
Zero
|
||||
)
|
||||
),
|
||||
radiation_
|
||||
@ -242,7 +242,7 @@ thermalBaffle::thermalBaffle
|
||||
(
|
||||
"zero",
|
||||
dimEnergy/dimArea/dimTime,
|
||||
pTraits<scalar>::zero
|
||||
Zero
|
||||
)
|
||||
),
|
||||
Q_
|
||||
@ -260,7 +260,7 @@ thermalBaffle::thermalBaffle
|
||||
(
|
||||
"zero",
|
||||
dimEnergy/dimVolume/dimTime,
|
||||
pTraits<scalar>::zero
|
||||
Zero
|
||||
)
|
||||
),
|
||||
radiation_
|
||||
|
@ -111,7 +111,7 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
if (srcAddress.size())
|
||||
{
|
||||
// result[cellI] = pTraits<Type>::zero;
|
||||
// result[cellI] = Zero;
|
||||
result[cellI] *= (1.0 - sum(srcWeight));
|
||||
forAll(srcAddress, i)
|
||||
{
|
||||
@ -131,7 +131,7 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
|
||||
if (srcAddress.size())
|
||||
{
|
||||
// result[cellI] = pTraits<Type>::zero;
|
||||
// result[cellI] = Zero;
|
||||
result[cellI] *= (1.0 - sum(srcWeight));
|
||||
forAll(srcAddress, i)
|
||||
{
|
||||
@ -157,7 +157,7 @@ Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapSrcToTgt
|
||||
new Field<Type>
|
||||
(
|
||||
tgtToSrcCellAddr_.size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
|
||||
@ -276,7 +276,7 @@ Foam::tmp<Foam::Field<Type>> Foam::meshToMesh::mapTgtToSrc
|
||||
new Field<Type>
|
||||
(
|
||||
srcToTgtCellAddr_.size(),
|
||||
pTraits<Type>::zero
|
||||
Zero
|
||||
)
|
||||
);
|
||||
|
||||
@ -362,7 +362,7 @@ void Foam::meshToMesh::mapSrcToTgt
|
||||
tgtField.rmap(tnewTgt(), identity(tgtField.size()));
|
||||
}
|
||||
|
||||
tgtField == pTraits<Type>::zero;
|
||||
tgtField == Type(Zero);
|
||||
|
||||
AMIList[i].interpolateToTarget
|
||||
(
|
||||
@ -461,7 +461,7 @@ Foam::meshToMesh::mapSrcToTgt
|
||||
),
|
||||
tgtMesh,
|
||||
field.dimensions(),
|
||||
Field<Type>(tgtMesh.nCells(), pTraits<Type>::zero),
|
||||
Field<Type>(tgtMesh.nCells(), Zero),
|
||||
tgtPatchFields
|
||||
)
|
||||
);
|
||||
@ -551,7 +551,7 @@ void Foam::meshToMesh::mapTgtToSrc
|
||||
srcField.rmap(tnewSrc(), identity(srcField.size()));
|
||||
}
|
||||
|
||||
srcField == pTraits<Type>::zero;
|
||||
srcField == Type(Zero);
|
||||
|
||||
AMIList[i].interpolateToSource
|
||||
(
|
||||
@ -650,7 +650,7 @@ Foam::meshToMesh::mapTgtToSrc
|
||||
),
|
||||
srcMesh,
|
||||
field.dimensions(),
|
||||
Field<Type>(srcMesh.nCells(), pTraits<Type>::zero),
|
||||
Field<Type>(srcMesh.nCells(), Zero),
|
||||
srcPatchFields
|
||||
)
|
||||
);
|
||||
|
@ -70,7 +70,7 @@ void Foam::meshToMesh0::interpolateField
|
||||
const labelList& overlapCells = adr[celli];
|
||||
const scalarList& w = weights[celli];
|
||||
|
||||
Type f = pTraits<Type>::zero;
|
||||
Type f = Zero;
|
||||
forAll(overlapCells, i)
|
||||
{
|
||||
label fromCelli = overlapCells[i];
|
||||
|
@ -468,7 +468,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
|
||||
(
|
||||
snappedPoint[pointI] != -1
|
||||
? snappedPoints[snappedPoint[pointI]]
|
||||
: pTraits<Type>::zero
|
||||
: Type(Zero)
|
||||
),
|
||||
|
||||
pVals[nextPointI],
|
||||
@ -477,7 +477,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
|
||||
(
|
||||
snappedPoint[nextPointI] != -1
|
||||
? snappedPoints[snappedPoint[nextPointI]]
|
||||
: pTraits<Type>::zero
|
||||
: Type(Zero)
|
||||
),
|
||||
|
||||
cVals[own],
|
||||
@ -486,7 +486,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
|
||||
(
|
||||
snappedCc[own] != -1
|
||||
? snappedPoints[snappedCc[own]]
|
||||
: pTraits<Type>::zero
|
||||
: Type(Zero)
|
||||
),
|
||||
|
||||
neiVal,
|
||||
@ -582,7 +582,7 @@ void Foam::isoSurface::generateTriPoints
|
||||
(
|
||||
snappedCc[nei[faceI]] != -1
|
||||
? snappedPoints[snappedCc[nei[faceI]]]
|
||||
: pTraits<Type>::zero
|
||||
: Type(Zero)
|
||||
),
|
||||
|
||||
triPoints,
|
||||
@ -594,7 +594,7 @@ void Foam::isoSurface::generateTriPoints
|
||||
|
||||
// Determine neighbouring snap status
|
||||
boolList neiSnapped(mesh_.nFaces()-mesh_.nInternalFaces(), false);
|
||||
List<Type> neiSnappedPoint(neiSnapped.size(), pTraits<Type>::zero);
|
||||
List<Type> neiSnappedPoint(neiSnapped.size(), Type(Zero));
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
@ -680,7 +680,7 @@ void Foam::isoSurface::generateTriPoints
|
||||
cVals.boundaryField()[patchI][i],
|
||||
cCoords.boundaryField()[patchI][i],
|
||||
false,
|
||||
pTraits<Type>::zero,
|
||||
Type(Zero),
|
||||
|
||||
triPoints,
|
||||
triMeshCells
|
||||
@ -713,7 +713,7 @@ void Foam::isoSurface::generateTriPoints
|
||||
cVals.boundaryField()[patchI][i],
|
||||
cCoords.boundaryField()[patchI][i],
|
||||
false, // fc not snapped
|
||||
pTraits<Type>::zero,
|
||||
Type(Zero),
|
||||
|
||||
triPoints,
|
||||
triMeshCells
|
||||
@ -739,7 +739,7 @@ Foam::isoSurface::interpolate
|
||||
)
|
||||
{
|
||||
// One value per point
|
||||
tmp<Field<Type> > tvalues(new Field<Type>(nPoints, pTraits<Type>::zero));
|
||||
tmp<Field<Type> > tvalues(new Field<Type>(nPoints, Type(Zero)));
|
||||
Field<Type>& values = tvalues.ref();
|
||||
labelList nValues(values.size(), 0);
|
||||
|
||||
|
@ -49,7 +49,7 @@ bool Foam::sampledSurface::checkFieldSize(const Field<Type>& field) const
|
||||
template<class Type>
|
||||
Type Foam::sampledSurface::integrate(const Field<Type>& field) const
|
||||
{
|
||||
Type value = pTraits<Type>::zero;
|
||||
Type value = Zero;
|
||||
|
||||
if (checkFieldSize(field))
|
||||
{
|
||||
@ -73,7 +73,7 @@ Type Foam::sampledSurface::integrate(const tmp<Field<Type>>& field) const
|
||||
template<class Type>
|
||||
Type Foam::sampledSurface::average(const Field<Type>& field) const
|
||||
{
|
||||
Type value = pTraits<Type>::zero;
|
||||
Type value = Zero;
|
||||
|
||||
if (checkFieldSize(field))
|
||||
{
|
||||
@ -89,7 +89,7 @@ Type Foam::sampledSurface::average(const Field<Type>& field) const
|
||||
}
|
||||
else
|
||||
{
|
||||
return pTraits<Type>::zero;
|
||||
return Zero;
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ Foam::sampledSurface::pointAverage
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", dimless, Zero)
|
||||
)
|
||||
);
|
||||
GeometricField<Type, fvPatchField, volMesh>& cellAvg = tcellAvg.ref();
|
||||
|
@ -56,7 +56,7 @@ Foam::sampledTriSurfaceMesh::sampleField
|
||||
|
||||
// Create flat boundary field
|
||||
|
||||
Field<Type> bVals(nBnd, pTraits<Type>::zero);
|
||||
Field<Type> bVals(nBnd, Zero);
|
||||
|
||||
forAll(vField.boundaryField(), patchI)
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ void Foam::nastranSurfaceWriter::writeTemplate
|
||||
const DynamicList<face>& dFaces = decomposedFaces[i];
|
||||
forAll(dFaces, faceI)
|
||||
{
|
||||
Type v = pTraits<Type>::zero;
|
||||
Type v = Zero;
|
||||
const face& f = dFaces[faceI];
|
||||
|
||||
forAll(f, fptI)
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,7 +104,7 @@ bool Foam::fileFormats::AC3DsurfaceFormat<Face>::read
|
||||
|
||||
// number of vertices for this zone
|
||||
label nZonePoints = 0;
|
||||
vector location(pTraits<vector>::zero);
|
||||
vector location(Zero);
|
||||
// tensor rotation(I);
|
||||
|
||||
// Read all info for current zone
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -96,7 +96,7 @@ void Foam::rawTopoChangerFvMesh::zeroUnmappedValues
|
||||
false
|
||||
),
|
||||
*this,
|
||||
dimensioned<Type>("0", fld.dimensions(), pTraits<Type>::zero)
|
||||
dimensioned<Type>("0", fld.dimensions(), Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user