STYLE: use zeroGradientType() instead of hard-coded or typeName

This commit is contained in:
Mark Olesen
2023-04-12 17:57:46 +02:00
parent 09dd913077
commit 3947f3c441
56 changed files with 161 additions and 146 deletions

View File

@ -100,7 +100,7 @@ bool Foam::functionObjects::CourantNo::calc()
),
mesh_,
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
tCo.ref().ref() = Coi();
tCo.ref().correctBoundaryConditions();

View File

@ -63,7 +63,7 @@ Foam::wordList Foam::functionObjects::age::patchTypes() const
{
if (isA<wallFvPatch>(mesh_.boundary()[patchi]))
{
result[patchi] = zeroGradientFvPatchField<scalar>::typeName;
result[patchi] = fvPatchFieldBase::zeroGradientType();
}
}

View File

@ -96,7 +96,7 @@ Foam::functionObjects::blendingFactor::blendingFactor
),
mesh_,
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
store(resultName_, indicatorPtr);

View File

@ -58,7 +58,7 @@ Foam::tmp<Foam::volScalarField> Foam::resolutionIndexModel::V() const
),
mesh_,
dimVolume,
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
tV.ref().primitiveFieldRef() = mesh_.V();
@ -104,7 +104,7 @@ bool Foam::resolutionIndexModel::read(const dictionary& dict)
),
mesh_,
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
mesh_.objectRegistry::store(indexPtr);

View File

@ -71,7 +71,7 @@ Foam::functionObjects::stabilityBlendingFactor::indicator()
),
mesh_,
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
mesh_.objectRegistry::store(fldPtr);
@ -332,7 +332,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
),
mesh_,
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
auto& magGradCC = tmagGradCC.ref();
@ -351,7 +351,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
),
mesh_,
dimensionedScalar(dimLength, Zero),
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
cci = mesh_.C().component(i);
cci.correctBoundaryConditions();
@ -405,7 +405,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first)
),
mesh_,
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchScalarField::typeName
fvPatchFieldBase::zeroGradientType()
);
auto& Co = CoPtr.ref();

View File

@ -96,7 +96,7 @@ int Foam::functionObjects::zeroGradient::apply
),
mesh_,
dimensioned<Type>(input.dimensions(), Zero),
zeroGradientFvPatchField<Type>::typeName
fvPatchFieldBase::zeroGradientType()
);
store(outputName, tzeroGrad);

View File

@ -217,7 +217,7 @@ bool Foam::functionObjects::solverInfo::write()
),
mesh_,
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchField<scalar>::typeName
fvPatchFieldBase::zeroGradientType()
);
residual.primitiveFieldRef() = *residualPtr;