diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H index 1267aefdcce342c4fba6b32ae0867315f757cc71..d83e129717b12505de33a8ecfe24bad29ea87abe 100644 --- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H +++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H @@ -58,10 +58,10 @@ License // Flow time scale { - rDeltaT.dimensionedInternalFieldRef() = + rDeltaT.ref() = ( - fvc::surfaceSum(mag(phi))().dimensionedInternalField() - /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) + fvc::surfaceSum(mag(phi))()() + /((2*maxCo)*mesh.V()*rho()) ); // Limit the largest time scale @@ -84,9 +84,9 @@ License << gMin(1/(rDeltaTT.field() + VSMALL)) << ", " << gMax(1/(rDeltaTT.field() + VSMALL)) << endl; - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( - rDeltaT.dimensionedInternalField(), + rDeltaT(), rDeltaTT ); } diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 683dc165a585fd89980388617cfaec60b28728a3..a64bfc9a046eee7320249cb4e7ea804203ca0b2e 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -185,9 +185,9 @@ int main(int argc, char *argv[]) // --- Solve momentum solve(fvm::ddt(rhoU) + fvc::div(phiUp)); - U.dimensionedInternalFieldRef() = - rhoU.dimensionedInternalField() - /rho.dimensionedInternalField(); + U.ref() = + rhoU() + /rho(); U.correctBoundaryConditions(); rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField(); @@ -240,9 +240,9 @@ int main(int argc, char *argv[]) rhoE = rho*(e + 0.5*magSqr(U)); } - p.dimensionedInternalFieldRef() = - rho.dimensionedInternalField() - /psi.dimensionedInternalField(); + p.ref() = + rho() + /psi(); p.correctBoundaryConditions(); rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField(); diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index af304aeb24e6b344fdae532c87d3060fb06be618..ea16c6ba6147db8fc1d8a5f19378cd7b00f6df4f 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -178,9 +178,9 @@ int main(int argc, char *argv[]) // --- Solve momentum solve(fvm::ddt(rhoU) + fvc::div(phiUp)); - U.dimensionedInternalFieldRef() = - rhoU.dimensionedInternalField() - /rho.dimensionedInternalField(); + U.ref() = + rhoU() + /rho(); U.correctBoundaryConditions(); rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField(); @@ -233,9 +233,9 @@ int main(int argc, char *argv[]) rhoE = rho*(e + 0.5*magSqr(U)); } - p.dimensionedInternalFieldRef() = - rho.dimensionedInternalField() - /psi.dimensionedInternalField(); + p.ref() = + rho() + /psi(); p.correctBoundaryConditions(); rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField(); diff --git a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H index f5dd49e7a3c41b6949dd48ec5918e2054e6b9b44..4ebe06a6f51ba314e8b5bad03eb22e3e74562ae5 100644 --- a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H @@ -11,10 +11,10 @@ ); // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), - fvc::surfaceSum(amaxSf)().dimensionedInternalField() + fvc::surfaceSum(amaxSf)()() /((2*maxCo)*mesh.V()) ); diff --git a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H index 7c9dc6b870f9f4f285fe5f0f058bd3495c68e38d..8591a74b9a7918712a372a32e34878f31c14c05d 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H @@ -26,11 +26,11 @@ volScalarField rDeltaT0("rDeltaT0", rDeltaT); // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), - fvc::surfaceSum(mag(phi))().dimensionedInternalField() - /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) + fvc::surfaceSum(mag(phi))()() + /((2*maxCo)*mesh.V()*rho()) ); if (pimple.transonic()) @@ -41,11 +41,11 @@ fvc::interpolate(psi)*fvc::flux(U) ); - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( - rDeltaT.dimensionedInternalField(), - fvc::surfaceSum(mag(phid))().dimensionedInternalField() - /((2*maxCo)*mesh.V()*psi.dimensionedInternalField()) + rDeltaT(), + fvc::surfaceSum(mag(phid))()() + /((2*maxCo)*mesh.V()*psi()) ); } diff --git a/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H index 2062c123fc8be20696772d4c70cbdcd68f9f1894..937f0ecc5ec8ba65a216da37eaf3010c17b98ab9 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/UEqn.H @@ -6,7 +6,7 @@ + MRF.DDt(rho, U) + turbulence->divDevRhoReff(U) == - rho.dimensionedInternalField()*g + rho()*g + coalParcels.SU(U) + limestoneParcels.SU(U) + fvOptions(rho, U) diff --git a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H index c123dc4c7553c5be2f08f08eadabf4861dceb367..403ed28bac263bdf180dc552591796ca405c9ed9 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H @@ -58,10 +58,10 @@ License // Flow time scale { - rDeltaT.dimensionedInternalFieldRef() = + rDeltaT.ref() = ( - fvc::surfaceSum(mag(phi))().dimensionedInternalField() - /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) + fvc::surfaceSum(mag(phi))()() + /((2*maxCo)*mesh.V()*rho()) ); // Limit the largest time scale @@ -84,9 +84,9 @@ License ) /( alphaTemp - *rho.dimensionedInternalField() - *thermo.Cp()().dimensionedInternalField() - *T.dimensionedInternalField() + *rho() + *thermo.Cp()()() + *T() ) ); @@ -94,9 +94,9 @@ License << gMin(1/(rDeltaTT.field() + VSMALL)) << ", " << gMax(1/(rDeltaTT.field() + VSMALL)) << endl; - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( - rDeltaT.dimensionedInternalField(), + rDeltaT(), rDeltaTT ); } diff --git a/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H index 775da4caebf7da1afeae14ac5fc3a35a90431fc4..bb7ad20efc6ac4cee78d04c241d53eea9235c605 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/UEqn.H @@ -6,7 +6,7 @@ + MRF.DDt(rho, U) + turbulence->divDevRhoReff(U) == - rho.dimensionedInternalField()*g + rho()*g + parcels.SU(U) + fvOptions(rho, U) ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H index 62565f64305c8c5f775a0c90f6022eac89e376e7..3b52192386b52616b697c8b6adb3748f094254d2 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H @@ -58,10 +58,10 @@ License // Flow time scale { - rDeltaT.dimensionedInternalFieldRef() = + rDeltaT.ref() = ( - fvc::surfaceSum(mag(phi))().dimensionedInternalField() - /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) + fvc::surfaceSum(mag(phi))()() + /((2*maxCo)*mesh.V()*rho()) ); // Limit the largest time scale @@ -83,9 +83,9 @@ License ) /( alphaTemp - *rho.dimensionedInternalField() - *thermo.Cp()().dimensionedInternalField() - *T.dimensionedInternalField() + *rho() + *thermo.Cp()()() + *T() ) ); @@ -93,9 +93,9 @@ License << gMin(1/(rDeltaTT.field() + VSMALL)) << ", " << gMax(1/(rDeltaTT.field() + VSMALL)) << endl; - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( - rDeltaT.dimensionedInternalField(), + rDeltaT(), rDeltaTT ); } diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H index 86cf5362f81ac1ee4c31eec659ff2a7481affe43..a29d4b8c5714a62c200a1e7960a583a309e59cd9 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H @@ -6,7 +6,7 @@ + MRF.DDt(rho, U) + turbulence->divDevRhoReff(U) == - rho.dimensionedInternalField()*g + rho()*g + parcels.SU(U) + fvOptions(rho, U) ); diff --git a/applications/solvers/lagrangian/sprayFoam/UEqn.H b/applications/solvers/lagrangian/sprayFoam/UEqn.H index 97a83f7d5b6fc5309e8e0bb9e71a72fdf31622ae..62490aa92ec2034b643c49fff3e4c36f5d2e2960 100644 --- a/applications/solvers/lagrangian/sprayFoam/UEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/UEqn.H @@ -8,7 +8,7 @@ tmp<fvVectorMatrix> tUEqn + MRF.DDt(rho, U) + turbulence->divDevRhoReff(U) == - rho.dimensionedInternalField()*g + rho()*g + parcels.SU(U) + fvOptions(rho, U) ); diff --git a/applications/solvers/multiphase/interFoam/setRDeltaT.H b/applications/solvers/multiphase/interFoam/setRDeltaT.H index afeee4cf4341946bac11860c481aba1482b1a60b..86b7dd9d237b4af637aaf03410822a73ce5dd269 100644 --- a/applications/solvers/multiphase/interFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/interFoam/setRDeltaT.H @@ -56,11 +56,11 @@ volScalarField rDeltaT0("rDeltaT0", rDeltaT); // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), - fvc::surfaceSum(mag(rhoPhi))().dimensionedInternalField() - /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) + fvc::surfaceSum(mag(rhoPhi))()() + /((2*maxCo)*mesh.V()*rho()) ); if (maxAlphaCo < maxCo) @@ -70,12 +70,12 @@ volScalarField alpha1Bar(fvc::average(alpha1)); - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( - rDeltaT.dimensionedInternalField(), - pos(alpha1Bar.dimensionedInternalField() - alphaSpreadMin) - *pos(alphaSpreadMax - alpha1Bar.dimensionedInternalField()) - *fvc::surfaceSum(mag(phi))().dimensionedInternalField() + rDeltaT(), + pos(alpha1Bar() - alphaSpreadMin) + *pos(alphaSpreadMax - alpha1Bar()) + *fvc::surfaceSum(mag(phi))()() /((2*maxAlphaCo)*mesh.V()) ); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H index abad0dfaf042dc43be9b57fdc3040a18030195e1..76f47f8270e2d19c045ad3ed22c58abc113c3b7f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H @@ -43,7 +43,7 @@ forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) slamDampCoeff *max ( - mag(U.dimensionedInternalField()) - maxSlamVelocity, + mag(U()) - maxSlamVelocity, dimensionedScalar("U0", dimVelocity, 0) ) /pow(mesh.V(), 1.0/3.0), diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H index 686d4506840f40091214d54bad515f480a0bcec2..052f704cbdb572bca2d4ba21982bbd1b5e37231f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H @@ -26,10 +26,10 @@ } // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), - fvc::surfaceSum(maxPhi)().dimensionedInternalField() + fvc::surfaceSum(maxPhi)()() /((2*maxCo)*mesh.V()) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H index 3c68f2a95f45fa112acf2789d726ce89978282bb..f8e880a474b68578fe42abe1157b9d573162306a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H @@ -19,10 +19,10 @@ ); // Set the reciprocal time-step from the local Courant number - rDeltaT.dimensionedInternalFieldRef() = max + rDeltaT.ref() = max ( 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), - fvc::surfaceSum(max(mag(phi1), mag(phi2)))().dimensionedInternalField() + fvc::surfaceSum(max(mag(phi1), mag(phi2)))()() /((2*maxCo)*mesh.V()) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index 0864234fe3ddf4a7e8f86421f53783bbadf28616..6c039598a3cf03bed0180026435ff0876fa9924c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -212,26 +212,26 @@ void Foam::twoPhaseSystem::solve() { tdgdt = ( - alpha2.dimensionedInternalField() - *phase1_.divU()().dimensionedInternalField() - - alpha1.dimensionedInternalField() - *phase2_.divU()().dimensionedInternalField() + alpha2() + *phase1_.divU()()() + - alpha1() + *phase2_.divU()()() ); } else if (phase1_.divU().valid()) { tdgdt = ( - alpha2.dimensionedInternalField() - *phase1_.divU()().dimensionedInternalField() + alpha2() + *phase1_.divU()()() ); } else if (phase2_.divU().valid()) { tdgdt = ( - - alpha1.dimensionedInternalField() - *phase2_.divU()().dimensionedInternalField() + - alpha1() + *phase2_.divU()()() ); } diff --git a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C index 6f1ec3069052cd91ad9e1381b0c7333a07c55326..5338be0df9f0c2526240bae3d7022a2a5d1dfa49 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<scalar>::typeName ); - V.dimensionedInternalFieldRef() = mesh.V(); + V.ref() = mesh.V(); volScalarField::Boundary& Vbf = V.boundaryFieldRef(); diff --git a/applications/utilities/postProcessing/velocityField/Co/Co.C b/applications/utilities/postProcessing/velocityField/Co/Co.C index ef5953c86f567bff38d650360354e9e4bae33384..b71c8bd62bba35f70e87500dd16a20eaf5ff099c 100644 --- a/applications/utilities/postProcessing/velocityField/Co/Co.C +++ b/applications/utilities/postProcessing/velocityField/Co/Co.C @@ -87,9 +87,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) mesh ); - Co.dimensionedInternalFieldRef() = + Co.ref() = (0.5*runTime.deltaT()) - *fvc::surfaceSum(mag(phi))().dimensionedInternalField() + *fvc::surfaceSum(mag(phi))()() /(rho*mesh.V()); Co.correctBoundaryConditions(); } @@ -97,9 +97,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { Info<< " Calculating incompressible Co" << endl; - Co.dimensionedInternalFieldRef() = + Co.ref() = (0.5*runTime.deltaT()) - *fvc::surfaceSum(mag(phi))().dimensionedInternalField() + *fvc::surfaceSum(mag(phi))()() /mesh.V(); Co.correctBoundaryConditions(); } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index 2d43b495cf060de0e55c6190ee325a57ff904e98..6edd7cf428ffe5112e359b86777d68dea8998b9d 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -714,7 +714,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::~GeometricField() template<class Type, template<class> class PatchField, class GeoMesh> typename Foam::GeometricField<Type, PatchField, GeoMesh>::Internal& -Foam::GeometricField<Type, PatchField, GeoMesh>::dimensionedInternalFieldRef() +Foam::GeometricField<Type, PatchField, GeoMesh>::ref() { this->setUpToDate(); storeOldTimes(); @@ -1138,7 +1138,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator= // Only assign field contents not ID - dimensionedInternalFieldRef() = gf.dimensionedInternalField(); + ref() = gf(); boundaryFieldRef() = gf.boundaryField(); } @@ -1182,7 +1182,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator= const dimensioned<Type>& dt ) { - dimensionedInternalFieldRef() = dt; + ref() = dt; boundaryFieldRef() = dt.value(); } @@ -1199,7 +1199,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator== // Only assign field contents not ID - dimensionedInternalFieldRef() = gf.dimensionedInternalField(); + ref() = gf(); boundaryFieldRef() == gf.boundaryField(); tgf.clear(); @@ -1212,7 +1212,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator== const dimensioned<Type>& dt ) { - dimensionedInternalFieldRef() = dt; + ref() = dt; boundaryFieldRef() == dt.value(); } @@ -1227,7 +1227,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator op \ { \ checkField(*this, gf, #op); \ \ - dimensionedInternalFieldRef() op gf.dimensionedInternalField(); \ + ref() op gf(); \ boundaryFieldRef() op gf.boundaryField(); \ } \ \ @@ -1247,7 +1247,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator op \ const dimensioned<TYPE>& dt \ ) \ { \ - dimensionedInternalFieldRef() op dt; \ + ref() op dt; \ boundaryFieldRef() op dt.value(); \ } @@ -1268,7 +1268,7 @@ Foam::Ostream& Foam::operator<< const GeometricField<Type, PatchField, GeoMesh>& gf ) { - gf.dimensionedInternalField().writeData(os, "internalField"); + gf().writeData(os, "internalField"); os << nl; gf.boundaryField().writeEntry("boundaryField", os); diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index bf8b97a1fccc3e651948e42f234dfa233f363a83..c9b83b4589964416ed1246ffaee76dcb96206ee9 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H @@ -447,7 +447,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. - Internal& dimensionedInternalFieldRef(); + Internal& ref(); //- Return a const-reference to the dimensioned internal field inline const Internal& dimensionedInternalField() const; diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldI.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldI.H index 7c93a3d723329ccfd210ce333ccb03fc806cdd4c..697da6e5989e93638f09d9e44ae1770e01a0bc67 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldI.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricFieldI.H @@ -33,17 +33,6 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::null() } -template<class Type, template<class> class PatchField, class GeoMesh> -inline -const typename -Foam::GeometricField<Type, PatchField, GeoMesh>::Internal& -Foam::GeometricField<Type, PatchField, GeoMesh>:: -operator()() const -{ - return *this; -} - - template<class Type, template<class> class PatchField, class GeoMesh> inline const typename @@ -90,4 +79,17 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::timeIndex() } +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template<class Type, template<class> class PatchField, class GeoMesh> +inline +const typename +Foam::GeometricField<Type, PatchField, GeoMesh>::Internal& +Foam::GeometricField<Type, PatchField, GeoMesh>:: +operator()() const +{ + return *this; +} + + // ************************************************************************* // diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C index ea1e8eb79b1c149c6ccbb290ecdbfb0e4df87932..05533785c7e3e01e94cd4874d95ddaddc12e5565 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C @@ -695,7 +695,7 @@ void kkLOmega::correct() - fvm::Sp(Cw2_*sqr(fw)*omega_, omega_) + ( Cw3_*fOmega(lambdaEff, lambdaT)*alphaTEff*sqr(fw)*sqrt(kt_) - )().dimensionedInternalField()/pow3(y_.dimensionedInternalField()) + )()()/pow3(y_()) ); omegaEqn.ref().relax(); diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C index 5d8fcb737b03b0c8efcff35b7cc73c41e42a4bd0..3fbedbbe19ff6730c9a1e9a40741cbc972da5973 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C @@ -57,7 +57,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, scalar widthCoeff) calculatedFvPatchScalarField::typeName ) { - coeff_.dimensionedInternalFieldRef() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; + coeff_.ref() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; } @@ -78,7 +78,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd) calculatedFvPatchScalarField::typeName ) { - coeff_.dimensionedInternalFieldRef() = pow(mesh.V(), 2.0/3.0)/widthCoeff_; + coeff_.ref() = 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 73ec7ee33912bebcd6d8a355e858875507158033..39ca2b1a2d9878eea72f965b141c983128d1d869 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -158,7 +158,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::dTilda ) const { tmp<volScalarField> tdTilda(CDES_*this->delta()); - min(tdTilda.ref().dimensionedInternalFieldRef(), tdTilda(), y_); + min(tdTilda.ref().ref(), tdTilda(), y_); return tdTilda; } diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index 566d92dee8015a16230a5fd4f81ac2652cd4a0dc..8df2f329cf251b47683e5f3763dddb69fb65a431 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -161,7 +161,7 @@ singleStepCombustion<CombThermoType, ThermoType>::dQ() const if (this->active()) { volScalarField& dQ = tdQ.ref(); - dQ.dimensionedInternalFieldRef() = this->mesh().V()*Sh()(); + dQ.ref() = this->mesh().V()*Sh()(); } return tdQ; } diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C index f5d9c5e821eb2aeb1679cf0478f09b8134461687..03a9779533063a00d11a8b772e3801c56fc7d649 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C @@ -157,7 +157,7 @@ void Foam::fvMeshAdder::MapVolField ( bfld[newPatchi], // old field mesh.boundary()[newPatchi], // new fvPatch - fld.dimensionedInternalField(), // new internal field + fld(), // new internal field patchMapper // mapper (new to old) ) ); @@ -211,7 +211,7 @@ void Foam::fvMeshAdder::MapVolField ( fldToAdd.boundaryField()[patchi], // added field mesh.boundary()[newPatchi], // new fvPatch - fld.dimensionedInternalField(), // new int. field + fld(), // new int. field patchMapper // mapper ) ); @@ -464,7 +464,7 @@ void Foam::fvMeshAdder::MapSurfaceField ( bfld[newPatchi], // old field mesh.boundary()[newPatchi], // new fvPatch - fld.dimensionedInternalField(), // new internal field + fld(), // new internal field patchMapper // mapper (new to old) ) ); @@ -518,7 +518,7 @@ void Foam::fvMeshAdder::MapSurfaceField ( fldToAdd.boundaryField()[patchi],// added field mesh.boundary()[newPatchi], // new fvPatch - fld.dimensionedInternalField(), // new int. field + fld(), // new int. field patchMapper // mapper ) ); diff --git a/src/dynamicMesh/fvMeshTools/fvMeshToolsTemplates.C b/src/dynamicMesh/fvMeshTools/fvMeshToolsTemplates.C index 3f5aed90032363e70b43e73a44ddfea344e271d8..4cbc964da24af1968f67135b9e88be5a0c3032b4 100644 --- a/src/dynamicMesh/fvMeshTools/fvMeshToolsTemplates.C +++ b/src/dynamicMesh/fvMeshTools/fvMeshToolsTemplates.C @@ -61,7 +61,7 @@ void Foam::fvMeshTools::addPatchFields GeoField::Patch::New ( mesh.boundary()[sz], - fld.dimensionedInternalField(), + fld(), patchFieldDict.subDict(fld.name()) ) ); @@ -75,7 +75,7 @@ void Foam::fvMeshTools::addPatchFields ( defaultPatchFieldType, mesh.boundary()[sz], - fld.dimensionedInternalField() + fld() ) ); bfld[sz] == defaultPatchValue; @@ -112,7 +112,7 @@ void Foam::fvMeshTools::setPatchFields GeoField::Patch::New ( mesh.boundary()[patchi], - fld.dimensionedInternalField(), + fld(), patchFieldDict.subDict(fld.name()) ) ); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C index ed793845c1afbf4435bee802aeb8bdc59c51b44b..6461c0dfe4af8b41c80a8e4582fdc0eb60e6783c 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C @@ -323,14 +323,14 @@ CrankNicolsonDdtScheme<Type>::fvcDdt { dimensionedScalar rDtCoef0 = rDtCoef0_(ddt0); - ddt0.dimensionedInternalFieldRef() = + ddt0.ref() = ( (rDtCoef0*dt)*(mesh().V0() - mesh().V00()) - mesh().V00()*offCentre_(ddt0.dimensionedInternalField()) )/mesh().V0(); } - tdtdt.ref().dimensionedInternalFieldRef() = + tdtdt.ref().ref() = ( (rDtCoef*dt)*(mesh().V() - mesh().V0()) - mesh().V0()*offCentre_(ddt0.dimensionedInternalField()) diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C index e830ebbb46d5930d3ce70df02e7fb0302919b7f9..a9c42ed4e1f1468ab624551d726419a1dcb6f8d3 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C @@ -144,7 +144,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate ( vf.boundaryField()[patchMap[patchi]], subPatch, - resF.dimensionedInternalField(), + resF(), directFvPatchFieldMapper(directAddressing) ) ); @@ -288,7 +288,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate ( vf.boundaryField()[patchMap[patchi]], subPatch, - resF.dimensionedInternalField(), + resF(), directFvPatchFieldMapper(directAddressing) ) ); @@ -462,7 +462,7 @@ fvMeshSubset::interpolate ( vf.boundaryField()[patchMap[patchi]], subPatch, - resF.dimensionedInternalField(), + resF(), directPointPatchFieldMapper(directAddressing) ) ); diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C index fe0c8779d0430af55a6b8987c64eb63c6d4ea0fe..be4128fa86d31efa8379bff6f66fde3896561874 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C @@ -115,7 +115,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate ( vf.boundaryField()[patchi], boundary()[patchi], - resF.dimensionedInternalField(), + resF(), agglomPatchFieldMapper(coarseToFine, coarseWeights) ) ); @@ -134,7 +134,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate ( vf.boundaryField()[patchi], boundary()[patchi], - resF.dimensionedInternalField(), + resF(), directFvPatchFieldMapper(map) ) ); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 94408ef00c5c9e5490761de63af04e774184f13f..19f28f1cb071eb7c0272fde352c43e7c36b516c7 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -87,7 +87,7 @@ void Foam::volPointInterpolation::addSeparated } typename GeometricField<Type, pointPatchField, pointMesh>:: - Internal& pfi = pf.dimensionedInternalFieldRef(); + Internal& pfi = pf.ref(); typename GeometricField<Type, pointPatchField, pointMesh>:: Boundary& pfbf = pf.boundaryFieldRef(); diff --git a/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C index ad48d728f978e4cf743860273523f8acd5583eed..4a1c4ec6547f4461b7108572cf9e69235c96e9a6 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/uniformInterpolatedDisplacement/uniformInterpolatedDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -249,7 +249,7 @@ void uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs() // Extract back from the internal field this->operator== ( - this->patchInternalField(result.dimensionedInternalField()) + this->patchInternalField(result()) ); fixedValuePointPatchField<vector>::updateCoeffs(); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C index 898467c7ee759fb104d05c255ca47254bf151547..d33f648b4070ee814bdf2fc124f9d44c27457704 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C @@ -226,7 +226,7 @@ void Foam::meshRefinement::addPatchFields ( patchFieldType, mesh.boundary()[sz], - fld.dimensionedInternalField() + fld() ) ); } diff --git a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C index 43ff63310b1db5cb438d9249ff58690ce43eb9b5..af2475cea3bf5ffb229433a7432ed15b17a7504a 100644 --- a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C +++ b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C @@ -96,7 +96,7 @@ Foam::fvFieldDecomposer::decomposeField ( field.boundaryField()[boundaryAddressing_[patchi]], procMesh_.boundary()[patchi], - resF.dimensionedInternalField(), + resF(), *patchFieldDecomposerPtrs_[patchi] ) ); @@ -109,7 +109,7 @@ Foam::fvFieldDecomposer::decomposeField new processorCyclicFvPatchField<Type> ( procMesh_.boundary()[patchi], - resF.dimensionedInternalField(), + resF(), Field<Type> ( field.internalField(), @@ -126,7 +126,7 @@ Foam::fvFieldDecomposer::decomposeField new processorFvPatchField<Type> ( procMesh_.boundary()[patchi], - resF.dimensionedInternalField(), + resF(), Field<Type> ( field.internalField(), @@ -143,7 +143,7 @@ Foam::fvFieldDecomposer::decomposeField new emptyFvPatchField<Type> ( procMesh_.boundary()[patchi], - resF.dimensionedInternalField() + resF() ) ); } @@ -266,7 +266,7 @@ Foam::fvFieldDecomposer::decomposeField ( field.boundaryField()[boundaryAddressing_[patchi]], procMesh_.boundary()[patchi], - resF.dimensionedInternalField(), + resF(), *patchFieldDecomposerPtrs_[patchi] ) ); @@ -279,7 +279,7 @@ Foam::fvFieldDecomposer::decomposeField new processorCyclicFvsPatchField<Type> ( procMesh_.boundary()[patchi], - resF.dimensionedInternalField(), + resF(), Field<Type> ( allFaceField, @@ -296,7 +296,7 @@ Foam::fvFieldDecomposer::decomposeField new processorFvsPatchField<Type> ( procMesh_.boundary()[patchi], - resF.dimensionedInternalField(), + resF(), Field<Type> ( allFaceField, diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C index 32f78e3aa99ca45d5798af2a95b07aaf09d48ad5..a98e6f2c0071f6104c48a319a191053586f05662 100644 --- a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C +++ b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C @@ -142,10 +142,10 @@ void Foam::CourantNo::execute() mesh.lookupObject<volScalarField>(type()) ); - Co.dimensionedInternalFieldRef() = byRho + Co.ref() = byRho ( (0.5*mesh.time().deltaT()) - *fvc::surfaceSum(mag(phi))().dimensionedInternalField() + *fvc::surfaceSum(mag(phi))()() /mesh.V() ); Co.correctBoundaryConditions(); diff --git a/src/sampling/meshToMesh/meshToMeshTemplates.C b/src/sampling/meshToMesh/meshToMeshTemplates.C index 000aa35ea58ecb45ac5a582d768ccf4667318a23..cff62b8b8351c3e7e3ff6387b0e9612ce199e58e 100644 --- a/src/sampling/meshToMesh/meshToMeshTemplates.C +++ b/src/sampling/meshToMesh/meshToMeshTemplates.C @@ -351,7 +351,7 @@ void Foam::meshToMesh::mapSrcToTgt ( srcField, tgtField.patch(), - result.dimensionedInternalField(), + result(), weightedFvPatchFieldMapper ( AMIList[i].tgtAddress(), @@ -540,7 +540,7 @@ void Foam::meshToMesh::mapTgtToSrc ( tgtField, srcField.patch(), - result.dimensionedInternalField(), + result(), weightedFvPatchFieldMapper ( AMIList[i].srcAddress(), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index 4522edcd18beb0d869a2882a9629cf7d9695d720..347e506901e162be664da36aae41b29a5c1d362f 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -611,7 +611,7 @@ Foam::chemistryModel<CompType, ThermoType>::dQ() const if (this->chemistry_) { volScalarField& dQ = tdQ.ref(); - dQ.dimensionedInternalFieldRef() = this->mesh_.V()*Sh()(); + dQ.ref() = this->mesh_.V()*Sh()(); } return tdQ; diff --git a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C index ef200e50f32285c6d8b8f93cfe2c635563e4aeb8..bf5b738ffc38313d8512e61af23e5529bb9fc089 100644 --- a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C @@ -282,11 +282,11 @@ Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>> Foam::radiation::P1::Ru() const { const DimensionedField<scalar, volMesh>& G = - G_.dimensionedInternalField(); + G_(); const DimensionedField<scalar, volMesh> E = - absorptionEmission_->ECont()().dimensionedInternalField(); + absorptionEmission_->ECont()()(); const DimensionedField<scalar, volMesh> a = - absorptionEmission_->aCont()().dimensionedInternalField(); + absorptionEmission_->aCont()()(); return a*G - E; } diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C index 9e1fd80e69fb3fafdf603bdff8e90eb7273d6377..b41056add0ddfbfe1906708f6594470d04db7400 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C @@ -494,14 +494,14 @@ Foam::radiation::fvDOM::Ru() const { const DimensionedField<scalar, volMesh>& G = - G_.dimensionedInternalField(); + G_(); const DimensionedField<scalar, volMesh> E = - absorptionEmission_->ECont()().dimensionedInternalField(); + absorptionEmission_->ECont()()(); // Only include continuous phase absorption const DimensionedField<scalar, volMesh> a = - absorptionEmission_->aCont()().dimensionedInternalField(); + absorptionEmission_->aCont()()(); return a*G - E; } diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C index 72f6c52e71670c9364adfb792b7ea0eb0bbcffe0..5a62650775069b2623e7f584e6cb592c970cb15a 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C @@ -177,7 +177,7 @@ Foam::solidChemistryModel<CompType, SolidThermo>::dQ() const if (this->chemistry_) { volScalarField& dQ = tdQ.ref(); - dQ.dimensionedInternalFieldRef() = this->mesh_.V()*Sh()(); + dQ.ref() = this->mesh_.V()*Sh()(); } return tdQ;