From 3947f3c441752e9a275c145096e86648a81cccf1 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Wed, 12 Apr 2023 17:57:46 +0200 Subject: [PATCH] STYLE: use zeroGradientType() instead of hard-coded or typeName --- .../ObukhovLength/ObukhovLength.C | 4 +-- .../diffusionMulticomponent.C | 6 ++-- .../eddyDissipationDiffusionModel.C | 2 +- .../interfaceTrackingFvMesh.C | 4 +-- .../finiteArea/fac/facEdgeIntegrate.C | 4 +-- .../leastSquaresFaGrad/leastSquaresFaGrad.C | 2 +- .../cfdTools/general/CorrectPhi/CorrectPhi.C | 4 +-- .../finiteVolume/fvc/fvcSmooth/fvcSmooth.C | 2 +- .../fvMeshSubset/fvMeshSubsetProxyTemplates.C | 2 +- .../patchDistMethodTemplates.C | 2 +- .../field/CourantNo/CourantNo.C | 2 +- src/functionObjects/field/age/age.C | 2 +- .../field/blendingFactor/blendingFactor.C | 2 +- .../resolutionIndexModel.C | 4 +-- .../stabilityBlendingFactor.C | 8 +++--- .../zeroGradient/zeroGradientTemplates.C | 2 +- .../utilities/solverInfo/solverInfo.C | 2 +- .../inverseVolume/inverseVolumeDiffusivity.C | 2 +- .../motionDirectionalDiffusivity.C | 3 +- .../patchCorrectedInterpolationTemplates.C | 6 ++-- .../acousticDampingSource.C | 5 ++-- .../jouleHeatingSource/jouleHeatingSource.C | 2 +- .../solidificationMeltingSource.C | 2 +- .../interRegionHeatTransferModel.C | 2 +- .../clouds/Templates/DSMCCloud/DSMCCloud.C | 2 +- .../MPPIC/AveragingMethods/Basic/Basic.C | 2 +- .../MPPIC/PackingModels/Implicit/Implicit.C | 8 +++--- .../molecule/mdTools/createMDFields.H | 20 ++++++------- .../meshRefinement/meshRefinement.C | 24 ++++++++-------- .../meshRefinement/meshRefinementBaffles.C | 2 +- .../adjoint/ATCModel/ATCModel/ATCModel.C | 28 ++++++++++--------- .../ATCModel/ATCModel/ATCModelTemplates.C | 5 ++-- .../elasticityMotionSolver.C | 2 +- .../adjointEikonalSolverIncompressible.C | 2 +- .../sensitivitySurfaceIncompressible.C | 2 +- .../adjointkOmegaSST/adjointkOmegaSST.C | 2 +- .../cellCellStencilTemplates.C | 2 +- .../cellVolumeWeightCellCellStencil.C | 2 +- .../inverseDistanceCellCellStencil.C | 2 +- src/overset/include/createCellMask.H | 5 ++-- src/overset/include/createInterpolatedCells.H | 5 ++-- src/overset/oversetFvMesh/oversetFvMeshBase.C | 9 +++--- .../InterfaceCompositionModel.C | 11 ++++---- .../dragModels/segregated/segregated.C | 2 +- .../dragModels/segregated/segregated.C | 2 +- .../KirchhoffShell/KirchhoffShell.C | 2 +- .../thermalShell/thermalShell.C | 6 ++-- .../singleLayerRegion/singleLayerRegion.C | 8 +++--- .../singleLayerRegionTemplates.C | 22 ++++++++------- .../functionObjects/filmFlux/filmFlux.C | 2 +- .../kinematicSingleLayer.C | 20 ++++++------- .../curvatureSeparation/curvatureSeparation.C | 12 +++++--- .../standardRadiation/standardRadiation.C | 2 +- .../waxSolventViscosity/waxSolventViscosity.C | 4 +-- .../solidification/solidification.C | 4 +-- .../thermoSingleLayer/thermoSingleLayer.C | 10 +++---- 56 files changed, 161 insertions(+), 146 deletions(-) diff --git a/src/atmosphericModels/functionObjects/ObukhovLength/ObukhovLength.C b/src/atmosphericModels/functionObjects/ObukhovLength/ObukhovLength.C index 4ce789050a2..399e9404771 100644 --- a/src/atmosphericModels/functionObjects/ObukhovLength/ObukhovLength.C +++ b/src/atmosphericModels/functionObjects/ObukhovLength/ObukhovLength.C @@ -76,7 +76,7 @@ bool Foam::functionObjects::ObukhovLength::calcOL() ), mesh_, dimLength, - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ); result1->store(); @@ -94,7 +94,7 @@ bool Foam::functionObjects::ObukhovLength::calcOL() ), mesh_, dimVelocity, - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ); result2->store(); diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C index f14d2ec5469..fb5c1556250 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C @@ -71,7 +71,7 @@ diffusionMulticomponent<ReactionThermo, ThermoType>::init() ), this->mesh_, dimensionedScalar(dimMass/dimTime/dimVolume, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ) ); @@ -209,7 +209,7 @@ diffusionMulticomponent<ReactionThermo, ThermoType>::correct() ), this->mesh_, dimensionedScalar(dimMass/dimTime/dimVolume, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ) ); @@ -410,7 +410,7 @@ diffusionMulticomponent<ReactionThermo, ThermoType>::Qdot() const ), this->mesh(), dimensionedScalar(dimEnergy/dimTime/dimVolume, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ) ); diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C index 2663ade2561..fa042bfce06 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C @@ -91,7 +91,7 @@ eddyDissipationDiffusionModel<ReactionThermo, ThermoType>::rtDiff() const ), this->mesh(), dimensionedScalar(dimLength, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ) ); diff --git a/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C b/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C index fc3e6cee879..d3c87b6f33a 100644 --- a/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C +++ b/src/dynamicFaMesh/interfaceTrackingFvMesh/interfaceTrackingFvMesh.C @@ -144,7 +144,7 @@ void Foam::interfaceTrackingFvMesh::makeUs() const wordList patchFieldTypes ( aMesh().boundary().size(), - zeroGradientFaPatchVectorField::typeName + faPatchFieldBase::zeroGradientType() ); forAll(aMesh().boundary(), patchI) @@ -883,7 +883,7 @@ void Foam::interfaceTrackingFvMesh::updateSurfactantConcentration() ), aMesh(), dimensionedScalar(dimMoles/dimVolume, Zero), - zeroGradientFaPatchScalarField::typeName + faPatchFieldBase::zeroGradientType() ); Cb.ref().field() = diff --git a/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C index 3cae46f5eec..cb32d94a36a 100644 --- a/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C +++ b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C @@ -62,7 +62,7 @@ edgeIntegrate ), mesh, dimensioned<Type>(ssf.dimensions()/dimArea, Zero), - zeroGradientFaPatchField<Type>::typeName + faPatchFieldBase::zeroGradientType() ) ); GeometricField<Type, faPatchField, areaMesh>& vf = tvf.ref(); @@ -134,7 +134,7 @@ edgeSum ), mesh, dimensioned<Type>(ssf.dimensions(), Zero), - zeroGradientFaPatchField<Type>::typeName + faPatchFieldBase::zeroGradientType() ) ); GeometricField<Type, faPatchField, areaMesh>& vf = tvf.ref(); diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C index 5893faa9102..ef6c9d6ce96 100644 --- a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C @@ -77,7 +77,7 @@ leastSquaresFaGrad<Type>::grad ), mesh, dimensioned<GradType>(vsf.dimensions()/dimLength, Zero), - zeroGradientFaPatchField<GradType>::typeName + faPatchFieldBase::zeroGradientType() ) ); GeometricField<GradType, faPatchField, areaMesh>& lsGrad = tlsGrad.ref(); diff --git a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C index bf53f6c6f62..c92d10b68c0 100644 --- a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C +++ b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C @@ -60,7 +60,7 @@ void Foam::CorrectPhi wordList pcorrTypes ( p.boundaryField().size(), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); // Set BCs of pcorr to fixed-value for patches at which p is fixed @@ -140,7 +140,7 @@ void Foam::CorrectPhi wordList pcorrTypes ( p.boundaryField().size(), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); // Set BCs of pcorr to fixed-value for patches at which p is fixed diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C index befe5e3181b..3a5ed60f0f8 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C @@ -345,7 +345,7 @@ void Foam::fvc::spreadSource ), mesh, dimensionedScalar(mDotOut.dimensions(), Zero), - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ); // Smearing of source term field diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetProxyTemplates.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetProxyTemplates.C index 4d336786aa4..5791434f6fe 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetProxyTemplates.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetProxyTemplates.C @@ -51,7 +51,7 @@ Foam::fvMeshSubsetProxy::zeroGradientField io, df.mesh(), dimensioned<Type>(df.dimensions(), Zero), - zeroGradientFvPatchField<Type>::typeName + fvPatchFieldBase::zeroGradientType() ); tfield.ref().primitiveFieldRef() = df; tfield.ref().oriented() = df.oriented(); diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethodTemplates.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethodTemplates.C index 8eea096a3b9..be917461479 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethodTemplates.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/patchDistMethod/patchDistMethodTemplates.C @@ -40,7 +40,7 @@ Foam::wordList Foam::patchDistMethod::patchTypes wordList yTypes ( mesh.boundary().size(), - zeroGradientFvPatchField<Type>::typeName + fvPatchFieldBase::zeroGradientType() ); for (const label patchi : patchIDs) diff --git a/src/functionObjects/field/CourantNo/CourantNo.C b/src/functionObjects/field/CourantNo/CourantNo.C index 04da791febb..55ff252fb32 100644 --- a/src/functionObjects/field/CourantNo/CourantNo.C +++ b/src/functionObjects/field/CourantNo/CourantNo.C @@ -100,7 +100,7 @@ bool Foam::functionObjects::CourantNo::calc() ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); tCo.ref().ref() = Coi(); tCo.ref().correctBoundaryConditions(); diff --git a/src/functionObjects/field/age/age.C b/src/functionObjects/field/age/age.C index 4da8f127bca..7ecb04bc696 100644 --- a/src/functionObjects/field/age/age.C +++ b/src/functionObjects/field/age/age.C @@ -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(); } } diff --git a/src/functionObjects/field/blendingFactor/blendingFactor.C b/src/functionObjects/field/blendingFactor/blendingFactor.C index 00e16423011..81e0cc23077 100644 --- a/src/functionObjects/field/blendingFactor/blendingFactor.C +++ b/src/functionObjects/field/blendingFactor/blendingFactor.C @@ -96,7 +96,7 @@ Foam::functionObjects::blendingFactor::blendingFactor ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); store(resultName_, indicatorPtr); diff --git a/src/functionObjects/field/resolutionIndex/resolutionIndexModels/resolutionIndexModel/resolutionIndexModel.C b/src/functionObjects/field/resolutionIndex/resolutionIndexModels/resolutionIndexModel/resolutionIndexModel.C index b4e4610989f..44baba6b552 100644 --- a/src/functionObjects/field/resolutionIndex/resolutionIndexModels/resolutionIndexModel/resolutionIndexModel.C +++ b/src/functionObjects/field/resolutionIndex/resolutionIndexModels/resolutionIndexModel/resolutionIndexModel.C @@ -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); diff --git a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C index 7839740c324..871367501b5 100644 --- a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C +++ b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C @@ -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(); diff --git a/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C b/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C index 8f87143e50b..75505f24fe6 100644 --- a/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C +++ b/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C @@ -96,7 +96,7 @@ int Foam::functionObjects::zeroGradient::apply ), mesh_, dimensioned<Type>(input.dimensions(), Zero), - zeroGradientFvPatchField<Type>::typeName + fvPatchFieldBase::zeroGradientType() ); store(outputName, tzeroGrad); diff --git a/src/functionObjects/utilities/solverInfo/solverInfo.C b/src/functionObjects/utilities/solverInfo/solverInfo.C index 60f0863aeb0..51942e72eb8 100644 --- a/src/functionObjects/utilities/solverInfo/solverInfo.C +++ b/src/functionObjects/utilities/solverInfo/solverInfo.C @@ -217,7 +217,7 @@ bool Foam::functionObjects::solverInfo::write() ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ); residual.primitiveFieldRef() = *residualPtr; diff --git a/src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C index 4fdccec0981..ff0582a84e4 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseVolume/inverseVolumeDiffusivity.C @@ -84,7 +84,7 @@ void Foam::inverseVolumeDiffusivity::correct() ), mesh(), dimless, - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); V.primitiveFieldRef() = mesh().V(); diff --git a/src/fvMotionSolver/motionDiffusivity/motionDirectional/motionDirectionalDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/motionDirectional/motionDirectionalDiffusivity.C index 6f0243dbb71..ec0832c7d21 100644 --- a/src/fvMotionSolver/motionDiffusivity/motionDirectional/motionDirectionalDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/motionDirectional/motionDirectionalDiffusivity.C @@ -87,7 +87,8 @@ void Foam::motionDirectionalDiffusivity::correct() diffusivityVector_.y()*vector::one + (diffusivityVector_.x() - diffusivityVector_.y())*cellMotionU /(mag(cellMotionU) + dimensionedScalar("small", dimVelocity, SMALL)), - zeroGradientFvPatchVectorField::typeName + + fvPatchFieldBase::zeroGradientType() ); D.correctBoundaryConditions(); diff --git a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C index bf8d27b9574..5b79b23e7da 100644 --- a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C +++ b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C @@ -65,7 +65,7 @@ void Foam::patchCorrectedInterpolation::interpolateType wordList ( pointUncorrectedDisplacement.boundaryField().size(), - zeroGradientPointPatchField<Type>::typeName + pointPatchFieldBase::zeroGradientType() ) ); @@ -107,7 +107,7 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups ), data.mesh(), dimensionedScalar(dimless, Zero), - zeroGradientPointPatchField<scalar>::typeName + pointPatchFieldBase::zeroGradientType() ); data = dimensioned<Type>(data.dimensions(), Zero); @@ -124,7 +124,7 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups ), data.mesh(), dimensionedScalar(data.dimensions(), Zero), - zeroGradientPointPatchField<scalar>::typeName + pointPatchFieldBase::zeroGradientType() ); GeometricField<Type, pointPatchField, pointMesh> patchData(data); diff --git a/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C b/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C index f00cd64079f..898926ef188 100644 --- a/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C +++ b/src/fvOptions/sources/derived/acousticDampingSource/acousticDampingSource.C @@ -98,8 +98,9 @@ Foam::fv::acousticDampingSource::acousticDampingSource IOobject::NO_WRITE ), mesh_, - dimensionedScalar("blend0", dimless, 1.0), - zeroGradientFvPatchField<vector>::typeName + scalar(1), + dimless, + fvPatchFieldBase::zeroGradientType() ) ), frequency_("frequency", dimless/dimTime, 0), diff --git a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C index a548662098c..f6f41c11a06 100644 --- a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C +++ b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C @@ -68,7 +68,7 @@ Foam::fv::jouleHeatingSource::transformSigma ), mesh_, dimensionedSymmTensor(sigmaLocal.dimensions(), Zero), - zeroGradientFvPatchField<symmTensor>::typeName + fvPatchFieldBase::zeroGradientType() ); auto& sigma = tsigma.ref(); diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index cf55b450bcd..63d6b54b973 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -192,7 +192,7 @@ Foam::fv::solidificationMeltingSource::solidificationMeltingSource ), mesh, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), curTimeIndex_(-1), deltaT_(cells_.size(), 0) diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C index ea1d6f4d171..5a729f981f5 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C @@ -139,7 +139,7 @@ Foam::fv::interRegionHeatTransferModel::interRegionHeatTransferModel ), mesh, dimensionedScalar(dimEnergy/dimTime/dimTemperature/dimVolume, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), TName_(coeffs_.getOrDefault<word>("T", "T")), TNbrName_(coeffs_.getOrDefault<word>("TNbr", "T")) diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index 0be3c472cd1..a02de47f9c5 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -717,7 +717,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud ), mesh_, dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), collisionSelectionRemainder_ ( diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C index fd36a47760e..1febf1f3eee 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C @@ -80,7 +80,7 @@ void Foam::AveragingMethods::Basic<Type>::updateGrad() ), this->mesh_, dimensioned<Type>(dimless, Zero), - zeroGradientFvPatchField<Type>::typeName + fvPatchFieldBase::zeroGradientType() ); tempData.primitiveFieldRef() = data_; tempData.correctBoundaryConditions(); diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C index 68ea5dd75bc..c811306bc4c 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -56,7 +56,7 @@ Foam::PackingModels::Implicit<CloudType>::Implicit ), this->owner().mesh(), dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), phiCorrect_(nullptr), uCorrect_(nullptr), @@ -150,7 +150,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) ), mesh, dimensionedScalar(dimDensity, Zero), - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ); rho.primitiveFieldRef() = max(rhoAverage.primitiveField(), rhoMin_); rho.correctBoundaryConditions(); @@ -171,7 +171,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) ), mesh, dimensionedScalar(dimPressure, Zero), - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ); tauPrime.primitiveFieldRef() = @@ -256,7 +256,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) ), mesh, dimensionedVector(dimVelocity, Zero), - fixedValueFvPatchField<vector>::typeName + fvPatchFieldBase::zeroGradientType() ); U.primitiveFieldRef() = uAverage.primitiveField(); U.correctBoundaryConditions(); diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H index d33c360937a..025c398c4a9 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H @@ -57,7 +57,7 @@ forAll(allSpeciesRhoN, rN) ), mesh, dimless/dimVolume, - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ) ); allSpeciesRhoN[rN].primitiveFieldRef() = 0; @@ -78,7 +78,7 @@ volScalarField totalRhoN ), mesh, dimless/dimVolume, - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ); totalRhoN.primitiveFieldRef() = 0; totalRhoN.correctBoundaryConditions(); @@ -112,7 +112,7 @@ forAll(allSpeciesRhoM, rM) ), mesh, dimMass/dimVolume, - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ) ); allSpeciesRhoM[rM].primitiveFieldRef() = 0; @@ -133,7 +133,7 @@ volScalarField totalRhoM ), mesh, dimMass/dimVolume, - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ); totalRhoM.primitiveFieldRef() = 0; totalRhoM.correctBoundaryConditions(); @@ -167,7 +167,7 @@ forAll(allSpeciesVelocity, v) ), mesh, dimVelocity, - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ) ); allSpeciesVelocity[v].primitiveFieldRef() = Zero; @@ -188,7 +188,7 @@ Info << " Creating total velocity field" << endl; // ), // mesh, // dimVelocity, -// "zeroGradient" +// fvPatchFieldBase::zeroGradientType() // ); // totalVelocity.primitiveFieldRef() = Zero; // totalVelocity.correctBoundaryConditions(); @@ -237,7 +237,7 @@ forAll(allSpeciesTemperature, t) ), mesh, dimTemperature, - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ) ); allSpeciesTemperature[t].primitiveFieldRef() = 0; @@ -258,7 +258,7 @@ volScalarField totalTemperature ), mesh, dimTemperature, - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ); totalTemperature.primitiveFieldRef() = 0; totalTemperature.correctBoundaryConditions(); @@ -293,7 +293,7 @@ forAll(allSpeciesMeanKE, mKE) ), mesh, dimensionSet(1, 2, -2, 0, 0, 0, 0), - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ) ); allSpeciesMeanKE[mKE].primitiveFieldRef() = 0; @@ -314,7 +314,7 @@ volScalarField totalMeanKE ), mesh, dimensionSet(1, 2, -2, 0, 0, 0, 0), - "zeroGradient" + fvPatchFieldBase::zeroGradientType() ); totalMeanKE.primitiveFieldRef() = 0; totalMeanKE.correctBoundaryConditions(); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index f945f0f3693..309223d95bc 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -2406,27 +2406,27 @@ Foam::label Foam::meshRefinement::appendPatch addPatchFields<volScalarField> ( mesh, - calculatedFvPatchField<scalar>::typeName + fvPatchFieldBase::calculatedType() ); addPatchFields<volVectorField> ( mesh, - calculatedFvPatchField<vector>::typeName + fvPatchFieldBase::calculatedType() ); addPatchFields<volSphericalTensorField> ( mesh, - calculatedFvPatchField<sphericalTensor>::typeName + fvPatchFieldBase::calculatedType() ); addPatchFields<volSymmTensorField> ( mesh, - calculatedFvPatchField<symmTensor>::typeName + fvPatchFieldBase::calculatedType() ); addPatchFields<volTensorField> ( mesh, - calculatedFvPatchField<tensor>::typeName + fvPatchFieldBase::calculatedType() ); // Surface fields @@ -2434,27 +2434,27 @@ Foam::label Foam::meshRefinement::appendPatch addPatchFields<surfaceScalarField> ( mesh, - calculatedFvPatchField<scalar>::typeName + fvsPatchFieldBase::calculatedType() ); addPatchFields<surfaceVectorField> ( mesh, - calculatedFvPatchField<vector>::typeName + fvsPatchFieldBase::calculatedType() ); addPatchFields<surfaceSphericalTensorField> ( mesh, - calculatedFvPatchField<sphericalTensor>::typeName + fvsPatchFieldBase::calculatedType() ); addPatchFields<surfaceSymmTensorField> ( mesh, - calculatedFvPatchField<symmTensor>::typeName + fvsPatchFieldBase::calculatedType() ); addPatchFields<surfaceTensorField> ( mesh, - calculatedFvPatchField<tensor>::typeName + fvsPatchFieldBase::calculatedType() ); return patchi; } @@ -2574,7 +2574,7 @@ Foam::label Foam::meshRefinement::addMeshedPatch // mesh_, // ppPtr(), // dictionary(), // optional field values -// calculatedFvPatchField<scalar>::typeName, +// fvPatchFieldBase::calculatedType(), // true // ); @@ -3595,7 +3595,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); const labelList& cellLevel = meshCutter_.cellLevel(); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index 57946636c14..c36580ced64 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -3576,7 +3576,7 @@ void Foam::meshRefinement::zonify ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); forAll(cellToZone, cellI) diff --git a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModel.C b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModel.C index 057996e18ab..d6791326aab 100644 --- a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModel.C +++ b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModel.C @@ -101,8 +101,9 @@ ATCModel::ATCModel IOobject::NO_WRITE ), mesh_, - dimensionedScalar("limiter", dimless, 1.0), - zeroGradientFvPatchField<scalar>::typeName + scalar(1), + dimless, + fvPatchFieldBase::zeroGradientType() ), ATC_ ( @@ -231,17 +232,18 @@ tmp<volScalarField> ATCModel::createLimiter ( new volScalarField ( - IOobject - ( - "limiter", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionedScalar("limiter", dimless, 1.0), - zeroGradientFvPatchField<scalar>::typeName + IOobject + ( + "limiter", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + scalar(1), + dimless, + fvPatchFieldBase::zeroGradientType() ) ); volScalarField& limiter = tlimiter.ref(); diff --git a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModelTemplates.C b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModelTemplates.C index 488a4f7713e..f9bba353233 100644 --- a/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModelTemplates.C +++ b/src/optimisation/adjointOptimisation/adjoint/ATCModel/ATCModel/ATCModelTemplates.C @@ -50,8 +50,9 @@ void Foam::ATCModel::smoothFieldBasedOnCells IOobject::NO_WRITE ), mesh_, - dimensionedScalar("limiter", dimless, 1.0), - zeroGradientFvPatchField<scalar>::typeName + scalar(1), + dimless, + fvPatchFieldBase::zeroGradientType() ); computeLimiter(limiter, cells, nSmooth_); diff --git a/src/optimisation/adjointOptimisation/adjoint/dynamicMesh/motionSolver/elasticityMotionSolver/elasticityMotionSolver.C b/src/optimisation/adjointOptimisation/adjoint/dynamicMesh/motionSolver/elasticityMotionSolver/elasticityMotionSolver.C index 89f048fcc06..663f7e3ea9a 100644 --- a/src/optimisation/adjointOptimisation/adjoint/dynamicMesh/motionSolver/elasticityMotionSolver/elasticityMotionSolver.C +++ b/src/optimisation/adjointOptimisation/adjoint/dynamicMesh/motionSolver/elasticityMotionSolver/elasticityMotionSolver.C @@ -153,7 +153,7 @@ Foam::elasticityMotionSolver::elasticityMotionSolver ), fvMesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), exponent_(this->coeffDict().get<scalar>("exponent")), nSteps_(this->coeffDict().get<label>("steps")), diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointEikonalSolver/adjointEikonalSolverIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointEikonalSolver/adjointEikonalSolverIncompressible.C index 85ad4b6d32b..bdffd2682eb 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointEikonalSolver/adjointEikonalSolverIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/adjointEikonalSolver/adjointEikonalSolverIncompressible.C @@ -55,7 +55,7 @@ wordList adjointEikonalSolver::patchTypes() const for (const label patchi : wallPatchIDs_) { - daTypes[patchi] = zeroGradientFvPatchScalarField::typeName; + daTypes[patchi] = fvPatchFieldBase::zeroGradientType(); } return daTypes; diff --git a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurface/sensitivitySurfaceIncompressible.C b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurface/sensitivitySurfaceIncompressible.C index 8844079cfd2..3b93e7cbcfa 100644 --- a/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurface/sensitivitySurfaceIncompressible.C +++ b/src/optimisation/adjointOptimisation/adjoint/optimisation/adjointSensitivity/incompressible/sensitivitySurface/sensitivitySurfaceIncompressible.C @@ -320,7 +320,7 @@ void sensitivitySurface::smoothSensitivities() ), aMesh, dimensionedScalar(dimless, Zero), - zeroGradientFaPatchField<scalar>::typeName + faPatchFieldBase::zeroGradientType() ); // Copy sensitivities to area field diff --git a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointkOmegaSST/adjointkOmegaSST.C b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointkOmegaSST/adjointkOmegaSST.C index 0dc5bd71988..82ad7014cff 100644 --- a/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointkOmegaSST/adjointkOmegaSST.C +++ b/src/optimisation/adjointOptimisation/adjoint/turbulenceModels/incompressibleAdjoint/adjointRAS/adjointkOmegaSST/adjointkOmegaSST.C @@ -2293,7 +2293,7 @@ tmp<volTensorField> adjointkOmegaSST::FISensitivityTerm() ), mesh_, dimensionedTensor(sqr(dimLength)/pow3(dimTime), Zero), - zeroGradientFvPatchTensorField::typeName + fvPatchFieldBase::zeroGradientType() ) ); volTensorField& FISens = tFISens.ref(); diff --git a/src/overset/cellCellStencil/cellCellStencil/cellCellStencilTemplates.C b/src/overset/cellCellStencil/cellCellStencil/cellCellStencilTemplates.C index f0834d5dbae..fd5ebc59920 100644 --- a/src/overset/cellCellStencil/cellCellStencil/cellCellStencilTemplates.C +++ b/src/overset/cellCellStencil/cellCellStencil/cellCellStencilTemplates.C @@ -171,7 +171,7 @@ Foam::cellCellStencil::createField ), mesh, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); volScalarField& fld = tfld.ref(); diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index f678ec9e25c..a9f238d1c08 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -534,7 +534,7 @@ Foam::cellCellStencils::cellVolumeWeight::cellVolumeWeight ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), allowInterpolatedDonors_ ( diff --git a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C index 1f49f27ff8a..a6eeba364a8 100644 --- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C @@ -1736,7 +1736,7 @@ Foam::cellCellStencils::inverseDistance::inverseDistance ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ) { // Protect local fields from interpolation diff --git a/src/overset/include/createCellMask.H b/src/overset/include/createCellMask.H index 8cea239768b..5ccd58ac39c 100644 --- a/src/overset/include/createCellMask.H +++ b/src/overset/include/createCellMask.H @@ -46,8 +46,9 @@ volScalarField cellMask IOobject::NO_WRITE ), mesh, - dimensionedScalar("one", dimless, 1.0), - zeroGradientFvPatchScalarField::typeName + scalar(1), + dimless, + fvPatchFieldBase::zeroGradientType() ); surfaceScalarField faceMask diff --git a/src/overset/include/createInterpolatedCells.H b/src/overset/include/createInterpolatedCells.H index a3f6d61704b..881833fd439 100644 --- a/src/overset/include/createInterpolatedCells.H +++ b/src/overset/include/createInterpolatedCells.H @@ -46,8 +46,9 @@ volScalarField interpolatedCells IOobject::NO_WRITE ), mesh, - dimensionedScalar("one", dimless, 1.0), - zeroGradientFvPatchScalarField::typeName + scalar(1), + dimless, + fvPatchFieldBase::zeroGradientType() ); #include "setInterpolatedCells.H" diff --git a/src/overset/oversetFvMesh/oversetFvMeshBase.C b/src/overset/oversetFvMesh/oversetFvMeshBase.C index d297cebdc61..8182a1f9277 100644 --- a/src/overset/oversetFvMesh/oversetFvMeshBase.C +++ b/src/overset/oversetFvMesh/oversetFvMeshBase.C @@ -656,7 +656,7 @@ bool Foam::oversetFvMeshBase::writeObject ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); forAll(volTypes.internalField(), cellI) @@ -680,7 +680,7 @@ bool Foam::oversetFvMeshBase::writeObject ), mesh_, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); const cellCellStencilObject& overlap = Stencil::New(mesh_); @@ -719,8 +719,9 @@ bool Foam::oversetFvMeshBase::writeObject IOobject::NO_REGISTER ), mesh_, - dimensionedScalar("minOne", dimless, scalar(-1)), - zeroGradientFvPatchScalarField::typeName + scalar(-1), + dimless, + fvPatchFieldBase::zeroGradientType() ); forAll(cellStencil, cellI) diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/InterfaceCompositionModel/InterfaceCompositionModel.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/InterfaceCompositionModel/InterfaceCompositionModel.C index baf820ab435..4c15779cc33 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/InterfaceCompositionModel/InterfaceCompositionModel.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/InterfaceCompositionModel/InterfaceCompositionModel.C @@ -90,7 +90,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::getSpecieMassFraction ), mesh, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); auto& Ys = tY.ref(); @@ -123,8 +123,9 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::getSpecieMassFraction IOobject::NO_WRITE ), mesh, - dimensionedScalar("one", dimless, scalar(1)), - zeroGradientFvPatchScalarField::typeName + scalar(1), + dimless, + fvPatchFieldBase::zeroGradientType() ); } @@ -156,7 +157,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::MwMixture dimMass/dimMoles, 1e-3*mixture.cellMixture(0).W() ), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); } @@ -328,7 +329,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L ), p.mesh(), dimensionedScalar(dimEnergy/dimMass, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); auto& L = tmpL.ref(); diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/segregated/segregated.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/segregated/segregated.C index 3f96b5353e7..e3b8208670a 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/segregated/segregated.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/interfacialModels/dragModels/segregated/segregated.C @@ -104,7 +104,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const ), mesh, dimensionedScalar(dimLength), - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ); L.primitiveFieldRef() = cbrt(mesh.V()); L.correctBoundaryConditions(); diff --git a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/segregated/segregated.C b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/segregated/segregated.C index aa9860f0daf..c67eaa8bf13 100644 --- a/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/segregated/segregated.C +++ b/src/phaseSystemModels/twoPhaseEuler/twoPhaseSystem/interfacialModels/dragModels/segregated/segregated.C @@ -104,7 +104,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const ), mesh, dimensionedScalar(dimLength, Zero), - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ); L.primitiveFieldRef() = cbrt(mesh.V()); L.correctBoundaryConditions(); diff --git a/src/regionFaModels/KirchhoffShell/KirchhoffShell.C b/src/regionFaModels/KirchhoffShell/KirchhoffShell.C index fa9a645c98b..cef06db82b9 100644 --- a/src/regionFaModels/KirchhoffShell/KirchhoffShell.C +++ b/src/regionFaModels/KirchhoffShell/KirchhoffShell.C @@ -297,7 +297,7 @@ const tmp<areaScalarField> KirchhoffShell::rho() const ), regionMesh(), dimensionedScalar("rho", dimDensity, solid().rho()), - zeroGradientFaPatchScalarField::typeName + faPatchFieldBase::zeroGradientType() ) ); } diff --git a/src/regionFaModels/thermalShell/thermalShell.C b/src/regionFaModels/thermalShell/thermalShell.C index 9d7fe5855dc..43830c875fa 100644 --- a/src/regionFaModels/thermalShell/thermalShell.C +++ b/src/regionFaModels/thermalShell/thermalShell.C @@ -199,7 +199,7 @@ const tmp<areaScalarField> thermalShell::Cp() const ), regionMesh(), dimensionedScalar(dimEnergy/dimTemperature/dimMass, thermo_.Cp()), - zeroGradientFaPatchScalarField::typeName + faPatchFieldBase::zeroGradientType() ) ); } @@ -222,7 +222,7 @@ const tmp<areaScalarField> thermalShell::rho() const ), regionMesh(), dimensionedScalar(dimDensity, thermo_.rho()), - zeroGradientFaPatchScalarField::typeName + faPatchFieldBase::zeroGradientType() ) ); } @@ -249,7 +249,7 @@ const tmp<areaScalarField> thermalShell::kappa() const dimPower/dimLength/dimTemperature, thermo_.kappa() ), - zeroGradientFaPatchScalarField::typeName + faPatchFieldBase::zeroGradientType() ) ); } diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index ff95490d56e..871fdcc199a 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -56,11 +56,11 @@ void Foam::regionModels::singleLayerRegion::constructMeshObjects() time_.timeName(), regionMesh(), IOobject::READ_IF_PRESENT, - NO_WRITE + IOobject::NO_WRITE ), regionMesh(), dimensionedVector(dimless, Zero), - zeroGradientFvPatchField<vector>::typeName + fvPatchFieldBase::zeroGradientType() ) ); @@ -75,11 +75,11 @@ void Foam::regionModels::singleLayerRegion::constructMeshObjects() time_.timeName(), regionMesh(), IOobject::READ_IF_PRESENT, - NO_WRITE + IOobject::NO_WRITE ), regionMesh(), dimensionedScalar(dimArea, Zero), - zeroGradientFvPatchField<scalar>::typeName + fvPatchFieldBase::zeroGradientType() ) ); } diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C index b60a9d7bb1a..56cb155b31d 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C @@ -36,13 +36,14 @@ template<class Type> Foam::wordList Foam::regionModels::singleLayerRegion::mappedFieldAndInternalPatchTypes() const { - wordList bTypes(regionMesh().boundaryMesh().size()); + wordList bTypes + ( + regionMesh().boundaryMesh().size(), + fvPatchFieldBase::zeroGradientType() + ); - bTypes = zeroGradientFvPatchField<Type>::typeName; - - forAll(intCoupledPatchIDs_, i) + for (const label patchi : intCoupledPatchIDs_) { - const label patchi = intCoupledPatchIDs_[i]; bTypes[patchi] = mappedFixedInternalValueFvPatchField<Type>::typeName; } @@ -54,13 +55,14 @@ template<class Type> Foam::wordList Foam::regionModels::singleLayerRegion::mappedPushedFieldPatchTypes() const { - wordList bTypes(regionMesh().boundaryMesh().size()); - - bTypes = zeroGradientFvPatchField<Type>::typeName; + wordList bTypes + ( + regionMesh().boundaryMesh().size(), + fvPatchFieldBase::zeroGradientType() + ); - forAll(intCoupledPatchIDs_, i) + for (const label patchi : intCoupledPatchIDs_) { - const label patchi = intCoupledPatchIDs_[i]; bTypes[patchi] = mappedFixedPushedInternalValueFvPatchField<Type>::typeName; } diff --git a/src/regionModels/surfaceFilmModels/functionObjects/filmFlux/filmFlux.C b/src/regionModels/surfaceFilmModels/functionObjects/filmFlux/filmFlux.C index 0cc9c2005b7..aad394213ed 100644 --- a/src/regionModels/surfaceFilmModels/functionObjects/filmFlux/filmFlux.C +++ b/src/regionModels/surfaceFilmModels/functionObjects/filmFlux/filmFlux.C @@ -129,7 +129,7 @@ bool Foam::functionObjects::filmFlux::execute() ), filmMesh, dimensionedScalar(dimLength, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); auto& heightc = height.ref(); diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index 09763a0dbcc..58a6beeb1b5 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -468,7 +468,7 @@ kinematicSingleLayer::kinematicSingleLayer ), regionMesh(), dimensionedScalar(dimDensity, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), mu_ ( @@ -482,7 +482,7 @@ kinematicSingleLayer::kinematicSingleLayer ), regionMesh(), dimensionedScalar(dimPressure*dimTime, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), sigma_ ( @@ -496,7 +496,7 @@ kinematicSingleLayer::kinematicSingleLayer ), regionMesh(), dimensionedScalar(dimMass/sqr(dimTime), Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), delta_ @@ -523,7 +523,7 @@ kinematicSingleLayer::kinematicSingleLayer ), regionMesh(), dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), U_ ( @@ -548,7 +548,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), U_, - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), Uw_ ( @@ -561,7 +561,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), U_, - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), deltaRho_ ( @@ -575,7 +575,7 @@ kinematicSingleLayer::kinematicSingleLayer ), regionMesh(), dimensionedScalar(delta_.dimensions()*rho_.dimensions(), Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), phi_ @@ -604,7 +604,7 @@ kinematicSingleLayer::kinematicSingleLayer ), regionMesh(), dimensionedScalar(dimMass, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), cloudMassTrans_ ( @@ -618,7 +618,7 @@ kinematicSingleLayer::kinematicSingleLayer ), regionMesh(), dimensionedScalar(dimMass, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), cloudDiameterTrans_ ( @@ -632,7 +632,7 @@ kinematicSingleLayer::kinematicSingleLayer ), regionMesh(), dimensionedScalar("minus1", dimLength, -1.0), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), USp_ diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index a5474ef420d..11c405527ad 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C @@ -204,11 +204,13 @@ tmp<scalarField> curvatureSeparation::calcCosAngle "cosAngle", mesh.time().timeName(), mesh, - IOobject::NO_READ + IOobject::NO_READ, + IOobject::NO_WRITE, + IOobject::NO_REGISTER ), mesh, dimensionedScalar(dimless, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); volCosAngle.primitiveFieldRef() = cosAngle; volCosAngle.correctBoundaryConditions(); @@ -346,11 +348,13 @@ void curvatureSeparation::correct "Fnet", mesh.time().timeName(), mesh, - IOobject::NO_READ + IOobject::NO_READ, + IOobject::NO_WRITE, + IOobject::NO_REGISTER ), mesh, dimensionedScalar(dimForce, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ); volFnet.primitiveFieldRef() = Fnet; volFnet.correctBoundaryConditions(); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C index 0a7d3eaedcf..b3c8c375a36 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C @@ -85,7 +85,7 @@ standardRadiation::standardRadiation ), film.regionMesh(), dimensionedScalar(dimMass/pow3(dimTime), Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), beta_(coeffDict_.get<scalar>("beta")), kappaBar_(coeffDict_.get<scalar>("kappaBar")) diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/waxSolventViscosity/waxSolventViscosity.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/waxSolventViscosity/waxSolventViscosity.C index 75a9b620dec..69a1a0e3be4 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/waxSolventViscosity/waxSolventViscosity.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/waxSolventViscosity/waxSolventViscosity.C @@ -126,7 +126,7 @@ waxSolventViscosity::waxSolventViscosity ), film.regionMesh(), dimensionedScalar(dimDynamicViscosity, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), muWaxModel_ ( @@ -149,7 +149,7 @@ waxSolventViscosity::waxSolventViscosity ), film.regionMesh(), dimensionedScalar(dimDynamicViscosity, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), muSolventModel_ ( diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C index f27a2ec32df..d9113f319ec 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C @@ -83,7 +83,7 @@ solidification::solidification ), film.regionMesh(), dimensionedScalar(dimMass, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), thickness_ ( @@ -97,7 +97,7 @@ solidification::solidification ), film.regionMesh(), dimensionedScalar(dimLength, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ) {} diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index b792aa807e5..30b5653e5f9 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -331,7 +331,7 @@ thermoSingleLayer::thermoSingleLayer ), regionMesh(), dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), kappa_ ( @@ -345,7 +345,7 @@ thermoSingleLayer::thermoSingleLayer ), regionMesh(), dimensionedScalar(dimEnergy/dimTime/dimLength/dimTemperature, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), T_ @@ -371,7 +371,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), T_, - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), Tw_ ( @@ -384,7 +384,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), T_, - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), hs_ ( @@ -413,7 +413,7 @@ thermoSingleLayer::thermoSingleLayer ), regionMesh(), dimensionedScalar(dimEnergy, Zero), - zeroGradientFvPatchScalarField::typeName + fvPatchFieldBase::zeroGradientType() ), deltaWet_(coeffs_.get<scalar>("deltaWet")), -- GitLab