GeometricField::dimensionedInteralFieldRef() -> GeometricField::ref()

In order to simplify expressions involving dimensioned internal field it
is preferable to use a simpler access convention.  Given that
GeometricField is derived from DimensionedField it is simply a matter of
de-referencing this underlying type unlike the boundary field which is
peripheral information.  For consistency with the new convention in
"tmp"  "dimensionedInteralFieldRef()" has been renamed "ref()".
This commit is contained in:
Henry Weller
2016-04-30 18:43:51 +01:00
parent bd911f60c8
commit 68fb9a2bf9
40 changed files with 136 additions and 134 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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())
);

View File

@ -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())
);
}