From 6dc48b62d948ed6923cbbd13599311419ae0fe97 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 21 Dec 2018 18:37:13 +0000 Subject: [PATCH] Changed tmp and tmp construction to use the new simpler "New" method avoiding unnecessary database registration of temporary fields --- .../basic/potentialFoam/createFields.H | 2 +- .../PDRModels/dragModels/basic/basic.C | 23 +----- .../XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C | 11 +-- .../XiModels/XiEqModels/XiEqModel/XiEqModel.C | 12 +-- .../SCOPE/SCOPELaminarFlameSpeed.C | 44 ++--------- .../combustion/chemFoam/createFields.H | 2 +- .../liquidPropertiesSurfaceTension.C | 12 +-- .../multiphaseMixtureThermo.C | 18 +---- .../relativeVelocityModel.C | 11 +-- .../incompressibleThreePhaseMixture.C | 41 ++++------ .../multiphaseEulerFoam/createFields.H | 2 +- .../dragModels/interface/interface.C | 19 +---- .../constantDiameter/constantDiameter.C | 16 +--- .../multiphaseSystem/multiphaseSystem.C | 52 +++---------- .../multiphaseSystem/phaseModel/phaseModel.C | 2 +- .../multiphase/multiphaseEulerFoam/pEqn.H | 2 +- .../multiphaseMixture/multiphaseMixture.C | 18 +---- .../potentialFreeSurfaceFoam/createFields.H | 2 +- .../functionObjects/phaseForces/phaseForces.C | 10 +-- .../interfaceCompositionModels/Henry/Henry.C | 16 +--- .../InterfaceCompositionModel.C | 18 +---- .../constantSaturationConditions.C | 76 ++++--------------- .../saturationModels/function1/function1.C | 11 +-- .../saturationModels/polynomial/polynomial.C | 11 +-- .../constantSurfaceTensionCoefficient.C | 19 +---- .../constantAspectRatio/constantAspectRatio.C | 21 ++--- .../constantLiftCoefficient.C | 21 ++--- .../liftModels/noLift/noLift.C | 57 +++----------- .../swarmCorrections/noSwarm/noSwarm.C | 21 ++--- .../noTurbulentDispersion.C | 40 +++------- .../constantVirtualMassCoefficient.C | 19 +---- .../noVirtualMass/noVirtualMass.C | 21 ++--- .../noWallLubrication/noWallLubrication.C | 38 ++-------- .../blendingMethods/noBlending/noBlending.C | 52 +++---------- .../MomentumTransferPhaseSystem.C | 57 +++----------- .../constantDiameter/constantDiameter.C | 16 +--- .../velocityGroup/velocityGroup.C | 18 +---- .../InertPhaseModel/InertPhaseModel.C | 16 +--- .../IsothermalPhaseModel.C | 2 +- .../MovingPhaseModel/MovingPhaseModel.C | 11 ++- .../phaseSystems/phaseSystem/phaseSystem.C | 56 ++++---------- .../populationBalanceModel.C | 11 +-- .../multiphaseSystem/multiphaseSystem.C | 18 +---- .../JohnsonJacksonSchaefferFrictionalStress.C | 12 +-- .../constantAspectRatio/constantAspectRatio.C | 21 ++--- .../constantLiftCoefficient.C | 21 ++--- .../liftModels/noLift/noLift.C | 50 +++--------- .../swarmCorrections/noSwarm/noSwarm.C | 21 ++--- .../noTurbulentDispersion.C | 40 +++------- .../constantVirtualMassCoefficient.C | 19 +---- .../noVirtualMass/noVirtualMass.C | 21 ++--- .../noWallLubrication/noWallLubrication.C | 38 ++-------- .../JohnsonJacksonSchaefferFrictionalStress.C | 12 +-- .../Schaeffer/SchaefferFrictionalStress.C | 12 +-- .../kineticTheoryModel/kineticTheoryModel.C | 38 +++------- .../phasePressureModel/phasePressureModel.C | 46 +++-------- .../BlendedInterfacialModel.C | 48 ++---------- .../blendingMethods/noBlending/noBlending.C | 50 +++--------- .../IATE/IATEsources/dummy/dummy.C | 16 +--- .../randomCoalescence/randomCoalescence.C | 9 +-- .../turbulentBreakUp/turbulentBreakUp.C | 9 +-- .../constantDiameter/constantDiameter.C | 19 +---- .../kineticEnergyLimiter.H | 2 +- .../test/mappedPatch/Test-MappedPatch.C | 2 +- .../test/pointField/Test-PointField.C | 2 +- .../manipulation/renumberMesh/renumberMesh.C | 12 +-- .../dataConversion/smapToFoam/smapToFoam.C | 6 +- .../preProcessing/setWaves/setWaves.C | 8 +- src/OpenFOAM/db/regIOobject/regIOobject.C | 7 +- .../anisotropicFilter/anisotropicFilter.C | 4 +- .../DarcyForchheimer/DarcyForchheimer.C | 4 +- .../invDistLeastSquaresVectors.C | 4 +- .../leastSquaresGrad/leastSquaresVectors.C | 4 +- .../unweightedLeastSquaresVectors.C | 4 +- src/finiteVolume/fvMesh/fvMeshGeometry.C | 13 +--- .../advectionDiffusionPatchDistMethod.C | 2 +- .../limitedSchemes/PhiScheme/PhiScheme.C | 9 +-- .../limitedSchemes/blended/blended.H | 38 ++-------- .../limitedSchemes/upwind/upwind.H | 19 +---- .../schemes/CoBlended/CoBlended.H | 27 +++---- .../schemes/cellCoBlended/cellCoBlended.H | 21 +++-- .../schemes/clippedLinear/clippedLinear.H | 9 +-- .../schemes/linearUpwind/linearUpwind.C | 12 +-- .../schemes/midPoint/midPoint.H | 12 +-- .../schemes/reverseLinear/reverseLinear.H | 9 +-- .../field/wallShearStress/wallShearStress.C | 2 +- .../icoUncoupledKinematicCloud.C | 2 +- .../meanVelocityForce/meanVelocityForce.C | 2 +- .../interRegionExplicitPorositySource.C | 4 +- .../coalCloudList/coalCloudListI.H | 2 +- .../Templates/KinematicCloud/KinematicCloud.C | 2 +- .../MPPIC/PackingModels/Implicit/Implicit.C | 20 ++--- .../molecule/mdTools/createMDFields.H | 15 ++-- .../medialAxisMeshMover.C | 4 +- .../meshRefinement/meshRefinement.C | 2 +- .../snappyHexMeshDriver/snappyLayerDriver.C | 2 +- .../regionModel/regionModel1D/regionModel1D.C | 1 - .../singleLayerRegion/singleLayerRegion.C | 2 +- .../kinematicSingleLayer.C | 6 +- .../filmTurbulenceModel/laminar/laminar.C | 2 +- .../contactAngleForce/contactAngleForce.C | 2 +- 101 files changed, 445 insertions(+), 1302 deletions(-) diff --git a/applications/solvers/basic/potentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/createFields.H index 8d16dce62a..3a95e820e2 100644 --- a/applications/solvers/basic/potentialFoam/createFields.H +++ b/applications/solvers/basic/potentialFoam/createFields.H @@ -12,7 +12,7 @@ volVectorField U mesh ); -U = dimensionedVector("0", U.dimensions(), Zero); +U = dimensionedVector(U.dimensions(), Zero); surfaceScalarField phi ( diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 6f476b2fd1..4aaa2289f3 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -93,20 +93,12 @@ Foam::tmp Foam::PDRDragModels::basic::Dcu() const { tmp tDragDcu ( - new volSymmTensorField + volSymmTensorField::New ( - IOobject - ( - "tDragDcu", - U_.mesh().time().constant(), - U_.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "tDragDcu", U_.mesh(), dimensionedSymmTensor ( - "zero", dimMass/dimTime/pow(dimLength, 3), Zero ) @@ -132,16 +124,9 @@ Foam::tmp Foam::PDRDragModels::basic::Gk() const { tmp tGk ( - new volScalarField + volScalarField::New ( - IOobject - ( - "tGk", - U_.mesh().time().constant(), - U_.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "tGk", U_.mesh(), dimensionedScalar(dimMass/dimLength/pow(dimTime, 3), 0) ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index 117e09383a..75fa38e996 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -94,16 +94,9 @@ Foam::tmp Foam::XiEqModels::SCOPEXiEq::XiEq() const tmp tXiEq ( - new volScalarField + volScalarField::New ( - IOobject - ( - "XiEq", - epsilon.time().timeName(), - epsilon.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "XiEq", epsilon.mesh(), dimensionedScalar(dimless, 0) ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index da962d63e4..0490954edd 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -98,17 +98,9 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const tmp tN ( - new volScalarField + volScalarField::New ( - IOobject - ( - "tN", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "tN", mesh, dimensionedScalar(Nv.dimensions(), 0) ) diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index 861a4a3af0..999efbdc0c 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -244,16 +244,9 @@ Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi { tmp tSu0 ( - new volScalarField + volScalarField::New ( - IOobject - ( - "Su0", - p.time().timeName(), - p.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Su0", p.mesh(), dimensionedScalar(dimVelocity, 0) ) @@ -293,16 +286,9 @@ Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi { tmp tSu0 ( - new volScalarField + volScalarField::New ( - IOobject - ( - "Su0", - p.time().timeName(), - p.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Su0", p.mesh(), dimensionedScalar(dimVelocity, 0) ) @@ -347,16 +333,9 @@ Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Ma { tmp tMa ( - new volScalarField + volScalarField::New ( - IOobject - ( - "Ma", - phi.time().timeName(), - phi.db(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Ma", phi.mesh(), dimensionedScalar(dimless, 0) ) @@ -407,16 +386,9 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const return tmp ( - new volScalarField + volScalarField::New ( - IOobject - ( - "Ma", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Ma", mesh, dimensionedScalar(dimless, Ma(equivalenceRatio_)) ) diff --git a/applications/solvers/combustion/chemFoam/createFields.H b/applications/solvers/combustion/chemFoam/createFields.H index bb179c3e46..b259276fef 100644 --- a/applications/solvers/combustion/chemFoam/createFields.H +++ b/applications/solvers/combustion/chemFoam/createFields.H @@ -75,7 +75,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, Zero) + dimensionedVector(dimVelocity, Zero) ); #include "createPhi.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C b/applications/solvers/multiphase/compressibleInterFoam/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C index fc58d7a9a5..82e4fc04a6 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C +++ b/applications/solvers/multiphase/compressibleInterFoam/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C @@ -78,17 +78,9 @@ Foam::surfaceTensionModels::liquidProperties::sigma() const tmp tsigma ( - new volScalarField + volScalarField::New ( - IOobject - ( - "sigma", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "sigma", mesh_, dimSigma ) diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 1b8af455cf..bbd50a290e 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -770,14 +770,9 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const { tmp tstf ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "surfaceTensionForce", - mesh_.time().timeName(), - mesh_ - ), + "surfaceTensionForce", mesh_, dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), 0) ) @@ -1021,14 +1016,9 @@ Foam::multiphaseMixtureThermo::nearInterface() const { tmp tnearInt ( - new volScalarField + volScalarField::New ( - IOobject - ( - "nearInterface", - mesh_.time().timeName(), - mesh_ - ), + "nearInterface", mesh_, dimensionedScalar(dimless, 0) ) diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C index 3478869352..86c8d5b256 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C @@ -90,7 +90,7 @@ Foam::relativeVelocityModel::relativeVelocityModel IOobject::AUTO_WRITE ), alphac_.mesh(), - dimensionedVector("Udm", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), UdmPatchFieldTypes() ) {} @@ -155,13 +155,10 @@ tmp Foam::relativeVelocityModel::tauDm() const // Calculate the relative velocity of the continuous phase w.r.t the mean volVectorField Ucm(betad*Udm_/betac); - return tmp + return volSymmTensorField::New ( - new volSymmTensorField - ( - "tauDm", - betad*sqr(Udm_) + betac*sqr(Ucm) - ) + "tauDm", + betad*sqr(Udm_) + betac*sqr(Ucm) ); } diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C index 34f6422120..93919ad2cb 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C @@ -165,15 +165,12 @@ Foam::incompressibleThreePhaseMixture::incompressibleThreePhaseMixture Foam::tmp Foam::incompressibleThreePhaseMixture::mu() const { - return tmp + return volScalarField::New ( - new volScalarField - ( - "mu", - alpha1_*rho1_*nuModel1_->nu() - + alpha2_*rho2_*nuModel2_->nu() - + alpha3_*rho3_*nuModel3_->nu() - ) + "mu", + alpha1_*rho1_*nuModel1_->nu() + + alpha2_*rho2_*nuModel2_->nu() + + alpha3_*rho3_*nuModel3_->nu() ); } @@ -185,15 +182,12 @@ Foam::incompressibleThreePhaseMixture::muf() const surfaceScalarField alpha2f(fvc::interpolate(alpha2_)); surfaceScalarField alpha3f(fvc::interpolate(alpha3_)); - return tmp + return surfaceScalarField::New ( - new surfaceScalarField - ( - "mu", - alpha1f*rho1_*fvc::interpolate(nuModel1_->nu()) - + alpha2f*rho2_*fvc::interpolate(nuModel2_->nu()) - + alpha3f*rho3_*fvc::interpolate(nuModel3_->nu()) - ) + "mu", + alpha1f*rho1_*fvc::interpolate(nuModel1_->nu()) + + alpha2f*rho2_*fvc::interpolate(nuModel2_->nu()) + + alpha3f*rho3_*fvc::interpolate(nuModel3_->nu()) ); } @@ -205,17 +199,14 @@ Foam::incompressibleThreePhaseMixture::nuf() const surfaceScalarField alpha2f(fvc::interpolate(alpha2_)); surfaceScalarField alpha3f(fvc::interpolate(alpha3_)); - return tmp + return surfaceScalarField::New ( - new surfaceScalarField + "nu", ( - "nu", - ( - alpha1f*rho1_*fvc::interpolate(nuModel1_->nu()) - + alpha2f*rho2_*fvc::interpolate(nuModel2_->nu()) - + alpha3f*rho3_*fvc::interpolate(nuModel3_->nu()) - )/(alpha1f*rho1_ + alpha2f*rho2_ + alpha3f*rho3_) - ) + alpha1f*rho1_*fvc::interpolate(nuModel1_->nu()) + + alpha2f*rho2_*fvc::interpolate(nuModel2_->nu()) + + alpha3f*rho3_*fvc::interpolate(nuModel3_->nu()) + )/(alpha1f*rho1_ + alpha2f*rho2_ + alpha3f*rho3_) ); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H index 6e94eecd09..83637e370c 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H @@ -23,7 +23,7 @@ volVectorField U IOobject::AUTO_WRITE ), mesh, - dimensionedVector("U", dimVelocity, Zero) + dimensionedVector(dimVelocity, Zero) ); surfaceScalarField phi diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/interface/interface.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/interface/interface.C index bd79cba7c1..923a29139d 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/interface/interface.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/interface/interface.C @@ -70,22 +70,11 @@ Foam::tmp Foam::dragModels::interface::K const volScalarField& Ur ) const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "K", - Ur.mesh().time().timeName(), - Ur.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - Ur.mesh(), - dimensionedScalar(dimDensity/dimTime, 0) - ) + "K", + Ur.mesh(), + dimensionedScalar(dimDensity/dimTime, 0) ); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.C index dc18e69bf0..8b99843048 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/constantDiameter/constantDiameter.C @@ -67,19 +67,11 @@ Foam::diameterModels::constant::~constant() Foam::tmp Foam::diameterModels::constant::d() const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "d", - phase_.U().time().timeName(), - phase_.U().mesh() - ), - phase_.U().mesh(), - d_ - ) + "d", + phase_.U().mesh(), + d_ ); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index f47581d187..a594c25b39 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -551,14 +551,9 @@ Foam::tmp Foam::multiphaseSystem::Cvm { tmp tCvm ( - new volScalarField + volScalarField::New ( - IOobject - ( - "Cvm", - mesh_.time().timeName(), - mesh_ - ), + "Cvm", mesh_, dimensionedScalar(dimensionSet(1, -3, 0, 0, 0), 0) ) @@ -602,21 +597,11 @@ Foam::tmp Foam::multiphaseSystem::Svm { tmp tSvm ( - new volVectorField + volVectorField::New ( - IOobject - ( - "Svm", - mesh_.time().timeName(), - mesh_ - ), + "Svm", mesh_, - dimensionedVector - ( - "Svm", - dimensionSet(1, -2, -2, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); @@ -729,14 +714,9 @@ Foam::tmp Foam::multiphaseSystem::dragCoeff { tmp tdragCoeff ( - new volScalarField + volScalarField::New ( - IOobject - ( - "dragCoeff", - mesh_.time().timeName(), - mesh_ - ), + "dragCoeff", mesh_, dimensionedScalar(dimensionSet(1, -3, -1, 0, 0), 0) ) @@ -772,14 +752,9 @@ Foam::tmp Foam::multiphaseSystem::surfaceTension { tmp tSurfaceTension ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "surfaceTension", - mesh_.time().timeName(), - mesh_ - ), + "surfaceTension", mesh_, dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), 0) ) @@ -818,14 +793,9 @@ Foam::multiphaseSystem::nearInterface() const { tmp tnearInt ( - new volScalarField + volScalarField::New ( - IOobject - ( - "nearInterface", - mesh_.time().timeName(), - mesh_ - ), + "nearInterface", mesh_, dimensionedScalar(dimless, 0) ) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C index 64ebd765e9..82582ecd26 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C @@ -99,7 +99,7 @@ Foam::phaseModel::phaseModel mesh ), mesh, - dimensionedVector("0", dimVelocity/dimTime, Zero) + dimensionedVector(dimVelocity/dimTime, Zero) ), alphaPhi_ ( diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index e9dd2aa0ed..c9424174d6 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -266,7 +266,7 @@ mSfGradp = pEqnIncomp.flux()/rAUf; - U = dimensionedVector("U", dimVelocity, Zero); + U = dimensionedVector(dimVelocity, Zero); phasei = 0; forAllIter(PtrDictionary, fluid.phases(), iter) diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index 04e70005c8..e3af4aebc0 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -254,14 +254,9 @@ Foam::multiphaseMixture::surfaceTensionForce() const { tmp tstf ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "surfaceTensionForce", - mesh_.time().timeName(), - mesh_ - ), + "surfaceTensionForce", mesh_, dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), 0) ) @@ -530,14 +525,9 @@ Foam::multiphaseMixture::nearInterface() const { tmp tnearInt ( - new volScalarField + volScalarField::New ( - IOobject - ( - "nearInterface", - mesh_.time().timeName(), - mesh_ - ), + "nearInterface", mesh_, dimensionedScalar(dimless, 0) ) diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H index 1841df1f48..a9a7807949 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H @@ -49,7 +49,7 @@ volVectorField zeta IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimLength, Zero) + dimensionedVector(dimLength, Zero) ); Info<< "Creating field p_gh\n" << endl; diff --git a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/phaseForces/phaseForces.C b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/phaseForces/phaseForces.C index bb6edc4b07..27c3f01245 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/phaseForces/phaseForces.C +++ b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/phaseForces/phaseForces.C @@ -110,7 +110,7 @@ Foam::functionObjects::phaseForces::phaseForces mesh_ ), mesh_, - dimensionedVector("0", dimForce/dimVolume, Zero) + dimensionedVector(dimForce/dimVolume, Zero) ) ); } @@ -133,7 +133,7 @@ Foam::functionObjects::phaseForces::phaseForces mesh_ ), mesh_, - dimensionedVector("0", dimForce/dimVolume, Zero) + dimensionedVector(dimForce/dimVolume, Zero) ) ); } @@ -152,7 +152,7 @@ Foam::functionObjects::phaseForces::phaseForces mesh_ ), mesh_, - dimensionedVector("0", dimForce/dimVolume, Zero) + dimensionedVector(dimForce/dimVolume, Zero) ) ); } @@ -175,7 +175,7 @@ Foam::functionObjects::phaseForces::phaseForces mesh_ ), mesh_, - dimensionedVector("0", dimForce/dimVolume, Zero) + dimensionedVector(dimForce/dimVolume, Zero) ) ); } @@ -198,7 +198,7 @@ Foam::functionObjects::phaseForces::phaseForces mesh_ ), mesh_, - dimensionedVector("0", dimForce/dimVolume, Zero) + dimensionedVector(dimForce/dimVolume, Zero) ) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C index 75b261901e..9309ead780 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C @@ -116,19 +116,11 @@ Foam::interfaceCompositionModels::Henry::YfPrime const volScalarField& Tf ) const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - IOobject::groupName("YfPrime", this->pair_.name()), - this->pair_.phase1().mesh().time().timeName(), - this->pair_.phase1().mesh() - ), - this->pair_.phase1().mesh(), - dimensionedScalar(dimless/dimTemperature, 0) - ) + IOobject::groupName("YfPrime", this->pair_.name()), + this->pair_.phase1().mesh(), + dimensionedScalar(dimless/dimTemperature, 0) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C index bd23e1d6d1..3335da8f01 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C @@ -140,14 +140,9 @@ Foam::InterfaceCompositionModel::D tmp tmpD ( - new volScalarField + volScalarField::New ( - IOobject - ( - IOobject::groupName("D", pair_.name()), - p.time().timeName(), - p.mesh() - ), + IOobject::groupName("D", pair_.name()), p.mesh(), dimensionedScalar(dimArea/dimTime, 0) ) @@ -194,14 +189,9 @@ Foam::InterfaceCompositionModel::L tmp tmpL ( - new volScalarField + volScalarField::New ( - IOobject - ( - IOobject::groupName("L", pair_.name()), - p.time().timeName(), - p.mesh() - ), + IOobject::groupName("L", pair_.name()), p.mesh(), dimensionedScalar(dimEnergy/dimMass, 0) ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C index dcf42f4ab3..391d4559b8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C @@ -73,22 +73,11 @@ Foam::saturationModels::constantSaturationConditions::pSat const volScalarField& T ) const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "pSat", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - T.mesh(), - pSat_ - ) + "pSat", + T.mesh(), + pSat_ ); } @@ -99,22 +88,11 @@ Foam::saturationModels::constantSaturationConditions::pSatPrime const volScalarField& T ) const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "pSatPrime", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - T.mesh(), - dimensionedScalar(dimPressure/dimTemperature, 0) - ) + "pSatPrime", + T.mesh(), + dimensionedScalar(dimPressure/dimTemperature, 0) ); } @@ -125,22 +103,11 @@ Foam::saturationModels::constantSaturationConditions::lnPSat const volScalarField& T ) const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "lnPSat", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - T.mesh(), - dimensionedScalar(dimless, log(pSat_.value())) - ) + "lnPSat", + T.mesh(), + dimensionedScalar(dimless, log(pSat_.value())) ); } @@ -151,22 +118,11 @@ Foam::saturationModels::constantSaturationConditions::Tsat const volScalarField& p ) const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "Tsat", - p.mesh().time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - p.mesh(), - Tsat_ - ) + "Tsat", + p.mesh(), + Tsat_ ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C index 4bed5f0263..9a2d32b06b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C @@ -103,16 +103,9 @@ Foam::saturationModels::function1::Tsat { tmp tTsat ( - new volScalarField + volScalarField::New ( - IOobject - ( - "Tsat", - p.mesh().time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Tsat", p.mesh(), dimensionedScalar(dimTemperature, 0) ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C index 7f06b14d21..bc9e506b7c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C @@ -100,16 +100,9 @@ Foam::saturationModels::polynomial::Tsat { tmp tTsat ( - new volScalarField + volScalarField::New ( - IOobject - ( - "Tsat", - p.mesh().time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Tsat", p.mesh(), dimensionedScalar(dimTemperature, 0) ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/constantSurfaceTensionCoefficient/constantSurfaceTensionCoefficient.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/constantSurfaceTensionCoefficient/constantSurfaceTensionCoefficient.C index ea58cb6925..07e9d1d98e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/constantSurfaceTensionCoefficient/constantSurfaceTensionCoefficient.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/surfaceTensionModels/constantSurfaceTensionCoefficient/constantSurfaceTensionCoefficient.C @@ -73,22 +73,11 @@ Foam::surfaceTensionModels::constantSurfaceTensionCoefficient::sigma() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "sigma", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - sigma_ - ) + "sigma", + mesh, + sigma_ ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C index 7ccb9d0b3f..d842828fe7 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C @@ -70,21 +70,12 @@ Foam::aspectRatioModels::constantAspectRatio::E() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - aspectRatioModel::typeName + ":E", - mesh.time().timeName(), - mesh - ), - mesh, - E0_ - ) - ); + return volScalarField::New + ( + aspectRatioModel::typeName + ":E", + mesh, + E0_ + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C index 026ccf52f9..68bea6dfa9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C @@ -65,21 +65,12 @@ Foam::liftModels::constantLiftCoefficient::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - Cl_ - ) - ); + return volScalarField::New + ( + "zero", + mesh, + Cl_ + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C index 1de375b5c4..a6868ede7e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C @@ -63,22 +63,11 @@ Foam::tmp Foam::liftModels::noLift::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "Cl", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar(dimless, 0) - ) + "Cl", + mesh, + dimensionedScalar(dimless, 0) ); } @@ -87,22 +76,11 @@ Foam::tmp Foam::liftModels::noLift::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volVectorField::New ( - new volVectorField - ( - IOobject - ( - "noLift:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) + "noLift:F", + mesh, + dimensionedVector(dimF, Zero) ); } @@ -111,22 +89,11 @@ Foam::tmp Foam::liftModels::noLift::Ff() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return surfaceScalarField::New ( - new surfaceScalarField - ( - IOobject - ( - "noLift:Ff", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar(dimF*dimArea, 0) - ) + "noLift:Ff", + mesh, + dimensionedScalar(dimF*dimArea, 0) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/noSwarm/noSwarm.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/noSwarm/noSwarm.C index a4087cb7b1..c15bf29921 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/noSwarm/noSwarm.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/swarmCorrections/noSwarm/noSwarm.C @@ -63,21 +63,12 @@ Foam::tmp Foam::swarmCorrections::noSwarm::Cs() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "one", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar(dimless, 1) - ) - ); + return volScalarField::New + ( + "Cs", + mesh, + dimensionedScalar(dimless, 1) + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C index 327d74f7db..74438c8061 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C @@ -70,22 +70,11 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::D() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar(dimD, 0) - ) + "zero", + mesh, + dimensionedScalar(dimD, 0) ); } @@ -95,21 +84,12 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volVectorField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) - ); + return volVectorField::New + ( + "zero", + mesh, + dimensionedVector(dimF, Zero) + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C index 54e929f051..a5ddc6abe6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C @@ -73,22 +73,11 @@ Foam::virtualMassModels::constantVirtualMassCoefficient::Cvm() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "Cvm", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - Cvm_ - ) + "Cvm", + mesh, + Cvm_ ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C index d9db88a61d..ce8bf6c193 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C @@ -65,21 +65,12 @@ Foam::virtualMassModels::noVirtualMass::Cvm() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar(dimless, 0) - ) - ); + return volScalarField::New + ( + "zero", + mesh, + dimensionedScalar(dimless, 0) + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C index b1449c2e18..dd62683b65 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C @@ -69,22 +69,11 @@ Foam::wallLubricationModels::noWallLubrication::Fi() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volVectorField::New ( - new volVectorField - ( - IOobject - ( - "noWallLubrication:Fi", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) + "noWallLubrication:Fi", + mesh, + dimensionedVector(dimF, Zero) ); } @@ -94,22 +83,11 @@ Foam::wallLubricationModels::noWallLubrication::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volVectorField::New ( - new volVectorField - ( - IOobject - ( - "noWallLubrication:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) + "noWallLubrication:F", + mesh, + dimensionedVector(dimF, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C index c97e616e2c..ea8696c043 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C @@ -72,26 +72,12 @@ Foam::tmp Foam::blendingMethods::noBlending::f1 { const fvMesh& mesh(phase1.mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "f", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar - ( - "f", - dimless, - phase2.name() == continuousPhase_ - ) - ) - ); + return volScalarField::New + ( + "f", + mesh, + dimensionedScalar(dimless, phase2.name() == continuousPhase_) + ); } @@ -103,26 +89,12 @@ Foam::tmp Foam::blendingMethods::noBlending::f2 { const fvMesh& mesh(phase1.mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "f", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar - ( - "f", - dimless, - phase1.name() == continuousPhase_ - ) - ) - ); + return volScalarField::New + ( + "f", + mesh, + dimensionedScalar(dimless, phase1.name() == continuousPhase_) + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index c26ae71711..42b6acb8eb 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -60,22 +60,11 @@ Foam::MomentumTransferPhaseSystem::Kd } else { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - dragModel::typeName + ":K", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar(dragModel::dimK, 0) - ) + dragModel::typeName + ":K", + this->mesh_, + dimensionedScalar(dragModel::dimK, 0) ); } } @@ -94,22 +83,11 @@ Foam::MomentumTransferPhaseSystem::Kdf } else { - return tmp + return surfaceScalarField::New ( - new surfaceScalarField - ( - IOobject - ( - dragModel::typeName + ":K", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar(dragModel::dimK, 0) - ) + dragModel::typeName + ":K", + this->mesh_, + dimensionedScalar(dragModel::dimK, 0) ); } } @@ -128,22 +106,11 @@ Foam::MomentumTransferPhaseSystem::Vm } else { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - virtualMassModel::typeName + ":K", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar(virtualMassModel::dimK, 0) - ) + virtualMassModel::typeName + ":K", + this->mesh_, + dimensionedScalar(virtualMassModel::dimK, 0) ); } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/constantDiameter/constantDiameter.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/constantDiameter/constantDiameter.C index 4fca8dcbeb..b5779c0327 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/constantDiameter/constantDiameter.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/constantDiameter/constantDiameter.C @@ -67,19 +67,11 @@ Foam::diameterModels::constant::~constant() Foam::tmp Foam::diameterModels::constant::d() const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "d", - phase_.time().timeName(), - phase_.mesh() - ), - phase_.mesh(), - d_ - ) + "d", + phase_.mesh(), + d_ ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C index 56a5b5646b..feaef0d22b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C @@ -53,14 +53,9 @@ Foam::tmp Foam::diameterModels::velocityGroup::dsm() const { tmp tInvDsm ( - new volScalarField + volScalarField::New ( - IOobject - ( - "invDsm", - phase_.time().timeName(), - phase_.mesh() - ), + "invDsm", phase_.mesh(), dimensionedScalar(inv(dimLength), Zero) ) @@ -84,14 +79,9 @@ Foam::diameterModels::velocityGroup::fSum() const { tmp tsumSizeGroups ( - new volScalarField + volScalarField::New ( - IOobject - ( - "sumSizeGroups", - phase_.time().timeName(), - phase_.mesh() - ), + "sumSizeGroups", phase_.mesh(), dimensionedScalar(dimless, 0) ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C index 834abdd32e..88c43b8787 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C @@ -67,19 +67,11 @@ template Foam::tmp Foam::InertPhaseModel::Qdot() const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - IOobject::groupName("Qdot", this->name()), - this->mesh().time().timeName(), - this->mesh() - ), - this->mesh(), - dimensionedScalar(dimEnergy/dimTime/dimVolume, 0) - ) + IOobject::groupName("Qdot", this->name()), + this->mesh(), + dimensionedScalar(dimEnergy/dimTime/dimVolume, 0) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.C index 253427a6d1..dd8c66f33c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.C @@ -57,7 +57,7 @@ void Foam::IsothermalPhaseModel::correctThermo() // Correct the thermo, but make sure that the temperature remains the same tmp TCopy ( - new volScalarField + volScalarField::New ( this->thermo().T().name() + ":Copy", this->thermo().T() diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 55842e9b13..d0d3af021d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -441,12 +441,11 @@ Foam::MovingPhaseModel::K() const { if (!K_.valid()) { - K_ = - new volScalarField - ( - IOobject::groupName("K", this->name()), - 0.5*magSqr(this->U()) - ); + K_ = volScalarField::New + ( + IOobject::groupName("K", this->name()), + 0.5*magSqr(this->U()) + ); } return tmp(K_()); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index d24425eeaa..399d41e612 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -52,7 +52,7 @@ Foam::tmp Foam::phaseSystem::calcPhi { tmp tmpPhi ( - new surfaceScalarField + surfaceScalarField::New ( "phi", fvc::interpolate(phaseModels[0])*phaseModels[0].phi() @@ -299,22 +299,11 @@ Foam::phaseSystem::E(const phasePairKey& key) const } else { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - aspectRatioModel::typeName + ":E", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar(dimless, 1) - ) + aspectRatioModel::typeName + ":E", + this->mesh_, + dimensionedScalar(dimless, 1) ); } } @@ -329,22 +318,11 @@ Foam::phaseSystem::sigma(const phasePairKey& key) const } else { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - surfaceTensionModel::typeName + ":sigma", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar(surfaceTensionModel::dimSigma, 0) - ) + surfaceTensionModel::typeName + ":sigma", + this->mesh_, + dimensionedScalar(surfaceTensionModel::dimSigma, 0) ); } } @@ -355,19 +333,11 @@ Foam::tmp Foam::phaseSystem::dmdt const phasePairKey& key ) const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - IOobject::groupName("dmdt", phasePairs_[key]->name()), - this->mesh_.time().timeName(), - this->mesh_ - ), - this->mesh_, - dimensionedScalar(dimDensity/dimTime, 0) - ) + IOobject::groupName("dmdt", phasePairs_[key]->name()), + this->mesh_, + dimensionedScalar(dimDensity/dimTime, 0) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C index ae25f2af5b..29d3e075cc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C @@ -803,14 +803,9 @@ Foam::diameterModels::populationBalanceModel::calcDsm() { tmp tInvDsm ( - new volScalarField + volScalarField::New ( - IOobject - ( - "invDsm", - mesh_.time().timeName(), - mesh_ - ), + "invDsm", mesh_, dimensionedScalar(inv(dimLength), Zero) ) @@ -1134,7 +1129,7 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel IOobject::AUTO_WRITE ), mesh_, - dimensionedVector("U", dimVelocity, Zero) + dimensionedVector(dimVelocity, Zero) ) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 71544b41bb..62729c9b0b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -553,14 +553,9 @@ Foam::tmp Foam::multiphaseSystem::surfaceTension { tmp tSurfaceTension ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "surfaceTension", - mesh_.time().timeName(), - mesh_ - ), + "surfaceTension", mesh_, dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), 0) ) @@ -597,14 +592,9 @@ Foam::multiphaseSystem::nearInterface() const { tmp tnearInt ( - new volScalarField + volScalarField::New ( - IOobject - ( - "nearInterface", - mesh_.time().timeName(), - mesh_ - ), + "nearInterface", mesh_, dimensionedScalar(dimless, 0) ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C index 44485dad76..608abfa8e3 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C @@ -129,17 +129,9 @@ JohnsonJacksonSchaeffer::nu tmp tnu ( - new volScalarField + volScalarField::New ( - IOobject - ( - "JohnsonJacksonSchaeffer:nu", - phase.mesh().time().timeName(), - phase.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "JohnsonJacksonSchaeffer:nu", phase.mesh(), dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), 0) ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C index 8d9da4ef37..5c5912f2b9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C @@ -70,21 +70,12 @@ Foam::aspectRatioModels::constantAspectRatio::E() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - E0_ - ) - ); + return volScalarField::New + ( + "zero", + mesh, + E0_ + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C index 026ccf52f9..68bea6dfa9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C @@ -65,21 +65,12 @@ Foam::liftModels::constantLiftCoefficient::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - Cl_ - ) - ); + return volScalarField::New + ( + "zero", + mesh, + Cl_ + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C index 1de375b5c4..3c56a50f7e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C @@ -63,22 +63,11 @@ Foam::tmp Foam::liftModels::noLift::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "Cl", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar(dimless, 0) - ) + "Cl", + mesh, + dimensionedScalar(dimless, 0) ); } @@ -87,22 +76,11 @@ Foam::tmp Foam::liftModels::noLift::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volVectorField::New ( - new volVectorField - ( - IOobject - ( - "noLift:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) + "noLift:F", + mesh, + dimensionedVector(dimF, Zero) ); } @@ -113,17 +91,9 @@ Foam::tmp Foam::liftModels::noLift::Ff() const return tmp ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "noLift:Ff", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:Ff", mesh, dimensionedScalar(dimF*dimArea, 0) ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/noSwarm/noSwarm.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/noSwarm/noSwarm.C index a4087cb7b1..6102ca6bb9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/noSwarm/noSwarm.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/swarmCorrections/noSwarm/noSwarm.C @@ -63,21 +63,12 @@ Foam::tmp Foam::swarmCorrections::noSwarm::Cs() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "one", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar(dimless, 1) - ) - ); + return volScalarField::New + ( + "one", + mesh, + dimensionedScalar(dimless, 1) + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C index 327d74f7db..74438c8061 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C @@ -70,22 +70,11 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::D() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedScalar(dimD, 0) - ) + "zero", + mesh, + dimensionedScalar(dimD, 0) ); } @@ -95,21 +84,12 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volVectorField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) - ); + return volVectorField::New + ( + "zero", + mesh, + dimensionedVector(dimF, Zero) + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C index 54e929f051..a5ddc6abe6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/constantVirtualMassCoefficient/constantVirtualMassCoefficient.C @@ -73,22 +73,11 @@ Foam::virtualMassModels::constantVirtualMassCoefficient::Cvm() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "Cvm", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - Cvm_ - ) + "Cvm", + mesh, + Cvm_ ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C index d9db88a61d..ce8bf6c193 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C @@ -65,21 +65,12 @@ Foam::virtualMassModels::noVirtualMass::Cvm() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar(dimless, 0) - ) - ); + return volScalarField::New + ( + "zero", + mesh, + dimensionedScalar(dimless, 0) + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C index b1449c2e18..dd62683b65 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C @@ -69,22 +69,11 @@ Foam::wallLubricationModels::noWallLubrication::Fi() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volVectorField::New ( - new volVectorField - ( - IOobject - ( - "noWallLubrication:Fi", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) + "noWallLubrication:Fi", + mesh, + dimensionedVector(dimF, Zero) ); } @@ -94,22 +83,11 @@ Foam::wallLubricationModels::noWallLubrication::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return volVectorField::New ( - new volVectorField - ( - IOobject - ( - "noWallLubrication:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) + "noWallLubrication:F", + mesh, + dimensionedVector(dimF, Zero) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C index c9aa03cd78..e0a8e9c9ef 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C @@ -129,17 +129,9 @@ JohnsonJacksonSchaeffer::nu tmp tnu ( - new volScalarField + volScalarField::New ( - IOobject - ( - "JohnsonJacksonSchaeffer:nu", - phase.mesh().time().timeName(), - phase.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "JohnsonJacksonSchaeffer:nu", phase.mesh(), dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), 0) ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index e18b6e3c03..70dd79e623 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -118,17 +118,9 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu tmp tnu ( - new volScalarField + volScalarField::New ( - IOobject - ( - "Schaeffer:nu", - phase.mesh().time().timeName(), - phase.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Schaeffer:nu", phase.mesh(), dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), 0) ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 17017d03bf..280b28e9dc 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -251,21 +251,11 @@ Foam::RASModels::kineticTheoryModel::epsilon() const Foam::tmp Foam::RASModels::kineticTheoryModel::R() const { - return tmp + return volSymmTensorField::New ( - new volSymmTensorField - ( - IOobject - ( - IOobject::groupName("R", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - (nut_)*dev(twoSymm(fvc::grad(U_))) - - (lambda_*fvc::div(phi_))*symmTensor::I - ) + IOobject::groupName("R", U_.group()), + - (nut_)*dev(twoSymm(fvc::grad(U_))) + - (lambda_*fvc::div(phi_))*symmTensor::I ); } @@ -319,22 +309,12 @@ Foam::RASModels::kineticTheoryModel::pPrimef() const Foam::tmp Foam::RASModels::kineticTheoryModel::devRhoReff() const { - return tmp + return volSymmTensorField::New ( - new volSymmTensorField - ( - IOobject - ( - IOobject::groupName("devRhoReff", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - (rho_*nut_) - *dev(twoSymm(fvc::grad(U_))) - - ((rho_*lambda_)*fvc::div(phi_))*symmTensor::I - ) + IOobject::groupName("devRhoReff", U_.group()), + - (rho_*nut_) + *dev(twoSymm(fvc::grad(U_))) + - ((rho_*lambda_)*fvc::div(phi_))*symmTensor::I ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index 192aa8a633..713b7dd4ab 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C @@ -133,26 +133,11 @@ Foam::RASModels::phasePressureModel::epsilon() const Foam::tmp Foam::RASModels::phasePressureModel::R() const { - return tmp + return volSymmTensorField::New ( - new volSymmTensorField - ( - IOobject - ( - IOobject::groupName("R", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensioned - ( - "R", - dimensionSet(0, 2, -2, 0, 0), - Zero - ) - ) + IOobject::groupName("R", U_.group()), + mesh_, + dimensioned(dimensionSet(0, 2, -2, 0, 0), Zero) ); } @@ -216,25 +201,14 @@ Foam::RASModels::phasePressureModel::pPrimef() const Foam::tmp Foam::RASModels::phasePressureModel::devRhoReff() const { - return tmp + return volSymmTensorField::New ( - new volSymmTensorField + IOobject::groupName("devRhoReff", U_.group()), + mesh_, + dimensioned ( - IOobject - ( - IOobject::groupName("devRhoReff", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensioned - ( - "R", - rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), - Zero - ) + rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), + Zero ) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C index 40d3d0570e..e257665585 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C @@ -139,17 +139,9 @@ Foam::BlendedInterfacialModel::K() const tmp x ( - new volScalarField + volScalarField::New ( - IOobject - ( - modelType::typeName + ":K", - pair_.phase1().mesh().time().timeName(), - pair_.phase1().mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + modelType::typeName + ":K", pair_.phase1().mesh(), dimensionedScalar(modelType::dimK, 0) ) @@ -207,17 +199,9 @@ Foam::BlendedInterfacialModel::Kf() const tmp x ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - modelType::typeName + ":Kf", - pair_.phase1().mesh().time().timeName(), - pair_.phase1().mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + modelType::typeName + ":Kf", pair_.phase1().mesh(), dimensionedScalar(modelType::dimK, 0) ) @@ -338,17 +322,9 @@ Foam::BlendedInterfacialModel::Ff() const tmp x ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - modelType::typeName + ":Ff", - pair_.phase1().mesh().time().timeName(), - pair_.phase1().mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + modelType::typeName + ":Ff", pair_.phase1().mesh(), dimensionedScalar(modelType::dimF*dimArea, 0) ) @@ -400,17 +376,9 @@ Foam::BlendedInterfacialModel::D() const tmp x ( - new volScalarField + volScalarField::New ( - IOobject - ( - modelType::typeName + ":D", - pair_.phase1().mesh().time().timeName(), - pair_.phase1().mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + modelType::typeName + ":D", pair_.phase1().mesh(), dimensionedScalar(modelType::dimD, 0) ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C index fa69f8cd0f..df10ab2e15 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C @@ -72,25 +72,12 @@ Foam::tmp Foam::blendingMethods::noBlending::f1 { const fvMesh& mesh(phase1.mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "f", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar - ( - dimless, - phase2.name() != continuousPhase_ - ) - ) - ); + return volScalarField::New + ( + "f", + mesh, + dimensionedScalar(dimless, phase2.name() != continuousPhase_) + ); } @@ -102,25 +89,12 @@ Foam::tmp Foam::blendingMethods::noBlending::f2 { const fvMesh& mesh(phase1.mesh()); - return - tmp - ( - new volScalarField - ( - IOobject - ( - "f", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar - ( - dimless, - phase1.name() == continuousPhase_ - ) - ) - ); + return volScalarField::New + ( + "f", + mesh, + dimensionedScalar(dimless, phase1.name() == continuousPhase_) + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C index caf5a7ed5b..37141844b8 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C @@ -46,19 +46,11 @@ namespace IATEsources Foam::tmp Foam::diameterModels::IATEsources::dummy::R() const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "R", - iate_.phase().U().time().timeName(), - iate_.phase().mesh() - ), - iate_.phase().U().mesh(), - dimensionedScalar(dimless/dimTime, 0) - ) + "R", + iate_.phase().U().mesh(), + dimensionedScalar(dimless/dimTime, 0) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C index 7daa3a7680..35404338c1 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C @@ -64,14 +64,9 @@ Foam::diameterModels::IATEsources::randomCoalescence::R() const { tmp tR ( - new volScalarField + volScalarField::New ( - IOobject - ( - "R", - iate_.phase().U().time().timeName(), - iate_.phase().mesh() - ), + "R", iate_.phase().U().mesh(), dimensionedScalar(dimless/dimTime, 0) ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C index 039640f180..2a36013084 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C @@ -63,14 +63,9 @@ Foam::diameterModels::IATEsources::turbulentBreakUp::R() const { tmp tR ( - new volScalarField + volScalarField::New ( - IOobject - ( - "R", - iate_.phase().U().time().timeName(), - iate_.phase().mesh() - ), + "R", iate_.phase().U().mesh(), dimensionedScalar(dimless/dimTime, 0) ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/constantDiameter/constantDiameter.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/constantDiameter/constantDiameter.C index 8480769555..a3d30c3ba5 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/constantDiameter/constantDiameter.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/constantDiameter/constantDiameter.C @@ -67,22 +67,11 @@ Foam::diameterModels::constant::~constant() Foam::tmp Foam::diameterModels::constant::d() const { - return tmp + return volScalarField::New ( - new volScalarField - ( - IOobject - ( - "d", - phase_.U().time().timeName(), - phase_.U().mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - phase_.U().mesh(), - d_ - ) + "d", + phase_.U().mesh(), + d_ ); } diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H index b1190f12af..2e2f143ddd 100644 --- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H +++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H @@ -14,6 +14,6 @@ if (!(runTime.timeIndex() % 5)) if (smi < -small) { Info<< "Resetting Dcorr to 0" << endl; - Dcorr == dimensionedVector("0", Dcorr.dimensions(), Zero); + Dcorr == dimensionedVector(Dcorr.dimensions(), Zero); } } diff --git a/applications/test/mappedPatch/Test-MappedPatch.C b/applications/test/mappedPatch/Test-MappedPatch.C index 13de57297b..41e5720991 100644 --- a/applications/test/mappedPatch/Test-MappedPatch.C +++ b/applications/test/mappedPatch/Test-MappedPatch.C @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimLength, Zero), + dimensionedVector(dimLength, Zero), patchFieldTypes ); diff --git a/applications/test/pointField/Test-PointField.C b/applications/test/pointField/Test-PointField.C index 84c89550a1..3c862b444c 100644 --- a/applications/test/pointField/Test-PointField.C +++ b/applications/test/pointField/Test-PointField.C @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), pMesh, - dimensionedVector("fvmU", dimLength, Zero), + dimensionedVector(dimLength, Zero), pointPatchVectorField::calculatedType() ); diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index a9e016e765..4279ae6ebd 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -68,17 +68,9 @@ tmp createScalarField { tmp tfld ( - new volScalarField + volScalarField::New ( - IOobject - ( - name, - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE, - false - ), + name, mesh, dimensionedScalar(dimless, 0), zeroGradientFvPatchScalarField::typeName diff --git a/applications/utilities/postProcessing/dataConversion/smapToFoam/smapToFoam.C b/applications/utilities/postProcessing/dataConversion/smapToFoam/smapToFoam.C index e23887b611..15627c8a89 100644 --- a/applications/utilities/postProcessing/dataConversion/smapToFoam/smapToFoam.C +++ b/applications/utilities/postProcessing/dataConversion/smapToFoam/smapToFoam.C @@ -134,7 +134,8 @@ int main(int argc, char *argv[]) runTime.timeName(), mesh, IOobject::MUST_READ, - IOobject::AUTO_WRITE + IOobject::AUTO_WRITE, + false ), mesh ); @@ -152,7 +153,8 @@ int main(int argc, char *argv[]) runTime.timeName(), mesh, IOobject::MUST_READ, - IOobject::AUTO_WRITE + IOobject::AUTO_WRITE, + false ), mesh ); diff --git a/applications/utilities/preProcessing/setWaves/setWaves.C b/applications/utilities/preProcessing/setWaves/setWaves.C index ba93193e6d..580d0c7556 100644 --- a/applications/utilities/preProcessing/setWaves/setWaves.C +++ b/applications/utilities/preProcessing/setWaves/setWaves.C @@ -145,25 +145,25 @@ int main(int argc, char *argv[]) ( IOobject("uGas", runTime.timeName(), mesh), mesh, - dimensionedVector("0", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, vector::zero) ); pointVectorField uGasp ( IOobject("uGasp", runTime.timeName(), mesh), pMesh, - dimensionedVector("0", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, vector::zero) ); volVectorField uLiq ( IOobject("uLiq", runTime.timeName(), mesh), mesh, - dimensionedVector("0", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, vector::zero) ); pointVectorField uLiqp ( IOobject("uLiqp", runTime.timeName(), mesh), pMesh, - dimensionedVector("0", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, vector::zero) ); // Cell centres and points diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C index c2f6e3b280..df323dc9fe 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.C +++ b/src/OpenFOAM/db/regIOobject/regIOobject.C @@ -94,9 +94,12 @@ Foam::regIOobject::regIOobject(const regIOobject& rio, bool registerCopy) watchIndices_(), eventNo_(db().getEvent()) { - if (registerCopy && rio.registered_) + if (registerCopy) { - const_cast(rio).checkOut(); + if (rio.registered_) + { + const_cast(rio).checkOut(); + } checkIn(); } } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C index 410d6a4d99..c8f0fa60a9 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C @@ -57,7 +57,7 @@ Foam::anisotropicFilter::anisotropicFilter mesh ), mesh, - dimensionedVector("zero", dimLength*dimLength, Zero), + dimensionedVector(dimLength*dimLength, Zero), calculatedFvPatchVectorField::typeName ) { @@ -97,7 +97,7 @@ Foam::anisotropicFilter::anisotropicFilter mesh ), mesh, - dimensionedVector("zero", dimLength*dimLength, Zero), + dimensionedVector(dimLength*dimLength, Zero), calculatedFvPatchScalarField::typeName ) { diff --git a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C index a29b9819a9..da524082fe 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C @@ -143,7 +143,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData() IOobject::NO_WRITE ), mesh_, - dimensionedTensor("0", dXYZ_.dimensions(), Zero) + dimensionedTensor(dXYZ_.dimensions(), Zero) ); volTensorField Fout ( @@ -156,7 +156,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData() IOobject::NO_WRITE ), mesh_, - dimensionedTensor("0", fXYZ_.dimensions(), Zero) + dimensionedTensor(fXYZ_.dimensions(), Zero) ); UIndirectList(Dout, mesh_.cellZones()[cellZoneIDs_[0]]) = D_[0]; diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C index 5c1e8776d0..f11e068b92 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C index 69b5e2415c..98c6785fa5 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C index 5ca227bc7d..0e20ac6b4c 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index 073935cdea..c77610a2ae 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -383,18 +383,9 @@ Foam::tmp Foam::fvMesh::delta() const tmp tdelta ( - new surfaceVectorField + surfaceVectorField::New ( - IOobject - ( - "delta", - pointsInstance(), - meshSubDir, - *this, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "delta", *this, dimLength ) diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C index 27f00b0923..dcd6a5674a 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C @@ -105,7 +105,7 @@ bool Foam::patchDistMethods::advectionDiffusion::correct false ), mesh_, - dimensionedVector("ny", dimless, Zero), + dimensionedVector(dimless, Zero), patchTypes(mesh_, patchIDs_) ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C index 5f592b3180..c59392afd5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C @@ -42,14 +42,9 @@ Foam::PhiScheme::limiter tmp tLimiter ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "PhiLimiter", - mesh.time().timeName(), - mesh - ), + "PhiLimiter", mesh, dimless ) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/blended/blended.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/blended/blended.H index 85e7751cd7..769800476b 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/blended/blended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/blended/blended.H @@ -126,22 +126,11 @@ public: const GeometricField& vf ) const { - return tmp + return surfaceScalarField::New ( - new surfaceScalarField - ( - IOobject - ( - vf.name() + "BlendingFactor", - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar(dimless, blendingFactor_) - ) + vf.name() + "BlendingFactor", + this->mesh(), + dimensionedScalar(dimless, blendingFactor_) ); } @@ -151,22 +140,11 @@ public: const GeometricField& ) const { - return tmp + return surfaceScalarField::New ( - new surfaceScalarField - ( - IOobject - ( - "blendedLimiter", - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar(dimless, 1 - blendingFactor_) - ) + "blendedLimiter", + this->mesh(), + dimensionedScalar(dimless, 1 - blendingFactor_) ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H index 23d77ce50f..3619c0ff1f 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H @@ -109,22 +109,11 @@ public: const GeometricField& ) const { - return tmp + return surfaceScalarField::New ( - new surfaceScalarField - ( - IOobject - ( - "upwindLimiter", - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar(dimless, 0) - ) + "upwindLimiter", + this->mesh(), + dimensionedScalar(dimless, 0) ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H index 6b79bb3e51..ecc8990eec 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CoBlended/CoBlended.H @@ -210,25 +210,22 @@ public: << exit(FatalError); } - return tmp + return surfaceScalarField::New ( - new surfaceScalarField + vf.name() + "BlendingFactor", + scalar(1) + - max ( - vf.name() + "BlendingFactor", - scalar(1) - - max + min ( - min ( - ( - mesh.time().deltaT()*mesh.deltaCoeffs() - *mag(tUflux)/mesh.magSf() - - Co1_ - )/(Co2_ - Co1_), - scalar(1) - ), - scalar(0) - ) + mesh.time().deltaT()*mesh.deltaCoeffs() + *mag(tUflux)/mesh.magSf() + - Co1_ + )/(Co2_ - Co1_), + scalar(1) + ), + scalar(0) ) ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H index 97d4991a9d..9ea8b1e938 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H @@ -242,21 +242,18 @@ public: (sumPhi/mesh.V().field())*(0.5*mesh.time().deltaTValue()); Co.correctBoundaryConditions(); - return tmp + return surfaceScalarField::New ( - new surfaceScalarField + vf.name() + "BlendingFactor", + scalar(1) + - max ( - vf.name() + "BlendingFactor", - scalar(1) - - max + min ( - min - ( - (fvc::interpolate(Co) - Co1_)/(Co2_ - Co1_), - scalar(1) - ), - scalar(0) - ) + (fvc::interpolate(Co) - Co1_)/(Co2_ - Co1_), + scalar(1) + ), + scalar(0) ) ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H index ab377b054f..7eeaffaede 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/clippedLinear/clippedLinear.H @@ -138,14 +138,9 @@ public: tmp tclippedLinearWeights ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "clippedLinearWeights", - mesh.time().timeName(), - mesh - ), + "clippedLinearWeights", mesh, dimless ) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C index 23003ff647..2124b3ad49 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C @@ -150,17 +150,9 @@ Foam::linearUpwind::correction tmp tsfCorr ( - new surfaceVectorField + surfaceVectorField::New ( - IOobject - ( - "linearUpwind::correction(" + vf.name() + ')', - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "linearUpwind::correction(" + vf.name() + ')', mesh, dimensioned(vf.name(), vf.dimensions(), Zero) ) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/midPoint/midPoint.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/midPoint/midPoint.H index d2cee508d1..4bcfbdc4bb 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/midPoint/midPoint.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/midPoint/midPoint.H @@ -100,17 +100,9 @@ public: { tmp taw ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "midPointWeights", - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "midPointWeights", this->mesh(), dimensionedScalar(dimless, 0.5) ) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H index 0103ff48a6..3ce34b0b80 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H @@ -110,14 +110,9 @@ public: tmp treverseLinearWeights ( - new surfaceScalarField + surfaceScalarField::New ( - IOobject - ( - "reverseLinearWeights", - mesh.time().timeName(), - mesh - ), + "reverseLinearWeights", mesh, dimless ) diff --git a/src/functionObjects/field/wallShearStress/wallShearStress.C b/src/functionObjects/field/wallShearStress/wallShearStress.C index c01e4ffd4b..76f24e485c 100644 --- a/src/functionObjects/field/wallShearStress/wallShearStress.C +++ b/src/functionObjects/field/wallShearStress/wallShearStress.C @@ -69,7 +69,7 @@ Foam::functionObjects::wallShearStress::calcShearStress ( type(), mesh_, - dimensionedVector("0", Reff.dimensions(), Zero) + dimensionedVector(Reff.dimensions(), Zero) ) ); diff --git a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C index d8c69703ab..adc0326cb5 100644 --- a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C +++ b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C @@ -64,7 +64,7 @@ Foam::functionObjects::icoUncoupledKinematicCloud::icoUncoupledKinematicCloud IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedVector("g", dimAcceleration, Zero) + dimensionedVector(dimAcceleration, Zero) ), laminarTransport_ ( diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C index 0f39db1e31..0e33eedf41 100644 --- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C +++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C @@ -204,7 +204,7 @@ void Foam::fv::meanVelocityForce::addSup IOobject::NO_WRITE ), mesh_, - dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); scalar gradP = gradP0_ + dGradP_; diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C index 115c4abf50..a320b63177 100644 --- a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C +++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C @@ -154,7 +154,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedVector("zero", U.dimensions(), Zero) + dimensionedVector(U.dimensions(), Zero) ); // Map local velocity onto neighbour region @@ -208,7 +208,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedVector("zero", U.dimensions(), Zero) + dimensionedVector(U.dimensions(), Zero) ); // Map local velocity onto neighbour region diff --git a/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H b/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H index be1beb70e8..d7401e33e4 100644 --- a/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H +++ b/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H @@ -36,7 +36,7 @@ Foam::coalCloudList::UTrans() const ( "UTransEff", mesh_, - dimensionedVector("zero", dimMass*dimVelocity, Zero) + dimensionedVector(dimMass*dimVelocity, Zero) ) ); diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index e3d5eaea95..5b2015c44a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -370,7 +370,7 @@ Foam::KinematicCloud::KinematicCloud IOobject::AUTO_WRITE ), mesh_, - dimensionedVector("zero", dimMass*dimVelocity, Zero) + dimensionedVector(dimMass*dimVelocity, Zero) ) ), UCoeff_ diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C index 78880cd3db..79c3e99958 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -190,13 +190,10 @@ void Foam::PackingModels::Implicit::cacheFields(const bool store) if (applyGravity_) ( - phiGByA = tmp + phiGByA = surfaceScalarField::New ( - new surfaceScalarField - ( - "phiGByA", - deltaT*(g & mesh.Sf())*fvc::interpolate(1.0 - rhoc/rho) - ) + "phiGByA", + deltaT*(g & mesh.Sf())*fvc::interpolate(1.0 - rhoc/rho) ) ); @@ -230,13 +227,10 @@ void Foam::PackingModels::Implicit::cacheFields(const bool store) // ~~~~~~~~~~~~~~~~~ // correction volumetric flux - phiCorrect_ = tmp + phiCorrect_ = surfaceScalarField::New ( - new surfaceScalarField - ( - cloudName + ":phiCorrect", - alphaEqn.flux()/fvc::interpolate(alpha_) - ) + cloudName + ":phiCorrect", + alphaEqn.flux()/fvc::interpolate(alpha_) ); // limit the correction flux @@ -253,7 +247,7 @@ void Foam::PackingModels::Implicit::cacheFields(const bool store) IOobject::NO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), fixedValueFvPatchField::typeName ); U.primitiveFieldRef() = uAverage.primitiveField(); diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H index 590d7494fe..4078838e21 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H @@ -195,20 +195,17 @@ Info << " Creating total velocity field" << endl; volVectorField totalVelocity - ( IOobject ( - - "velocity_total", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - + "velocity_total", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, Zero) + dimensionedVector(dimVelocity, Zero) ); /*---------------------------------------------------------------------------*\ diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index b253cda490..f561d1246d 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -1639,7 +1639,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedVector("dispVec", dimLength, Zero) + dimensionedVector(dimLength, Zero) ), medialRatio_ ( @@ -1681,7 +1681,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedVector("medialVec", dimLength, Zero) + dimensionedVector(dimLength, Zero) ) { update(dict); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 028e587504..88473b60c6 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -1828,7 +1828,7 @@ Foam::tmp Foam::meshRefinement::makeDisplacementField IOobject::AUTO_WRITE ), pMesh, - dimensionedVector("displacement", dimLength, Zero), + dimensionedVector(dimLength, Zero), patchFieldTypes ) ); diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index dfae5a7950..1ea1ed140b 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -868,7 +868,7 @@ Foam::snappyLayerDriver::makeLayerDisplacementField IOobject::AUTO_WRITE ), pMesh, - dimensionedVector("displacement", dimLength, Zero), + dimensionedVector(dimLength, Zero), patchFieldTypes, actualPatchTypes ) diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index b7d4bf4c6c..b26af2c472 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -39,7 +39,6 @@ namespace regionModels void Foam::regionModels::regionModel1D::constructMeshObjects() { - nMagSfPtr_.reset ( new surfaceScalarField diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index 3e384b79ad..d4cd3ba33a 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -56,7 +56,7 @@ void Foam::regionModels::singleLayerRegion::constructMeshObjects() NO_WRITE ), regionMesh(), - dimensionedVector("zero", dimless, Zero), + dimensionedVector(dimless, Zero), zeroGradientFvPatchField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index d918db6b88..9aa0d51eb8 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -88,7 +88,7 @@ void kinematicSingleLayer::resetPrimaryRegionSourceTerms() } rhoSpPrimary_ == dimensionedScalar(rhoSp_.dimensions(), 0); - USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), Zero); + USpPrimary_ == dimensionedVector(USp_.dimensions(), Zero); pSpPrimary_ == dimensionedScalar(pSp_.dimensions(), 0); } @@ -682,7 +682,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedVector("zero", USp_.dimensions(), Zero) + dimensionedVector(USp_.dimensions(), Zero) ), pSpPrimary_ ( @@ -722,7 +722,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), this->mappedFieldAndInternalPatchTypes() ), pPrimary_ diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C index 437b866d83..fc5f55f940 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C @@ -76,7 +76,7 @@ tmp laminar::Us() const ( typeName + ":Us", filmModel_.regionMesh(), - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), extrapolatedCalculatedFvPatchVectorField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C index 98bed65ce1..9cc144c604 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C @@ -135,7 +135,7 @@ tmp contactAngleForce::correct(volVectorField& U) ( typeName + ":contactForce", filmModel_.regionMesh(), - dimensionedVector("zero", dimForce/dimArea, Zero) + dimensionedVector(dimForce/dimArea, Zero) ) );