Commit 97f473ff authored by Henry Weller's avatar Henry Weller
Browse files

GeometricField::dimensionedInternalField() -> GeometricField::dimensionedInternalFieldRef()

See also commit a4e2afa4
parent a0742586
......@@ -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
......
......@@ -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();
......
......@@ -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();
......
......@@ -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()
......
......@@ -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()
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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()
......
......@@ -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()
......
......@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
calculatedFvPatchField<scalar>::typeName
);
V.dimensionedInternalField() = mesh.V();
V.dimensionedInternalFieldRef() = mesh.V();
volScalarField::GeometricBoundaryField& Vbf = V.boundaryFieldRef();
......
......@@ -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();
......
......@@ -690,7 +690,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::~GeometricField()
template<class Type, template<class> class PatchField, class GeoMesh>
typename
Foam::GeometricField<Type, PatchField, GeoMesh>::DimensionedInternalField&
Foam::GeometricField<Type, PatchField, GeoMesh>::dimensionedInternalField()
Foam::GeometricField<Type, PatchField, GeoMesh>::dimensionedInternalFieldRef()
{
this->setUpToDate();
storeOldTimes();
......@@ -1112,9 +1112,9 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::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<Type, PatchField, GeoMesh>::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<Field<Type>&>(gf.internalField())
......@@ -1158,7 +1158,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
const dimensioned<Type>& dt
)
{
dimensionedInternalField() = dt;
dimensionedInternalFieldRef() = dt;
boundaryFieldRef() = dt.value();
}
......@@ -1173,9 +1173,9 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::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<Type, PatchField, GeoMesh>::operator==
const dimensioned<Type>& dt
)
{
dimensionedInternalField() = dt;
dimensionedInternalFieldRef() = dt;
boundaryFieldRef() == dt.value();
}
......@@ -1203,7 +1203,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::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<Type, PatchField, GeoMesh>::operator op \
const dimensioned<TYPE>& dt \
) \
{ \
dimensionedInternalField() op dt; \
dimensionedInternalFieldRef() op dt; \
boundaryFieldRef() op dt.value(); \
}
......
......@@ -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;
......
......@@ -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_;
}
......
......@@ -158,7 +158,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::dTilda
) const
{
tmp<volScalarField> tdTilda(CDES_*this->delta());
min(tdTilda.ref().dimensionedInternalField(), tdTilda(), y_);
min(tdTilda.ref().dimensionedInternalFieldRef(), tdTilda(), y_);
return tdTilda;
}
......
......@@ -161,7 +161,7 @@ singleStepCombustion<CombThermoType, ThermoType>::dQ() const
if (this->active())
{
volScalarField& dQ = tdQ.ref();
dQ.dimensionedInternalField() = this->mesh().V()*Sh()();
dQ.dimensionedInternalFieldRef() = this->mesh().V()*Sh()();
}
return tdQ;
}
......
......@@ -323,14 +323,14 @@ CrankNicolsonDdtScheme<Type>::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())
......
......@@ -46,4 +46,7 @@ surfaceInterpolateFields/surfaceInterpolateFieldsFunctionObject.C
regionSizeDistribution/regionSizeDistribution.C
regionSizeDistribution/regionSizeDistributionFunctionObject.C
histogram/histogram.C
histogram/histogramFunctionObject.C
LIB = $(FOAM_LIBBIN)/libfieldFunctionObjects
......@@ -142,7 +142,7 @@ void Foam::CourantNo::execute()
mesh.lookupObject<volScalarField>(type())
);
Co.dimensionedInternalField() = byRho
Co.dimensionedInternalFieldRef() = byRho
(
(0.5*mesh.time().deltaT())
*fvc::surfaceSum(mag(phi))().dimensionedInternalField()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment