diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H index 12bdceb7e..7612886aa 100644 --- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H +++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H @@ -58,7 +58,7 @@ License // Flow time scale { - rDeltaT.dimensionedInternalField() = + rDeltaT.dimensionedInternalFieldRef() = ( fvc::surfaceSum(mag(phi))().dimensionedInternalField() /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) @@ -84,7 +84,7 @@ License << gMin(1/(rDeltaTT.field() + VSMALL)) << ", " << gMax(1/(rDeltaTT.field() + VSMALL)) << endl; - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( rDeltaT.dimensionedInternalField(), rDeltaTT diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index fb0fbc707..683dc165a 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -185,7 +185,7 @@ int main(int argc, char *argv[]) // --- Solve momentum solve(fvm::ddt(rhoU) + fvc::div(phiUp)); - U.dimensionedInternalField() = + U.dimensionedInternalFieldRef() = rhoU.dimensionedInternalField() /rho.dimensionedInternalField(); U.correctBoundaryConditions(); @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) rhoE = rho*(e + 0.5*magSqr(U)); } - p.dimensionedInternalField() = + p.dimensionedInternalFieldRef() = rho.dimensionedInternalField() /psi.dimensionedInternalField(); p.correctBoundaryConditions(); diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index 083a1b1b5..af304aeb2 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -178,7 +178,7 @@ int main(int argc, char *argv[]) // --- Solve momentum solve(fvm::ddt(rhoU) + fvc::div(phiUp)); - U.dimensionedInternalField() = + U.dimensionedInternalFieldRef() = rhoU.dimensionedInternalField() /rho.dimensionedInternalField(); U.correctBoundaryConditions(); @@ -233,7 +233,7 @@ int main(int argc, char *argv[]) rhoE = rho*(e + 0.5*magSqr(U)); } - p.dimensionedInternalField() = + p.dimensionedInternalFieldRef() = rho.dimensionedInternalField() /psi.dimensionedInternalField(); p.correctBoundaryConditions(); diff --git a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H index 806ddd383..f5dd49e7a 100644 --- a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H @@ -11,7 +11,7 @@ ); // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), fvc::surfaceSum(amaxSf)().dimensionedInternalField() diff --git a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H index 0a38e05ee..7c9dc6b87 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H @@ -26,7 +26,7 @@ volScalarField rDeltaT0("rDeltaT0", rDeltaT); // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), fvc::surfaceSum(mag(phi))().dimensionedInternalField() @@ -41,7 +41,7 @@ fvc::interpolate(psi)*fvc::flux(U) ); - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( rDeltaT.dimensionedInternalField(), fvc::surfaceSum(mag(phid))().dimensionedInternalField() diff --git a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H index 65b0388e1..56c67ca2f 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H @@ -58,7 +58,7 @@ License // Flow time scale { - rDeltaT.dimensionedInternalField() = + rDeltaT.dimensionedInternalFieldRef() = ( fvc::surfaceSum(mag(phi))().dimensionedInternalField() /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) @@ -94,7 +94,7 @@ License << gMin(1/(rDeltaTT.field() + VSMALL)) << ", " << gMax(1/(rDeltaTT.field() + VSMALL)) << endl; - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( rDeltaT.dimensionedInternalField(), rDeltaTT diff --git a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H index f51eeb49b..5ee1dc463 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H @@ -58,7 +58,7 @@ License // Flow time scale { - rDeltaT.dimensionedInternalField() = + rDeltaT.dimensionedInternalFieldRef() = ( fvc::surfaceSum(mag(phi))().dimensionedInternalField() /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) @@ -93,7 +93,7 @@ License << gMin(1/(rDeltaTT.field() + VSMALL)) << ", " << gMax(1/(rDeltaTT.field() + VSMALL)) << endl; - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( rDeltaT.dimensionedInternalField(), rDeltaTT diff --git a/applications/solvers/multiphase/interFoam/setRDeltaT.H b/applications/solvers/multiphase/interFoam/setRDeltaT.H index dd0e6a4da..afeee4cf4 100644 --- a/applications/solvers/multiphase/interFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/interFoam/setRDeltaT.H @@ -56,7 +56,7 @@ volScalarField rDeltaT0("rDeltaT0", rDeltaT); // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), fvc::surfaceSum(mag(rhoPhi))().dimensionedInternalField() @@ -70,7 +70,7 @@ volScalarField alpha1Bar(fvc::average(alpha1)); - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( rDeltaT.dimensionedInternalField(), pos(alpha1Bar.dimensionedInternalField() - alphaSpreadMin) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H index fec017ea3..686d45068 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H @@ -26,7 +26,7 @@ } // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), fvc::surfaceSum(maxPhi)().dimensionedInternalField() diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H index 4bef17a6b..3c68f2a95 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H @@ -19,7 +19,7 @@ ); // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalField() = max + rDeltaT.dimensionedInternalFieldRef() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), fvc::surfaceSum(max(mag(phi1), mag(phi2)))().dimensionedInternalField() diff --git a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C index c6b26e6d3..6a78ebad1 100644 --- a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C +++ b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) calculatedFvPatchField::typeName ); - V.dimensionedInternalField() = mesh.V(); + V.dimensionedInternalFieldRef() = mesh.V(); volScalarField::GeometricBoundaryField& Vbf = V.boundaryFieldRef(); diff --git a/applications/utilities/postProcessing/velocityField/Co/Co.C b/applications/utilities/postProcessing/velocityField/Co/Co.C index 110c39b41..ef5953c86 100644 --- a/applications/utilities/postProcessing/velocityField/Co/Co.C +++ b/applications/utilities/postProcessing/velocityField/Co/Co.C @@ -87,7 +87,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) mesh ); - Co.dimensionedInternalField() = + Co.dimensionedInternalFieldRef() = (0.5*runTime.deltaT()) *fvc::surfaceSum(mag(phi))().dimensionedInternalField() /(rho*mesh.V()); @@ -97,7 +97,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { Info<< " Calculating incompressible Co" << endl; - Co.dimensionedInternalField() = + Co.dimensionedInternalFieldRef() = (0.5*runTime.deltaT()) *fvc::surfaceSum(mag(phi))().dimensionedInternalField() /mesh.V(); diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index b30ca6e5a..5228c5a63 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -690,7 +690,7 @@ Foam::GeometricField::~GeometricField() template class PatchField, class GeoMesh> typename Foam::GeometricField::DimensionedInternalField& -Foam::GeometricField::dimensionedInternalField() +Foam::GeometricField::dimensionedInternalFieldRef() { this->setUpToDate(); storeOldTimes(); @@ -1112,9 +1112,9 @@ void Foam::GeometricField::operator= checkField(*this, gf, "="); - // only equate field contents not ID + // Only assign field contents not ID - dimensionedInternalField() = gf.dimensionedInternalField(); + dimensionedInternalFieldRef() = gf.dimensionedInternalField(); boundaryFieldRef() = gf.boundaryField(); } @@ -1136,11 +1136,11 @@ void Foam::GeometricField::operator= checkField(*this, gf, "="); - // only equate field contents not ID + // Only assign field contents not ID this->dimensions() = gf.dimensions(); - // This is dodgy stuff, don't try it at home. + // Transfer the storage from the tmp internalField().transfer ( const_cast&>(gf.internalField()) @@ -1158,7 +1158,7 @@ void Foam::GeometricField::operator= const dimensioned& dt ) { - dimensionedInternalField() = dt; + dimensionedInternalFieldRef() = dt; boundaryFieldRef() = dt.value(); } @@ -1173,9 +1173,9 @@ void Foam::GeometricField::operator== checkField(*this, gf, "=="); - // only equate field contents not ID + // Only assign field contents not ID - dimensionedInternalField() = gf.dimensionedInternalField(); + dimensionedInternalFieldRef() = gf.dimensionedInternalField(); boundaryFieldRef() == gf.boundaryField(); tgf.clear(); @@ -1188,7 +1188,7 @@ void Foam::GeometricField::operator== const dimensioned& dt ) { - dimensionedInternalField() = dt; + dimensionedInternalFieldRef() = dt; boundaryFieldRef() == dt.value(); } @@ -1203,7 +1203,7 @@ void Foam::GeometricField::operator op \ { \ checkField(*this, gf, #op); \ \ - dimensionedInternalField() op gf.dimensionedInternalField(); \ + dimensionedInternalFieldRef() op gf.dimensionedInternalField(); \ boundaryFieldRef() op gf.boundaryField(); \ } \ \ @@ -1223,7 +1223,7 @@ void Foam::GeometricField::operator op \ const dimensioned& dt \ ) \ { \ - dimensionedInternalField() op dt; \ + dimensionedInternalFieldRef() op dt; \ boundaryFieldRef() op dt.value(); \ } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index 1d2c3e825..fe30dc918 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H @@ -432,7 +432,7 @@ public: //- Return a reference to the dimensioned internal field // Note: this increments the event counter and checks the // old-time fields; avoid in loops. - DimensionedInternalField& dimensionedInternalField(); + DimensionedInternalField& dimensionedInternalFieldRef(); //- Return a const-reference to the dimensioned internal field inline const DimensionedInternalField& dimensionedInternalField() const; diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C index 24db120ff..5d8fcb737 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, scalar widthCoeff) calculatedFvPatchScalarField::typeName ) { - coeff_.dimensionedInternalField() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; + coeff_.dimensionedInternalFieldRef() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; } @@ -78,7 +78,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd) calculatedFvPatchScalarField::typeName ) { - coeff_.dimensionedInternalField() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; + coeff_.dimensionedInternalFieldRef() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C index 54db6c6d7..73ec7ee33 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -158,7 +158,7 @@ tmp SpalartAllmarasDES::dTilda ) const { tmp tdTilda(CDES_*this->delta()); - min(tdTilda.ref().dimensionedInternalField(), tdTilda(), y_); + min(tdTilda.ref().dimensionedInternalFieldRef(), tdTilda(), y_); return tdTilda; } diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index d8bc1cfac..566d92dee 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -161,7 +161,7 @@ singleStepCombustion::dQ() const if (this->active()) { volScalarField& dQ = tdQ.ref(); - dQ.dimensionedInternalField() = this->mesh().V()*Sh()(); + dQ.dimensionedInternalFieldRef() = this->mesh().V()*Sh()(); } return tdQ; } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C index b424943e3..c4419ec26 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C @@ -323,14 +323,14 @@ CrankNicolsonDdtScheme::fvcDdt { dimensionedScalar rDtCoef0 = rDtCoef0_(ddt0); - ddt0.dimensionedInternalField() = + ddt0.dimensionedInternalFieldRef() = ( (rDtCoef0*dt)*(mesh().V0() - mesh().V00()) - mesh().V00()*offCentre_(ddt0.dimensionedInternalField()) )/mesh().V0(); } - tdtdt.ref().dimensionedInternalField() = + tdtdt.ref().dimensionedInternalFieldRef() = ( (rDtCoef*dt)*(mesh().V() - mesh().V0()) - mesh().V0()*offCentre_(ddt0.dimensionedInternalField()) diff --git a/src/postProcessing/functionObjects/field/Make/files b/src/postProcessing/functionObjects/field/Make/files index 75464c401..24a3e5b59 100644 --- a/src/postProcessing/functionObjects/field/Make/files +++ b/src/postProcessing/functionObjects/field/Make/files @@ -46,4 +46,7 @@ surfaceInterpolateFields/surfaceInterpolateFieldsFunctionObject.C regionSizeDistribution/regionSizeDistribution.C regionSizeDistribution/regionSizeDistributionFunctionObject.C +histogram/histogram.C +histogram/histogramFunctionObject.C + LIB = $(FOAM_LIBBIN)/libfieldFunctionObjects diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C index ec56dcc94..c35709cf6 100644 --- a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C +++ b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C @@ -142,7 +142,7 @@ void Foam::CourantNo::execute() mesh.lookupObject(type()) ); - Co.dimensionedInternalField() = byRho + Co.dimensionedInternalFieldRef() = byRho ( (0.5*mesh.time().deltaT()) *fvc::surfaceSum(mag(phi))().dimensionedInternalField() diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index bf9682d95..4522edcd1 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -611,7 +611,7 @@ Foam::chemistryModel::dQ() const if (this->chemistry_) { volScalarField& dQ = tdQ.ref(); - dQ.dimensionedInternalField() = this->mesh_.V()*Sh()(); + dQ.dimensionedInternalFieldRef() = this->mesh_.V()*Sh()(); } return tdQ; diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C index e723ff90e..72f6c52e7 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C @@ -177,7 +177,7 @@ Foam::solidChemistryModel::dQ() const if (this->chemistry_) { volScalarField& dQ = tdQ.ref(); - dQ.dimensionedInternalField() = this->mesh_.V()*Sh()(); + dQ.dimensionedInternalFieldRef() = this->mesh_.V()*Sh()(); } return tdQ;