mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
These new names are more consistent and logical because:
primitiveField():
primitiveFieldRef():
Provides low-level access to the Field<Type> (primitive field)
without dimension or mesh-consistency checking. This should only be
used in the low-level functions where dimensional consistency is
ensured by careful programming and computational efficiency is
paramount.
internalField():
internalFieldRef():
Provides access to the DimensionedField<Type, GeoMesh> of values on
the internal mesh-type for which the GeometricField is defined and
supports dimension and checking and mesh-consistency checking.
This commit is contained in:
@ -61,7 +61,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
force.internalFieldRef() = ReImSum
|
force.primitiveFieldRef() = ReImSum
|
||||||
(
|
(
|
||||||
fft::reverseTransform
|
fft::reverseTransform
|
||||||
(
|
(
|
||||||
|
|||||||
@ -105,7 +105,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
|||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("zero", Nv.dimensions(), 0.0)
|
dimensionedScalar("zero", Nv.dimensions(), 0.0)
|
||||||
);
|
);
|
||||||
N.internalFieldRef() = Nv.internalField()*Cw;
|
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
|
||||||
|
|
||||||
volSymmTensorField ns
|
volSymmTensorField ns
|
||||||
(
|
(
|
||||||
@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
|
|||||||
Zero
|
Zero
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
ns.internalFieldRef() = nsv.internalField()*Cw;
|
ns.primitiveFieldRef() = nsv.primitiveField()*Cw;
|
||||||
|
|
||||||
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
|
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
|
||||||
volScalarField b((Uhat & B_ & Uhat)/sqrt(n));
|
volScalarField b((Uhat & B_ & Uhat)/sqrt(n));
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
|
|||||||
volScalarField& Gtot = tGtot.ref();
|
volScalarField& Gtot = tGtot.ref();
|
||||||
|
|
||||||
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
|
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
|
||||||
scalarField N(Nv.internalField()*Cw);
|
scalarField N(Nv.primitiveField()*Cw);
|
||||||
|
|
||||||
forAll(N, celli)
|
forAll(N, celli)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,8 +36,8 @@ Description
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phiSt))().internalField()
|
fvc::surfaceSum(mag(phiSt))().primitiveField()
|
||||||
/ rho.internalField()
|
/ rho.primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|||||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
|
|||||||
|
|
||||||
if (subGridSchelkin_)
|
if (subGridSchelkin_)
|
||||||
{
|
{
|
||||||
up.internalFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
|
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
|
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));
|
||||||
|
|||||||
@ -82,7 +82,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
|
|||||||
volScalarField up(sqrt((2.0/3.0)*k));
|
volScalarField up(sqrt((2.0/3.0)*k));
|
||||||
if (subGridSchelkin_)
|
if (subGridSchelkin_)
|
||||||
{
|
{
|
||||||
up.internalFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
|
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
|
volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
|
||||||
|
|||||||
@ -114,7 +114,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
volScalarField& N = tN.ref();
|
volScalarField& N = tN.ref();
|
||||||
N.internalFieldRef() = Nv.internalField()*pow(mesh.V(), 2.0/3.0);
|
N.primitiveFieldRef() = Nv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
||||||
|
|
||||||
volSymmTensorField ns
|
volSymmTensorField ns
|
||||||
(
|
(
|
||||||
@ -134,7 +134,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
|||||||
Zero
|
Zero
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
ns.internalFieldRef() = nsv.internalField()*pow(mesh.V(), 2.0/3.0);
|
ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0);
|
||||||
|
|
||||||
const volVectorField Uhat
|
const volVectorField Uhat
|
||||||
(
|
(
|
||||||
@ -150,7 +150,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
|
|||||||
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
|
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
|
||||||
|
|
||||||
// Re use tN
|
// Re use tN
|
||||||
N.internalFieldRef() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
|
N.primitiveFieldRef() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
|
||||||
|
|
||||||
return tN;
|
return tN;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,8 +68,8 @@ License
|
|||||||
rDeltaT.max(1/maxDeltaT);
|
rDeltaT.max(1/maxDeltaT);
|
||||||
|
|
||||||
Info<< " Flow = "
|
Info<< " Flow = "
|
||||||
<< gMin(1/rDeltaT.internalField()) << ", "
|
<< gMin(1/rDeltaT.primitiveField()) << ", "
|
||||||
<< gMax(1/rDeltaT.internalField()) << endl;
|
<< gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reaction source time scale
|
// Reaction source time scale
|
||||||
@ -120,8 +120,8 @@ License
|
|||||||
rDeltaT.correctBoundaryConditions();
|
rDeltaT.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< " Overall = "
|
Info<< " Overall = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Description
|
|||||||
|
|
||||||
if (mesh.nInternalFaces())
|
if (mesh.nInternalFaces())
|
||||||
{
|
{
|
||||||
scalarField sumAmaxSf(fvc::surfaceSum(amaxSf)().internalField());
|
scalarField sumAmaxSf(fvc::surfaceSum(amaxSf)().primitiveField());
|
||||||
|
|
||||||
CoNum = 0.5*gMax(sumAmaxSf/mesh.V().field())*runTime.deltaTValue();
|
CoNum = 0.5*gMax(sumAmaxSf/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ const volScalarField& psi = thermo.psi();
|
|||||||
const volScalarField& mu = thermo.mu();
|
const volScalarField& mu = thermo.mu();
|
||||||
|
|
||||||
bool inviscid(true);
|
bool inviscid(true);
|
||||||
if (max(mu.internalField()) > 0.0)
|
if (max(mu.primitiveField()) > 0.0)
|
||||||
{
|
{
|
||||||
inviscid = false;
|
inviscid = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,6 @@
|
|||||||
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
||||||
|
|
||||||
Info<< "Flow time scale min/max = "
|
Info<< "Flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,8 +53,8 @@
|
|||||||
rDeltaT.correctBoundaryConditions();
|
rDeltaT.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< "Flow time scale min/max = "
|
Info<< "Flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
|
|
||||||
if (rDeltaTSmoothingCoeff < 1.0)
|
if (rDeltaTSmoothingCoeff < 1.0)
|
||||||
{
|
{
|
||||||
@ -62,8 +62,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Smoothed flow time scale min/max = "
|
Info<< "Smoothed flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
|
|
||||||
// Limit rate of change of time scale
|
// Limit rate of change of time scale
|
||||||
// - reduce as much as required
|
// - reduce as much as required
|
||||||
@ -79,7 +79,7 @@
|
|||||||
*max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
|
*max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
|
||||||
|
|
||||||
Info<< "Damped flow time scale min/max = "
|
Info<< "Damped flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,8 +36,8 @@ Foam::scalar Foam::compressibleCourantNo
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phi))().internalField()
|
fvc::surfaceSum(mag(phi))().primitiveField()
|
||||||
/ rho.internalField()
|
/ rho.primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
scalar CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
aniAlphas[i].internalFieldRef() =
|
aniAlphas[i].primitiveFieldRef() =
|
||||||
coordinates[i].R().transformVector(tkappaByCp());
|
coordinates[i].R().transformVector(tkappaByCp());
|
||||||
aniAlphas[i].correctBoundaryConditions();
|
aniAlphas[i].correctBoundaryConditions();
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ if (!thermo.isotropic())
|
|||||||
tmp<volVectorField> tkappaByCp = thermo.Kappa()/cp;
|
tmp<volVectorField> tkappaByCp = thermo.Kappa()/cp;
|
||||||
const coordinateSystem& coodSys = coordinates[i];
|
const coordinateSystem& coodSys = coordinates[i];
|
||||||
|
|
||||||
aniAlpha.internalFieldRef() =
|
aniAlpha.primitiveFieldRef() =
|
||||||
coodSys.R().transformVector(tkappaByCp());
|
coodSys.R().transformVector(tkappaByCp());
|
||||||
aniAlpha.correctBoundaryConditions();
|
aniAlpha.correctBoundaryConditions();
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ Foam::scalar Foam::solidRegionDiffNo
|
|||||||
/ fvc::interpolate(Cprho)
|
/ fvc::interpolate(Cprho)
|
||||||
);
|
);
|
||||||
|
|
||||||
DiNum = gMax(kapparhoCpbyDelta.internalField())*runTime.deltaT().value();
|
DiNum = gMax(kapparhoCpbyDelta.primitiveField())*runTime.deltaT().value();
|
||||||
|
|
||||||
meanDiNum = (average(kapparhoCpbyDelta)).value()*runTime.deltaT().value();
|
meanDiNum = (average(kapparhoCpbyDelta)).value()*runTime.deltaT().value();
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ label cellId = patches[patchId].faceCells()[faceId];
|
|||||||
scalarField y
|
scalarField y
|
||||||
(
|
(
|
||||||
wallNormal
|
wallNormal
|
||||||
& (mesh.C().internalField() - mesh.C().boundaryField()[patchId][faceId])
|
& (mesh.C().primitiveField() - mesh.C().boundaryField()[patchId][faceId])
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< " Height to first cell centre y0 = " << y[cellId] << endl;
|
Info<< " Height to first cell centre y0 = " << y[cellId] << endl;
|
||||||
|
|||||||
@ -38,8 +38,8 @@ if (mesh.nInternalFaces())
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phi))().internalField()
|
fvc::surfaceSum(mag(phi))().primitiveField()
|
||||||
/ h.internalField()
|
/ h.primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
@ -53,7 +53,7 @@ if (mesh.nInternalFaces())
|
|||||||
fvc::surfaceSum
|
fvc::surfaceSum
|
||||||
(
|
(
|
||||||
fvc::interpolate(sqrt(h))*mesh.magSf()
|
fvc::interpolate(sqrt(h))*mesh.magSf()
|
||||||
)().internalField()/mesh.V().field()
|
)().primitiveField()/mesh.V().field()
|
||||||
)*sqrt(magg).value()*runTime.deltaTValue();
|
)*sqrt(magg).value()*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (mesh.nInternalFaces())
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phic))().internalField()
|
fvc::surfaceSum(mag(phic))().primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|||||||
@ -107,7 +107,7 @@ int main(int argc, char *argv[])
|
|||||||
zeroGradientFvPatchVectorField::typeName
|
zeroGradientFvPatchVectorField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
cloudVolSUSu.internalFieldRef() = -cloudSU.source()/mesh.V();
|
cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
|
||||||
cloudVolSUSu.correctBoundaryConditions();
|
cloudVolSUSu.correctBoundaryConditions();
|
||||||
cloudSU.source() = Zero;
|
cloudSU.source() = Zero;
|
||||||
|
|
||||||
|
|||||||
@ -68,8 +68,8 @@ License
|
|||||||
rDeltaT.max(1/maxDeltaT);
|
rDeltaT.max(1/maxDeltaT);
|
||||||
|
|
||||||
Info<< " Flow = "
|
Info<< " Flow = "
|
||||||
<< gMin(1/rDeltaT.internalField()) << ", "
|
<< gMin(1/rDeltaT.primitiveField()) << ", "
|
||||||
<< gMax(1/rDeltaT.internalField()) << endl;
|
<< gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reaction source time scale
|
// Reaction source time scale
|
||||||
@ -127,8 +127,8 @@ License
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< " Overall = "
|
Info<< " Overall = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -68,8 +68,8 @@ License
|
|||||||
rDeltaT.max(1/maxDeltaT);
|
rDeltaT.max(1/maxDeltaT);
|
||||||
|
|
||||||
Info<< " Flow = "
|
Info<< " Flow = "
|
||||||
<< gMin(1/rDeltaT.internalField()) << ", "
|
<< gMin(1/rDeltaT.primitiveField()) << ", "
|
||||||
<< gMax(1/rDeltaT.internalField()) << endl;
|
<< gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reaction source time scale
|
// Reaction source time scale
|
||||||
@ -126,8 +126,8 @@ License
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< " Overall = "
|
Info<< " Overall = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ if (mesh.nInternalFaces())
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phi))().internalField()
|
fvc::surfaceSum(mag(phi))().primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
@ -50,7 +50,7 @@ if (mesh.nInternalFaces())
|
|||||||
fvc::surfaceSum
|
fvc::surfaceSum
|
||||||
(
|
(
|
||||||
fvc::interpolate(scalar(1)/sqrt(psi))*mesh.magSf()
|
fvc::interpolate(scalar(1)/sqrt(psi))*mesh.magSf()
|
||||||
)().internalField()/mesh.V().field()
|
)().primitiveField()/mesh.V().field()
|
||||||
)*runTime.deltaTValue();
|
)*runTime.deltaTValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -41,8 +41,8 @@ if (mesh.nInternalFaces())
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
mixture.nearInterface()().internalField()
|
mixture.nearInterface()().primitiveField()
|
||||||
*fvc::surfaceSum(mag(phi))().internalField()
|
*fvc::surfaceSum(mag(phi))().primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|||||||
@ -35,7 +35,7 @@ else
|
|||||||
|
|
||||||
//solve(fvm::ddt(rho) + fvc::div(rhoPhi));
|
//solve(fvm::ddt(rho) + fvc::div(rhoPhi));
|
||||||
//Info<< "density error = "
|
//Info<< "density error = "
|
||||||
// << max((mag(rho - rhoNew)/mag(rhoNew))().internalField()) << endl;
|
// << max((mag(rho - rhoNew)/mag(rhoNew))().primitiveField()) << endl;
|
||||||
|
|
||||||
rho == rhoNew;
|
rho == rhoNew;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,8 +84,8 @@
|
|||||||
rDeltaT.correctBoundaryConditions();
|
rDeltaT.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< "Flow time scale min/max = "
|
Info<< "Flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
|
|
||||||
if (rDeltaTSmoothingCoeff < 1.0)
|
if (rDeltaTSmoothingCoeff < 1.0)
|
||||||
{
|
{
|
||||||
@ -111,8 +111,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Smoothed flow time scale min/max = "
|
Info<< "Smoothed flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
|
|
||||||
// Limit rate of change of time scale
|
// Limit rate of change of time scale
|
||||||
// - reduce as much as required
|
// - reduce as much as required
|
||||||
@ -130,7 +130,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Damped flow time scale min/max = "
|
Info<< "Damped flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (mesh.nInternalFaces())
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phi))().internalField()
|
fvc::surfaceSum(mag(phi))().primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
|
||||||
@ -44,7 +44,7 @@ if (mesh.nInternalFaces())
|
|||||||
sumPhi = max
|
sumPhi = max
|
||||||
(
|
(
|
||||||
sumPhi,
|
sumPhi,
|
||||||
fvc::surfaceSum(mag(iter().phi()))().internalField()
|
fvc::surfaceSum(mag(iter().phi()))().primitiveField()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const
|
|||||||
dimensionedScalar("L", dimLength, 0),
|
dimensionedScalar("L", dimLength, 0),
|
||||||
zeroGradientFvPatchField<scalar>::typeName
|
zeroGradientFvPatchField<scalar>::typeName
|
||||||
);
|
);
|
||||||
L.internalFieldRef() = cbrt(mesh.V());
|
L.primitiveFieldRef() = cbrt(mesh.V());
|
||||||
L.correctBoundaryConditions();
|
L.correctBoundaryConditions();
|
||||||
|
|
||||||
volScalarField I
|
volScalarField I
|
||||||
|
|||||||
@ -292,9 +292,9 @@ correctThermo()
|
|||||||
Tf.correctBoundaryConditions();
|
Tf.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< "Tf." << pair.name()
|
Info<< "Tf." << pair.name()
|
||||||
<< ": min = " << min(Tf.internalField())
|
<< ": min = " << min(Tf.primitiveField())
|
||||||
<< ", mean = " << average(Tf.internalField())
|
<< ", mean = " << average(Tf.primitiveField())
|
||||||
<< ", max = " << max(Tf.internalField())
|
<< ", max = " << max(Tf.primitiveField())
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
// Update the interface compositions
|
// Update the interface compositions
|
||||||
|
|||||||
@ -337,9 +337,9 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info<< "iDmdt." << pair.name()
|
Info<< "iDmdt." << pair.name()
|
||||||
<< ": min = " << min(iDmdt.internalField())
|
<< ": min = " << min(iDmdt.primitiveField())
|
||||||
<< ", mean = " << average(iDmdt.internalField())
|
<< ", mean = " << average(iDmdt.primitiveField())
|
||||||
<< ", max = " << max(iDmdt.internalField())
|
<< ", max = " << max(iDmdt.primitiveField())
|
||||||
<< ", integral = " << fvc::domainIntegrate(iDmdt).value()
|
<< ", integral = " << fvc::domainIntegrate(iDmdt).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
@ -370,9 +370,9 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
Tf = (H1*T1 + H2*T2 + mDotL)/(H1 + H2);
|
Tf = (H1*T1 + H2*T2 + mDotL)/(H1 + H2);
|
||||||
|
|
||||||
Info<< "Tf." << pair.name()
|
Info<< "Tf." << pair.name()
|
||||||
<< ": min = " << min(Tf.internalField())
|
<< ": min = " << min(Tf.primitiveField())
|
||||||
<< ", mean = " << average(Tf.internalField())
|
<< ", mean = " << average(Tf.primitiveField())
|
||||||
<< ", max = " << max(Tf.internalField())
|
<< ", max = " << max(Tf.primitiveField())
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
// Accumulate dmdt contributions from boundaries
|
// Accumulate dmdt contributions from boundaries
|
||||||
@ -433,9 +433,9 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "wDmdt." << pair.name()
|
Info<< "wDmdt." << pair.name()
|
||||||
<< ": min = " << min(wDmdt.internalField())
|
<< ": min = " << min(wDmdt.primitiveField())
|
||||||
<< ", mean = " << average(wDmdt.internalField())
|
<< ", mean = " << average(wDmdt.primitiveField())
|
||||||
<< ", max = " << max(wDmdt.internalField())
|
<< ", max = " << max(wDmdt.primitiveField())
|
||||||
<< ", integral = " << fvc::domainIntegrate(wDmdt).value()
|
<< ", integral = " << fvc::domainIntegrate(wDmdt).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
@ -443,9 +443,9 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
dmdt = wDmdt + iDmdt;
|
dmdt = wDmdt + iDmdt;
|
||||||
|
|
||||||
Info<< "dmdt." << pair.name()
|
Info<< "dmdt." << pair.name()
|
||||||
<< ": min = " << min(dmdt.internalField())
|
<< ": min = " << min(dmdt.primitiveField())
|
||||||
<< ", mean = " << average(dmdt.internalField())
|
<< ", mean = " << average(dmdt.primitiveField())
|
||||||
<< ", max = " << max(dmdt.internalField())
|
<< ", max = " << max(dmdt.primitiveField())
|
||||||
<< ", integral = " << fvc::domainIntegrate(dmdt).value()
|
<< ", integral = " << fvc::domainIntegrate(dmdt).value()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (mesh.nInternalFaces())
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phi))().internalField()
|
fvc::surfaceSum(mag(phi))().primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(phases, phasei)
|
forAll(phases, phasei)
|
||||||
@ -44,7 +44,7 @@ if (mesh.nInternalFaces())
|
|||||||
sumPhi = max
|
sumPhi = max
|
||||||
(
|
(
|
||||||
sumPhi,
|
sumPhi,
|
||||||
fvc::surfaceSum(mag(phases[phasei].phi()))().internalField()
|
fvc::surfaceSum(mag(phases[phasei].phi()))().primitiveField()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,6 @@
|
|||||||
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
||||||
|
|
||||||
Info<< "Flow time scale min/max = "
|
Info<< "Flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
scalar UrCoNum = 0.5*gMax
|
scalar UrCoNum = 0.5*gMax
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phi1 - phi2))().internalField()/mesh.V().field()
|
fvc::surfaceSum(mag(phi1 - phi2))().primitiveField()/mesh.V().field()
|
||||||
)*runTime.deltaTValue();
|
)*runTime.deltaTValue();
|
||||||
|
|
||||||
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
||||||
|
|||||||
@ -32,6 +32,6 @@
|
|||||||
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
||||||
|
|
||||||
Info<< "Flow time scale min/max = "
|
Info<< "Flow time scale min/max = "
|
||||||
<< gMin(1/rDeltaT.internalField())
|
<< gMin(1/rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -139,7 +139,7 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat
|
|||||||
|
|
||||||
const phaseModel& liquid
|
const phaseModel& liquid
|
||||||
(
|
(
|
||||||
fluid.phase1().name() == dimensionedInternalField().group()
|
fluid.phase1().name() == internalField().group()
|
||||||
? fluid.phase1()
|
? fluid.phase1()
|
||||||
: fluid.phase2()
|
: fluid.phase2()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -172,7 +172,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
const phaseModel& liquid
|
const phaseModel& liquid
|
||||||
(
|
(
|
||||||
fluid.phase1().name() == dimensionedInternalField().group()
|
fluid.phase1().name() == internalField().group()
|
||||||
? fluid.phase1()
|
? fluid.phase1()
|
||||||
: fluid.phase2()
|
: fluid.phase2()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -160,7 +160,7 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::updateCoeffs()
|
|||||||
|
|
||||||
const phaseModel& phased
|
const phaseModel& phased
|
||||||
(
|
(
|
||||||
fluid.phase1().name() == dimensionedInternalField().group()
|
fluid.phase1().name() == internalField().group()
|
||||||
? fluid.phase1()
|
? fluid.phase1()
|
||||||
: fluid.phase2()
|
: fluid.phase2()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -181,7 +181,7 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
const phaseModel& phased
|
const phaseModel& phased
|
||||||
(
|
(
|
||||||
fluid.phase1().name() == dimensionedInternalField().group()
|
fluid.phase1().name() == internalField().group()
|
||||||
? fluid.phase1()
|
? fluid.phase1()
|
||||||
: fluid.phase2()
|
: fluid.phase2()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -42,7 +42,7 @@ if (mesh.nInternalFaces())
|
|||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
|
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
|
||||||
*fvc::surfaceSum(mag(phi))().internalField()
|
*fvc::surfaceSum(mag(phi))().primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
scalar UrCoNum = 0.5*gMax
|
scalar UrCoNum = 0.5*gMax
|
||||||
(
|
(
|
||||||
fvc::surfaceSum(mag(phi1 - phi2))().internalField()/mesh.V().field()
|
fvc::surfaceSum(mag(phi1 - phi2))().primitiveField()/mesh.V().field()
|
||||||
)*runTime.deltaTValue();
|
)*runTime.deltaTValue();
|
||||||
|
|
||||||
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
Info<< "Max Ur Courant Number = " << UrCoNum << endl;
|
||||||
|
|||||||
@ -104,7 +104,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const
|
|||||||
dimensionedScalar("L", dimLength, 0),
|
dimensionedScalar("L", dimLength, 0),
|
||||||
zeroGradientFvPatchField<scalar>::typeName
|
zeroGradientFvPatchField<scalar>::typeName
|
||||||
);
|
);
|
||||||
L.internalFieldRef() = cbrt(mesh.V());
|
L.primitiveFieldRef() = cbrt(mesh.V());
|
||||||
L.correctBoundaryConditions();
|
L.correctBoundaryConditions();
|
||||||
|
|
||||||
volScalarField I
|
volScalarField I
|
||||||
|
|||||||
@ -160,7 +160,7 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::updateCoeffs()
|
|||||||
|
|
||||||
const phaseModel& phased
|
const phaseModel& phased
|
||||||
(
|
(
|
||||||
fluid.phase1().name() == dimensionedInternalField().group()
|
fluid.phase1().name() == internalField().group()
|
||||||
? fluid.phase1()
|
? fluid.phase1()
|
||||||
: fluid.phase2()
|
: fluid.phase2()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -180,7 +180,7 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
const phaseModel& phased
|
const phaseModel& phased
|
||||||
(
|
(
|
||||||
fluid.phase1().name() == dimensionedInternalField().group()
|
fluid.phase1().name() == internalField().group()
|
||||||
? fluid.phase1()
|
? fluid.phase1()
|
||||||
: fluid.phase2()
|
: fluid.phase2()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -87,7 +87,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("aggomeration", dimless, 0.0)
|
dimensionedScalar("aggomeration", dimless, 0.0)
|
||||||
);
|
);
|
||||||
scalarField& fld = scalarAgglomeration.internalFieldRef();
|
scalarField& fld = scalarAgglomeration.primitiveFieldRef();
|
||||||
forAll(fld, celli)
|
forAll(fld, celli)
|
||||||
{
|
{
|
||||||
fld[celli] = cellToCoarse[celli];
|
fld[celli] = cellToCoarse[celli];
|
||||||
@ -166,7 +166,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("aggomeration", dimless, 0.0)
|
dimensionedScalar("aggomeration", dimless, 0.0)
|
||||||
);
|
);
|
||||||
scalarField& fld = scalarAgglomeration.internalFieldRef();
|
scalarField& fld = scalarAgglomeration.primitiveFieldRef();
|
||||||
forAll(fld, celli)
|
forAll(fld, celli)
|
||||||
{
|
{
|
||||||
fld[celli] = cellToCoarse[celli];
|
fld[celli] = cellToCoarse[celli];
|
||||||
|
|||||||
@ -300,8 +300,8 @@ int main(int argc, char *argv[])
|
|||||||
// Check face field mapping
|
// Check face field mapping
|
||||||
if (surfaceOne.size())
|
if (surfaceOne.size())
|
||||||
{
|
{
|
||||||
const scalar max = gMax(surfaceOne.internalField());
|
const scalar max = gMax(surfaceOne.primitiveField());
|
||||||
const scalar min = gMin(surfaceOne.internalField());
|
const scalar min = gMin(surfaceOne.primitiveField());
|
||||||
|
|
||||||
Info<< "Uniform surface field min = " << min
|
Info<< "Uniform surface field min = " << min
|
||||||
<< " max = " << max << endl;
|
<< " max = " << max << endl;
|
||||||
|
|||||||
@ -164,7 +164,7 @@ int main(int argc, char *argv[])
|
|||||||
dimensionedScalar("one", dimless, 1.0),
|
dimensionedScalar("one", dimless, 1.0),
|
||||||
calculatedPointPatchScalarField::typeName
|
calculatedPointPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
pointX.internalFieldRef() = mesh.points().component(0);
|
pointX.primitiveFieldRef() = mesh.points().component(0);
|
||||||
pointX.correctBoundaryConditions();
|
pointX.correctBoundaryConditions();
|
||||||
Info<< "Writing x-component field "
|
Info<< "Writing x-component field "
|
||||||
<< pointX.name() << " in " << runTime.timeName() << endl;
|
<< pointX.name() << " in " << runTime.timeName() << endl;
|
||||||
@ -381,8 +381,8 @@ int main(int argc, char *argv[])
|
|||||||
// Check face field mapping
|
// Check face field mapping
|
||||||
if (surfaceOne.size())
|
if (surfaceOne.size())
|
||||||
{
|
{
|
||||||
const scalar max = gMax(surfaceOne.internalField());
|
const scalar max = gMax(surfaceOne.primitiveField());
|
||||||
const scalar min = gMin(surfaceOne.internalField());
|
const scalar min = gMin(surfaceOne.primitiveField());
|
||||||
|
|
||||||
Info<< "Uniform surface field min = " << min
|
Info<< "Uniform surface field min = " << min
|
||||||
<< " max = " << max << endl;
|
<< " max = " << max << endl;
|
||||||
|
|||||||
@ -86,7 +86,7 @@ int main(int argc, char *argv[])
|
|||||||
patchFieldTypes
|
patchFieldTypes
|
||||||
);
|
);
|
||||||
|
|
||||||
cc.internalFieldRef() = mesh.C().internalField();
|
cc.primitiveFieldRef() = mesh.C().primitiveField();
|
||||||
cc.boundaryFieldRef().updateCoeffs();
|
cc.boundaryFieldRef().updateCoeffs();
|
||||||
|
|
||||||
forAll(cc.boundaryField(), patchi)
|
forAll(cc.boundaryField(), patchi)
|
||||||
|
|||||||
@ -904,8 +904,8 @@ Foam::backgroundMeshDecomposition::distribute
|
|||||||
{
|
{
|
||||||
Info<< " cellWeightLimit " << cellWeightLimit << endl;
|
Info<< " cellWeightLimit " << cellWeightLimit << endl;
|
||||||
|
|
||||||
Pout<< " sum(cellWeights) " << sum(cellWeights.internalField())
|
Pout<< " sum(cellWeights) " << sum(cellWeights.primitiveField())
|
||||||
<< " max(cellWeights) " << max(cellWeights.internalField())
|
<< " max(cellWeights) " << max(cellWeights.primitiveField())
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1137,7 +1137,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
|||||||
zeroGradientFvPatchScalarField::typeName
|
zeroGradientFvPatchScalarField::typeName
|
||||||
);
|
);
|
||||||
|
|
||||||
scalarField& cellSize = targetCellSize.internalFieldRef();
|
scalarField& cellSize = targetCellSize.primitiveFieldRef();
|
||||||
|
|
||||||
const vectorField& C = mesh.cellCentres();
|
const vectorField& C = mesh.cellCentres();
|
||||||
|
|
||||||
@ -1163,7 +1163,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
|||||||
// zeroGradientFvPatchScalarField::typeName
|
// zeroGradientFvPatchScalarField::typeName
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// targetCellVolume.internalFieldRef() = pow3(cellSize);
|
// targetCellVolume.primitiveFieldRef() = pow3(cellSize);
|
||||||
|
|
||||||
// Info<< nl << "Create actualCellVolume volScalarField" << endl;
|
// Info<< nl << "Create actualCellVolume volScalarField" << endl;
|
||||||
|
|
||||||
@ -1182,7 +1182,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
|||||||
// zeroGradientFvPatchScalarField::typeName
|
// zeroGradientFvPatchScalarField::typeName
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// actualCellVolume.internalFieldRef() = mesh.cellVolumes();
|
// actualCellVolume.primitiveFieldRef() = mesh.cellVolumes();
|
||||||
|
|
||||||
// Info<< nl << "Create equivalentCellSize volScalarField" << endl;
|
// Info<< nl << "Create equivalentCellSize volScalarField" << endl;
|
||||||
|
|
||||||
@ -1201,9 +1201,9 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
|||||||
// zeroGradientFvPatchScalarField::typeName
|
// zeroGradientFvPatchScalarField::typeName
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// equivalentCellSize.internalFieldRef() = pow
|
// equivalentCellSize.primitiveFieldRef() = pow
|
||||||
// (
|
// (
|
||||||
// actualCellVolume.internalField(),
|
// actualCellVolume.primitiveField(),
|
||||||
// 1.0/3.0
|
// 1.0/3.0
|
||||||
// );
|
// );
|
||||||
|
|
||||||
@ -1247,7 +1247,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
|
|||||||
// pointPatchVectorField::calculatedType()
|
// pointPatchVectorField::calculatedType()
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// scalarField& cellSize = ptTargetCellSize.internalFieldRef();
|
// scalarField& cellSize = ptTargetCellSize.primitiveFieldRef();
|
||||||
|
|
||||||
// const vectorField& P = tetMesh.points();
|
// const vectorField& P = tetMesh.points();
|
||||||
|
|
||||||
@ -1283,7 +1283,7 @@ void Foam::conformalVoronoiMesh::writeCellAlignments
|
|||||||
// zeroGradientFvPatchTensorField::typeName
|
// zeroGradientFvPatchTensorField::typeName
|
||||||
// );
|
// );
|
||||||
//
|
//
|
||||||
// tensorField& cellAlignment = cellAlignments.internalFieldRef();
|
// tensorField& cellAlignment = cellAlignments.primitiveFieldRef();
|
||||||
//
|
//
|
||||||
// const vectorField& C = mesh.cellCentres();
|
// const vectorField& C = mesh.cellCentres();
|
||||||
//
|
//
|
||||||
|
|||||||
@ -117,7 +117,7 @@ bool Foam::conformalVoronoiMesh::distributeBackground(const Triangulation& mesh)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarField& cwi = cellWeights.internalFieldRef();
|
scalarField& cwi = cellWeights.primitiveFieldRef();
|
||||||
|
|
||||||
forAll(cellVertices, cI)
|
forAll(cellVertices, cI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -636,7 +636,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Internal field
|
// Internal field
|
||||||
cellDistance.internalFieldRef() = signedDistance
|
cellDistance.primitiveFieldRef() = signedDistance
|
||||||
(
|
(
|
||||||
distSqr,
|
distSqr,
|
||||||
fvm.C(),
|
fvm.C(),
|
||||||
@ -701,7 +701,7 @@ int main(int argc, char *argv[])
|
|||||||
-sqr(GREAT) // null value
|
-sqr(GREAT) // null value
|
||||||
);
|
);
|
||||||
|
|
||||||
pointDistance.internalFieldRef() = signedDistance
|
pointDistance.primitiveFieldRef() = signedDistance
|
||||||
(
|
(
|
||||||
pointDistSqr,
|
pointDistSqr,
|
||||||
fvm.points(),
|
fvm.points(),
|
||||||
|
|||||||
@ -82,7 +82,7 @@ int main(int argc, char *argv[])
|
|||||||
pointField newPoints
|
pointField newPoints
|
||||||
(
|
(
|
||||||
zeroPoints
|
zeroPoints
|
||||||
+ scaleFactor*pInterp.interpolate(U)().internalField()
|
+ scaleFactor*pInterp.interpolate(U)().primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
mesh.polyMesh::movePoints(newPoints);
|
mesh.polyMesh::movePoints(newPoints);
|
||||||
|
|||||||
@ -61,7 +61,7 @@ void Foam::domainDecomposition::distributeCells()
|
|||||||
),
|
),
|
||||||
*this
|
*this
|
||||||
);
|
);
|
||||||
cellWeights = weights.internalField();
|
cellWeights = weights.primitiveField();
|
||||||
}
|
}
|
||||||
|
|
||||||
cellToProc_ = decomposePtr().decompose(*this, cellWeights);
|
cellToProc_ = decomposePtr().decompose(*this, cellWeights);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ Foam::pointFieldDecomposer::decomposeField
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Create and map the internal field values
|
// Create and map the internal field values
|
||||||
Field<Type> internalField(field.internalField(), pointAddressing_);
|
Field<Type> internalField(field.primitiveField(), pointAddressing_);
|
||||||
|
|
||||||
// Create a list of pointers for the patchFields
|
// Create a list of pointers for the patchFields
|
||||||
PtrList<pointPatchField<Type>> patchFields(boundaryAddressing_.size());
|
PtrList<pointPatchField<Type>> patchFields(boundaryAddressing_.size());
|
||||||
|
|||||||
@ -603,7 +603,7 @@ void ensightPointField
|
|||||||
writeField
|
writeField
|
||||||
(
|
(
|
||||||
"coordinates",
|
"coordinates",
|
||||||
Field<Type>(pf.internalField(), eMesh.uniquePointMap()),
|
Field<Type>(pf.primitiveField(), eMesh.uniquePointMap()),
|
||||||
ensightFile
|
ensightFile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -646,7 +646,7 @@ void ensightPointField
|
|||||||
writeField
|
writeField
|
||||||
(
|
(
|
||||||
"coordinates",
|
"coordinates",
|
||||||
Field<Type>(pf.internalField(), uniqueMeshPointLabels),
|
Field<Type>(pf.primitiveField(), uniqueMeshPointLabels),
|
||||||
ensightFile
|
ensightFile
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -692,7 +692,7 @@ void ensightPointField
|
|||||||
"coordinates",
|
"coordinates",
|
||||||
Field<Type>
|
Field<Type>
|
||||||
(
|
(
|
||||||
pf.internalField(),
|
pf.primitiveField(),
|
||||||
uniqueMeshPointLabels
|
uniqueMeshPointLabels
|
||||||
),
|
),
|
||||||
ensightFile
|
ensightFile
|
||||||
|
|||||||
@ -91,7 +91,7 @@ void ReadAndMapFields
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Field<Type>& fld = tetFields[i].internalFieldRef();
|
Field<Type>& fld = tetFields[i].primitiveFieldRef();
|
||||||
|
|
||||||
// Map from read field. Set unmapped entries to nullValue.
|
// Map from read field. Set unmapped entries to nullValue.
|
||||||
fld.setSize(map.size(), nullValue);
|
fld.setSize(map.size(), nullValue);
|
||||||
|
|||||||
@ -79,7 +79,7 @@ void Foam::writeFuns::write
|
|||||||
|
|
||||||
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nValues);
|
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*nValues);
|
||||||
|
|
||||||
insert(vvf.internalField(), fField);
|
insert(vvf.primitiveField(), fField);
|
||||||
|
|
||||||
forAll(superCells, superCelli)
|
forAll(superCells, superCelli)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -152,7 +152,7 @@ void Foam::vtkPV3Foam::convertPointFields
|
|||||||
// Extract the field on the zone
|
// Extract the field on the zone
|
||||||
Field<Type> fld
|
Field<Type> fld
|
||||||
(
|
(
|
||||||
ptf.internalField(),
|
ptf.primitiveField(),
|
||||||
mesh.faceZones()[zoneId]().meshPoints()
|
mesh.faceZones()[zoneId]().meshPoints()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -152,7 +152,7 @@ void Foam::vtkPVFoam::convertPointFields
|
|||||||
// Extract the field on the zone
|
// Extract the field on the zone
|
||||||
Field<Type> fld
|
Field<Type> fld
|
||||||
(
|
(
|
||||||
ptf.internalField(),
|
ptf.primitiveField(),
|
||||||
mesh.faceZones()[zoneId]().meshPoints()
|
mesh.faceZones()[zoneId]().meshPoints()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
turbGen Ugen(K, Ea, k0);
|
turbGen Ugen(K, Ea, k0);
|
||||||
|
|
||||||
U.internalFieldRef() = Ugen.U();
|
U.primitiveFieldRef() = Ugen.U();
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< "k("
|
Info<< "k("
|
||||||
|
|||||||
@ -88,7 +88,7 @@ bool setCellFieldType
|
|||||||
|
|
||||||
if (selectedCells.size() == field.size())
|
if (selectedCells.size() == field.size())
|
||||||
{
|
{
|
||||||
field.internalFieldRef() = value;
|
field.primitiveFieldRef() = value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -725,7 +725,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::ref()
|
|||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
typename
|
typename
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Internal::FieldType&
|
Foam::GeometricField<Type, PatchField, GeoMesh>::Internal::FieldType&
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::internalFieldRef()
|
Foam::GeometricField<Type, PatchField, GeoMesh>::primitiveFieldRef()
|
||||||
{
|
{
|
||||||
this->setUpToDate();
|
this->setUpToDate();
|
||||||
storeOldTimes();
|
storeOldTimes();
|
||||||
@ -1016,7 +1016,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::T() const
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Foam::T(result.ref().internalFieldRef(), internalField());
|
Foam::T(result.ref().primitiveFieldRef(), primitiveField());
|
||||||
Foam::T(result.ref().boundaryFieldRef(), boundaryField());
|
Foam::T(result.ref().boundaryFieldRef(), boundaryField());
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -1053,7 +1053,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::component
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Foam::component(Component.ref().internalFieldRef(), internalField(), d);
|
Foam::component(Component.ref().primitiveFieldRef(), primitiveField(), d);
|
||||||
Foam::component(Component.ref().boundaryFieldRef(), boundaryField(), d);
|
Foam::component(Component.ref().boundaryFieldRef(), boundaryField(), d);
|
||||||
|
|
||||||
return Component;
|
return Component;
|
||||||
@ -1072,7 +1072,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::replace
|
|||||||
>& gcf
|
>& gcf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
internalFieldRef().replace(d, gcf.internalField());
|
primitiveFieldRef().replace(d, gcf.primitiveField());
|
||||||
boundaryFieldRef().replace(d, gcf.boundaryField());
|
boundaryFieldRef().replace(d, gcf.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1084,7 +1084,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::replace
|
|||||||
const dimensioned<cmptType>& ds
|
const dimensioned<cmptType>& ds
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
internalFieldRef().replace(d, ds.value());
|
primitiveFieldRef().replace(d, ds.value());
|
||||||
boundaryFieldRef().replace(d, ds.value());
|
boundaryFieldRef().replace(d, ds.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1095,7 +1095,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::max
|
|||||||
const dimensioned<Type>& dt
|
const dimensioned<Type>& dt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Foam::max(internalFieldRef(), internalField(), dt.value());
|
Foam::max(primitiveFieldRef(), primitiveField(), dt.value());
|
||||||
Foam::max(boundaryFieldRef(), boundaryField(), dt.value());
|
Foam::max(boundaryFieldRef(), boundaryField(), dt.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1106,7 +1106,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::min
|
|||||||
const dimensioned<Type>& dt
|
const dimensioned<Type>& dt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Foam::min(internalFieldRef(), internalField(), dt.value());
|
Foam::min(primitiveFieldRef(), primitiveField(), dt.value());
|
||||||
Foam::min(boundaryFieldRef(), boundaryField(), dt.value());
|
Foam::min(boundaryFieldRef(), boundaryField(), dt.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1114,7 +1114,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::min
|
|||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
void Foam::GeometricField<Type, PatchField, GeoMesh>::negate()
|
void Foam::GeometricField<Type, PatchField, GeoMesh>::negate()
|
||||||
{
|
{
|
||||||
internalFieldRef().negate();
|
primitiveFieldRef().negate();
|
||||||
boundaryFieldRef().negate();
|
boundaryFieldRef().negate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1165,9 +1165,9 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
|
|||||||
this->dimensions() = gf.dimensions();
|
this->dimensions() = gf.dimensions();
|
||||||
|
|
||||||
// Transfer the storage from the tmp
|
// Transfer the storage from the tmp
|
||||||
internalFieldRef().transfer
|
primitiveFieldRef().transfer
|
||||||
(
|
(
|
||||||
const_cast<Field<Type>&>(gf.internalField())
|
const_cast<Field<Type>&>(gf.primitiveField())
|
||||||
);
|
);
|
||||||
|
|
||||||
boundaryFieldRef() = gf.boundaryField();
|
boundaryFieldRef() = gf.boundaryField();
|
||||||
|
|||||||
@ -450,7 +450,7 @@ public:
|
|||||||
Internal& ref();
|
Internal& ref();
|
||||||
|
|
||||||
//- Return a const-reference to the dimensioned internal field
|
//- Return a const-reference to the dimensioned internal field
|
||||||
inline const Internal& dimensionedInternalField() const;
|
inline const Internal& internalField() const;
|
||||||
|
|
||||||
//- Return a const-reference to the dimensioned internal field
|
//- Return a const-reference to the dimensioned internal field
|
||||||
// of a "vol" field. Useful in the formulation of source-terms
|
// of a "vol" field. Useful in the formulation of source-terms
|
||||||
@ -460,10 +460,10 @@ public:
|
|||||||
//- Return a reference to the internal field
|
//- Return a reference to the internal field
|
||||||
// Note: this increments the event counter and checks the
|
// Note: this increments the event counter and checks the
|
||||||
// old-time fields; avoid in loops.
|
// old-time fields; avoid in loops.
|
||||||
typename Internal::FieldType& internalFieldRef();
|
typename Internal::FieldType& primitiveFieldRef();
|
||||||
|
|
||||||
//- Return a const-reference to the internal field
|
//- Return a const-reference to the internal field
|
||||||
inline const typename Internal::FieldType& internalField() const;
|
inline const typename Internal::FieldType& primitiveField() const;
|
||||||
|
|
||||||
//- Return a reference to the boundary field
|
//- Return a reference to the boundary field
|
||||||
// Note: this increments the event counter and checks the
|
// Note: this increments the event counter and checks the
|
||||||
|
|||||||
@ -49,7 +49,7 @@ void component
|
|||||||
const direction d
|
const direction d
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
component(gcf.internalFieldRef(), gf.internalField(), d);
|
component(gcf.primitiveFieldRef(), gf.primitiveField(), d);
|
||||||
component(gcf.boundaryFieldRef(), gf.boundaryField(), d);
|
component(gcf.boundaryFieldRef(), gf.boundaryField(), d);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ void T
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& gf1
|
const GeometricField<Type, PatchField, GeoMesh>& gf1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
T(gf.internalFieldRef(), gf1.internalField());
|
T(gf.primitiveFieldRef(), gf1.primitiveField());
|
||||||
T(gf.boundaryFieldRef(), gf1.boundaryField());
|
T(gf.boundaryFieldRef(), gf1.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ void pow
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& gf1
|
const GeometricField<Type, PatchField, GeoMesh>& gf1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pow(gf.internalFieldRef(), gf1.internalField(), r);
|
pow(gf.primitiveFieldRef(), gf1.primitiveField(), r);
|
||||||
pow(gf.boundaryFieldRef(), gf1.boundaryField(), r);
|
pow(gf.boundaryFieldRef(), gf1.boundaryField(), r);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ void sqr
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& gf1
|
const GeometricField<Type, PatchField, GeoMesh>& gf1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
sqr(gf.internalFieldRef(), gf1.internalField());
|
sqr(gf.primitiveFieldRef(), gf1.primitiveField());
|
||||||
sqr(gf.boundaryFieldRef(), gf1.boundaryField());
|
sqr(gf.boundaryFieldRef(), gf1.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ void magSqr
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& gf
|
const GeometricField<Type, PatchField, GeoMesh>& gf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
magSqr(gsf.internalFieldRef(), gf.internalField());
|
magSqr(gsf.primitiveFieldRef(), gf.primitiveField());
|
||||||
magSqr(gsf.boundaryFieldRef(), gf.boundaryField());
|
magSqr(gsf.boundaryFieldRef(), gf.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ void mag
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& gf
|
const GeometricField<Type, PatchField, GeoMesh>& gf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mag(gsf.internalFieldRef(), gf.internalField());
|
mag(gsf.primitiveFieldRef(), gf.primitiveField());
|
||||||
mag(gsf.boundaryFieldRef(), gf.boundaryField());
|
mag(gsf.boundaryFieldRef(), gf.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +410,7 @@ void cmptAv
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& gf
|
const GeometricField<Type, PatchField, GeoMesh>& gf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
cmptAv(gcf.internalFieldRef(), gf.internalField());
|
cmptAv(gcf.primitiveFieldRef(), gf.primitiveField());
|
||||||
cmptAv(gcf.boundaryFieldRef(), gf.boundaryField());
|
cmptAv(gcf.boundaryFieldRef(), gf.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ dimensioned<returnType> func \
|
|||||||
( \
|
( \
|
||||||
#func "(" + gf.name() + ')', \
|
#func "(" + gf.name() + ')', \
|
||||||
gf.dimensions(), \
|
gf.dimensions(), \
|
||||||
Foam::func(gFunc(gf.internalField()), gFunc(gf.boundaryField())) \
|
Foam::func(gFunc(gf.primitiveField()), gFunc(gf.boundaryField())) \
|
||||||
); \
|
); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -538,7 +538,7 @@ dimensioned<returnType> func \
|
|||||||
( \
|
( \
|
||||||
#func "(" + gf.name() + ')', \
|
#func "(" + gf.name() + ')', \
|
||||||
gf.dimensions(), \
|
gf.dimensions(), \
|
||||||
gFunc(gf.internalField()) \
|
gFunc(gf.primitiveField()) \
|
||||||
); \
|
); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -601,9 +601,9 @@ void opFunc \
|
|||||||
{ \
|
{ \
|
||||||
Foam::opFunc \
|
Foam::opFunc \
|
||||||
( \
|
( \
|
||||||
gf.internalFieldRef(), \
|
gf.primitiveFieldRef(), \
|
||||||
gf1.internalField(), \
|
gf1.primitiveField(), \
|
||||||
gf2.internalField() \
|
gf2.primitiveField() \
|
||||||
); \
|
); \
|
||||||
Foam::opFunc \
|
Foam::opFunc \
|
||||||
( \
|
( \
|
||||||
@ -755,7 +755,7 @@ void opFunc \
|
|||||||
const dimensioned<Form>& dvs \
|
const dimensioned<Form>& dvs \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::opFunc(gf.internalFieldRef(), gf1.internalField(), dvs.value()); \
|
Foam::opFunc(gf.primitiveFieldRef(), gf1.primitiveField(), dvs.value()); \
|
||||||
Foam::opFunc(gf.boundaryFieldRef(), gf1.boundaryField(), dvs.value()); \
|
Foam::opFunc(gf.boundaryFieldRef(), gf1.boundaryField(), dvs.value()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -868,7 +868,7 @@ void opFunc \
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& gf1 \
|
const GeometricField<Type, PatchField, GeoMesh>& gf1 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::opFunc(gf.internalFieldRef(), dvs.value(), gf1.internalField()); \
|
Foam::opFunc(gf.primitiveFieldRef(), dvs.value(), gf1.primitiveField()); \
|
||||||
Foam::opFunc(gf.boundaryFieldRef(), dvs.value(), gf1.boundaryField()); \
|
Foam::opFunc(gf.boundaryFieldRef(), dvs.value(), gf1.boundaryField()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
@ -41,7 +41,7 @@ void Func \
|
|||||||
const GeometricField<Type1, PatchField, GeoMesh>& gf1 \
|
const GeometricField<Type1, PatchField, GeoMesh>& gf1 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::Func(res.internalFieldRef(), gf1.internalField()); \
|
Foam::Func(res.primitiveFieldRef(), gf1.primitiveField()); \
|
||||||
Foam::Func(res.boundaryFieldRef(), gf1.boundaryField()); \
|
Foam::Func(res.boundaryFieldRef(), gf1.boundaryField()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -110,7 +110,7 @@ void OpFunc \
|
|||||||
const GeometricField<Type1, PatchField, GeoMesh>& gf1 \
|
const GeometricField<Type1, PatchField, GeoMesh>& gf1 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::OpFunc(res.internalFieldRef(), gf1.internalField()); \
|
Foam::OpFunc(res.primitiveFieldRef(), gf1.primitiveField()); \
|
||||||
Foam::OpFunc(res.boundaryFieldRef(), gf1.boundaryField()); \
|
Foam::OpFunc(res.boundaryFieldRef(), gf1.boundaryField()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -182,9 +182,9 @@ void Func \
|
|||||||
{ \
|
{ \
|
||||||
Foam::Func \
|
Foam::Func \
|
||||||
( \
|
( \
|
||||||
res.internalFieldRef(), \
|
res.primitiveFieldRef(), \
|
||||||
gf1.internalField(), \
|
gf1.primitiveField(), \
|
||||||
gf2.internalField() \
|
gf2.primitiveField() \
|
||||||
); \
|
); \
|
||||||
Foam::Func \
|
Foam::Func \
|
||||||
( \
|
( \
|
||||||
@ -318,7 +318,7 @@ void Func \
|
|||||||
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
|
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::Func(res.internalFieldRef(), dt1.value(), gf2.internalField()); \
|
Foam::Func(res.primitiveFieldRef(), dt1.value(), gf2.primitiveField()); \
|
||||||
Foam::Func(res.boundaryFieldRef(), dt1.value(), gf2.boundaryField()); \
|
Foam::Func(res.boundaryFieldRef(), dt1.value(), gf2.boundaryField()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -409,7 +409,7 @@ void Func \
|
|||||||
const dimensioned<Type2>& dt2 \
|
const dimensioned<Type2>& dt2 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::Func(res.internalFieldRef(), gf1.internalField(), dt2.value()); \
|
Foam::Func(res.primitiveFieldRef(), gf1.primitiveField(), dt2.value()); \
|
||||||
Foam::Func(res.boundaryFieldRef(), gf1.boundaryField(), dt2.value()); \
|
Foam::Func(res.boundaryFieldRef(), gf1.boundaryField(), dt2.value()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -508,7 +508,7 @@ void OpFunc \
|
|||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::OpFunc \
|
Foam::OpFunc \
|
||||||
(res.internalFieldRef(), gf1.internalField(), gf2.internalField()); \
|
(res.primitiveFieldRef(), gf1.primitiveField(), gf2.primitiveField()); \
|
||||||
Foam::OpFunc \
|
Foam::OpFunc \
|
||||||
(res.boundaryFieldRef(), gf1.boundaryField(), gf2.boundaryField()); \
|
(res.boundaryFieldRef(), gf1.boundaryField(), gf2.boundaryField()); \
|
||||||
} \
|
} \
|
||||||
@ -637,7 +637,7 @@ void OpFunc \
|
|||||||
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
|
const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::OpFunc(res.internalFieldRef(), dt1.value(), gf2.internalField()); \
|
Foam::OpFunc(res.primitiveFieldRef(), dt1.value(), gf2.primitiveField()); \
|
||||||
Foam::OpFunc(res.boundaryFieldRef(), dt1.value(), gf2.boundaryField()); \
|
Foam::OpFunc(res.boundaryFieldRef(), dt1.value(), gf2.boundaryField()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@ -728,7 +728,7 @@ void OpFunc \
|
|||||||
const dimensioned<Type2>& dt2 \
|
const dimensioned<Type2>& dt2 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
Foam::OpFunc(res.internalFieldRef(), gf1.internalField(), dt2.value()); \
|
Foam::OpFunc(res.primitiveFieldRef(), gf1.primitiveField(), dt2.value()); \
|
||||||
Foam::OpFunc(res.boundaryFieldRef(), gf1.boundaryField(), dt2.value()); \
|
Foam::OpFunc(res.boundaryFieldRef(), gf1.boundaryField(), dt2.value()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
@ -38,7 +38,7 @@ inline
|
|||||||
const typename
|
const typename
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Internal&
|
Foam::GeometricField<Type, PatchField, GeoMesh>::Internal&
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::
|
Foam::GeometricField<Type, PatchField, GeoMesh>::
|
||||||
dimensionedInternalField() const
|
internalField() const
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
|
|||||||
inline
|
inline
|
||||||
const typename
|
const typename
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::Internal::FieldType&
|
Foam::GeometricField<Type, PatchField, GeoMesh>::Internal::FieldType&
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::internalField() const
|
Foam::GeometricField<Type, PatchField, GeoMesh>::primitiveField() const
|
||||||
{
|
{
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,7 +126,7 @@ void MapGeometricFields
|
|||||||
// Map the internal field
|
// Map the internal field
|
||||||
MapInternalField<Type, MeshMapper, GeoMesh>()
|
MapInternalField<Type, MeshMapper, GeoMesh>()
|
||||||
(
|
(
|
||||||
field.internalFieldRef(),
|
field.primitiveFieldRef(),
|
||||||
mapper
|
mapper
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ void stabilise
|
|||||||
const dimensioned<scalar>& ds
|
const dimensioned<scalar>& ds
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
stabilise(result.internalFieldRef(), gsf.internalField(), ds.value());
|
stabilise(result.primitiveFieldRef(), gsf.primitiveField(), ds.value());
|
||||||
stabilise(result.boundaryFieldRef(), gsf.boundaryField(), ds.value());
|
stabilise(result.boundaryFieldRef(), gsf.boundaryField(), ds.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ void pow
|
|||||||
const GeometricField<scalar, PatchField, GeoMesh>& gsf2
|
const GeometricField<scalar, PatchField, GeoMesh>& gsf2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pow(Pow.internalFieldRef(), gsf1.internalField(), gsf2.internalField());
|
pow(Pow.primitiveFieldRef(), gsf1.primitiveField(), gsf2.primitiveField());
|
||||||
pow(Pow.boundaryFieldRef(), gsf1.boundaryField(), gsf2.boundaryField());
|
pow(Pow.boundaryFieldRef(), gsf1.boundaryField(), gsf2.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ void pow
|
|||||||
const dimensioned<scalar>& ds
|
const dimensioned<scalar>& ds
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pow(tPow.internalFieldRef(), gsf.internalField(), ds.value());
|
pow(tPow.primitiveFieldRef(), gsf.primitiveField(), ds.value());
|
||||||
pow(tPow.boundaryFieldRef(), gsf.boundaryField(), ds.value());
|
pow(tPow.boundaryFieldRef(), gsf.boundaryField(), ds.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ void pow
|
|||||||
const GeometricField<scalar, PatchField, GeoMesh>& gsf
|
const GeometricField<scalar, PatchField, GeoMesh>& gsf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pow(tPow.internalFieldRef(), ds.value(), gsf.internalField());
|
pow(tPow.primitiveFieldRef(), ds.value(), gsf.primitiveField());
|
||||||
pow(tPow.boundaryFieldRef(), ds.value(), gsf.boundaryField());
|
pow(tPow.boundaryFieldRef(), ds.value(), gsf.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,8 +450,18 @@ void atan2
|
|||||||
const GeometricField<scalar, PatchField, GeoMesh>& gsf2
|
const GeometricField<scalar, PatchField, GeoMesh>& gsf2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
atan2(Atan2.internalFieldRef(), gsf1.internalField(), gsf2.internalField());
|
atan2
|
||||||
atan2(Atan2.boundaryFieldRef(), gsf1.boundaryField(), gsf2.boundaryField());
|
(
|
||||||
|
Atan2.primitiveFieldRef(),
|
||||||
|
gsf1.primitiveField(),
|
||||||
|
gsf2.primitiveField()
|
||||||
|
);
|
||||||
|
atan2
|
||||||
|
(
|
||||||
|
Atan2.boundaryFieldRef(),
|
||||||
|
gsf1.boundaryField(),
|
||||||
|
gsf2.boundaryField()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -577,7 +587,7 @@ void atan2
|
|||||||
const dimensioned<scalar>& ds
|
const dimensioned<scalar>& ds
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
atan2(tAtan2.internalFieldRef(), gsf.internalField(), ds.value());
|
atan2(tAtan2.primitiveFieldRef(), gsf.primitiveField(), ds.value());
|
||||||
atan2(tAtan2.boundaryFieldRef(), gsf.boundaryField(), ds.value());
|
atan2(tAtan2.boundaryFieldRef(), gsf.boundaryField(), ds.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -666,7 +676,7 @@ void atan2
|
|||||||
const GeometricField<scalar, PatchField, GeoMesh>& gsf
|
const GeometricField<scalar, PatchField, GeoMesh>& gsf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
atan2(tAtan2.internalFieldRef(), ds.value(), gsf.internalField());
|
atan2(tAtan2.primitiveFieldRef(), ds.value(), gsf.primitiveField());
|
||||||
atan2(tAtan2.boundaryFieldRef(), ds.value(), gsf.boundaryField());
|
atan2(tAtan2.boundaryFieldRef(), ds.value(), gsf.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -799,7 +809,7 @@ void func \
|
|||||||
const GeometricField<scalar, PatchField, GeoMesh>& gsf1 \
|
const GeometricField<scalar, PatchField, GeoMesh>& gsf1 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
func(gsf.internalFieldRef(), n, gsf1.internalField()); \
|
func(gsf.primitiveFieldRef(), n, gsf1.primitiveField()); \
|
||||||
func(gsf.boundaryFieldRef(), n, gsf1.boundaryField()); \
|
func(gsf.boundaryFieldRef(), n, gsf1.boundaryField()); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
@ -305,7 +305,7 @@ SlicedGeometricField
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Set the internalField to the supplied internal field
|
// Set the internalField to the supplied internal field
|
||||||
UList<Type>::shallowCopy(gf.internalField());
|
UList<Type>::shallowCopy(gf.primitiveField());
|
||||||
|
|
||||||
correctBoundaryConditions();
|
correctBoundaryConditions();
|
||||||
}
|
}
|
||||||
@ -334,7 +334,7 @@ SlicedGeometricField
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Set the internalField to the supplied internal field
|
// Set the internalField to the supplied internal field
|
||||||
UList<Type>::shallowCopy(gf.internalField());
|
UList<Type>::shallowCopy(gf.primitiveField());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,7 @@ public:
|
|||||||
|
|
||||||
inline Internal v() const;
|
inline Internal v() const;
|
||||||
|
|
||||||
inline typename Internal::FieldType internalField() const;
|
inline typename Internal::FieldType primitiveField() const;
|
||||||
|
|
||||||
inline Boundary boundaryField() const;
|
inline Boundary boundaryField() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -66,7 +66,7 @@ Foam::geometricOneField::v() const
|
|||||||
|
|
||||||
|
|
||||||
inline typename Foam::geometricOneField::Internal::FieldType
|
inline typename Foam::geometricOneField::Internal::FieldType
|
||||||
Foam::geometricOneField::internalField() const
|
Foam::geometricOneField::primitiveField() const
|
||||||
{
|
{
|
||||||
return typename Internal::FieldType();
|
return typename Internal::FieldType();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,8 +45,18 @@ void transform
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& tf
|
const GeometricField<Type, PatchField, GeoMesh>& tf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
transform(rtf.internalFieldRef(), trf.internalField(), tf.internalField());
|
transform
|
||||||
transform(rtf.boundaryFieldRef(), trf.boundaryField(), tf.boundaryField());
|
(
|
||||||
|
rtf.primitiveFieldRef(),
|
||||||
|
trf.primitiveField(),
|
||||||
|
tf.primitiveField()
|
||||||
|
);
|
||||||
|
transform
|
||||||
|
(
|
||||||
|
rtf.boundaryFieldRef(),
|
||||||
|
trf.boundaryField(),
|
||||||
|
tf.boundaryField()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -131,7 +141,7 @@ void transform
|
|||||||
const GeometricField<Type, PatchField, GeoMesh>& tf
|
const GeometricField<Type, PatchField, GeoMesh>& tf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
transform(rtf.internalFieldRef(), t.value(), tf.internalField());
|
transform(rtf.primitiveFieldRef(), t.value(), tf.primitiveField());
|
||||||
transform(rtf.boundaryFieldRef(), t.value(), tf.boundaryField());
|
transform(rtf.boundaryFieldRef(), t.value(), tf.boundaryField());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -96,7 +96,7 @@ void Foam::basicSymmetryPointPatchField<Type>::evaluate
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Get internal field to insert values into
|
// Get internal field to insert values into
|
||||||
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||||
|
|
||||||
this->setInInternalField(iF, tvalues());
|
this->setInInternalField(iF, tvalues());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,7 +155,7 @@ void Foam::valuePointPatchField<Type>::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get internal field to insert values into
|
// Get internal field to insert values into
|
||||||
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||||
|
|
||||||
this->setInInternalField(iF, *this);
|
this->setInInternalField(iF, *this);
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ template<class Type>
|
|||||||
void Foam::valuePointPatchField<Type>::evaluate(const Pstream::commsTypes)
|
void Foam::valuePointPatchField<Type>::evaluate(const Pstream::commsTypes)
|
||||||
{
|
{
|
||||||
// Get internal field to insert values into
|
// Get internal field to insert values into
|
||||||
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||||
|
|
||||||
this->setInInternalField(iF, *this);
|
this->setInInternalField(iF, *this);
|
||||||
|
|
||||||
|
|||||||
@ -123,7 +123,7 @@ void Foam::cyclicPointPatchField<Type>::swapAddSeparated
|
|||||||
const GeometricField<Type, pointPatchField, pointMesh>& fld =
|
const GeometricField<Type, pointPatchField, pointMesh>& fld =
|
||||||
refCast<const GeometricField<Type, pointPatchField, pointMesh>>
|
refCast<const GeometricField<Type, pointPatchField, pointMesh>>
|
||||||
(
|
(
|
||||||
this->dimensionedInternalField()
|
this->internalField()
|
||||||
);
|
);
|
||||||
|
|
||||||
const cyclicPointPatchField<Type>& nbr =
|
const cyclicPointPatchField<Type>& nbr =
|
||||||
|
|||||||
@ -93,7 +93,7 @@ void Foam::cyclicSlipPointPatchField<Type>::evaluate(const Pstream::commsTypes)
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Get internal field to insert values into
|
// Get internal field to insert values into
|
||||||
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||||
|
|
||||||
this->setInInternalField(iF, tvalues());
|
this->setInInternalField(iF, tvalues());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,7 +100,7 @@ void Foam::nonuniformTransformCyclicPointPatchField<Type>::evaluate
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Get internal field to insert values into
|
// Get internal field to insert values into
|
||||||
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||||
|
|
||||||
this->setInInternalField(iF, tvalues());
|
this->setInInternalField(iF, tvalues());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,7 +117,7 @@ void Foam::symmetryPlanePointPatchField<Type>::evaluate
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Get internal field to insert values into
|
// Get internal field to insert values into
|
||||||
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||||
|
|
||||||
this->setInInternalField(iF, tvalues());
|
this->setInInternalField(iF, tvalues());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,7 +109,7 @@ void Foam::wedgePointPatchField<Type>::evaluate(const Pstream::commsTypes)
|
|||||||
transform(I - nHat*nHat, this->patchInternalField());
|
transform(I - nHat*nHat, this->patchInternalField());
|
||||||
|
|
||||||
// Get internal field to insert values into
|
// Get internal field to insert values into
|
||||||
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||||
|
|
||||||
this->setInInternalField(iF, tvalues());
|
this->setInInternalField(iF, tvalues());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -161,7 +161,7 @@ Foam::string Foam::codedFixedValuePointPatchField<Type>::description() const
|
|||||||
"patch "
|
"patch "
|
||||||
+ this->patch().name()
|
+ this->patch().name()
|
||||||
+ " on field "
|
+ " on field "
|
||||||
+ this->dimensionedInternalField().name();
|
+ this->internalField().name();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ Foam::codedFixedValuePointPatchField<Type>::redirectPatchField() const
|
|||||||
pointPatchField<Type>::New
|
pointPatchField<Type>::New
|
||||||
(
|
(
|
||||||
this->patch(),
|
this->patch(),
|
||||||
this->dimensionedInternalField(),
|
this->internalField(),
|
||||||
dict
|
dict
|
||||||
).ptr()
|
).ptr()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -90,7 +90,7 @@ void Foam::fixedNormalSlipPointPatchField<Type>::evaluate
|
|||||||
transform(I - n_*n_, this->patchInternalField());
|
transform(I - n_*n_, this->patchInternalField());
|
||||||
|
|
||||||
// Get internal field to insert values into
|
// Get internal field to insert values into
|
||||||
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
|
Field<Type>& iF = const_cast<Field<Type>&>(this->primitiveField());
|
||||||
|
|
||||||
this->setInInternalField(iF, tvalues());
|
this->setInInternalField(iF, tvalues());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,7 +127,7 @@ template<class Type>
|
|||||||
Foam::tmp<Foam::Field<Type>>
|
Foam::tmp<Foam::Field<Type>>
|
||||||
Foam::pointPatchField<Type>::patchInternalField() const
|
Foam::pointPatchField<Type>::patchInternalField() const
|
||||||
{
|
{
|
||||||
return patchInternalField(internalField());
|
return patchInternalField(primitiveField());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -141,12 +141,12 @@ Foam::pointPatchField<Type>::patchInternalField
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Check size
|
// Check size
|
||||||
if (iF.size() != internalField().size())
|
if (iF.size() != primitiveField().size())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "given internal field does not correspond to the mesh. "
|
<< "given internal field does not correspond to the mesh. "
|
||||||
<< "Field size: " << iF.size()
|
<< "Field size: " << iF.size()
|
||||||
<< " mesh size: " << internalField().size()
|
<< " mesh size: " << primitiveField().size()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,12 +175,12 @@ void Foam::pointPatchField<Type>::addToInternalField
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Check size
|
// Check size
|
||||||
if (iF.size() != internalField().size())
|
if (iF.size() != primitiveField().size())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "given internal field does not correspond to the mesh. "
|
<< "given internal field does not correspond to the mesh. "
|
||||||
<< "Field size: " << iF.size()
|
<< "Field size: " << iF.size()
|
||||||
<< " mesh size: " << internalField().size()
|
<< " mesh size: " << primitiveField().size()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,12 +213,12 @@ void Foam::pointPatchField<Type>::addToInternalField
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Check size
|
// Check size
|
||||||
if (iF.size() != internalField().size())
|
if (iF.size() != primitiveField().size())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "given internal field does not correspond to the mesh. "
|
<< "given internal field does not correspond to the mesh. "
|
||||||
<< "Field size: " << iF.size()
|
<< "Field size: " << iF.size()
|
||||||
<< " mesh size: " << internalField().size()
|
<< " mesh size: " << primitiveField().size()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,12 +252,12 @@ void Foam::pointPatchField<Type>::setInInternalField
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Check size
|
// Check size
|
||||||
if (iF.size() != internalField().size())
|
if (iF.size() != primitiveField().size())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "given internal field does not correspond to the mesh. "
|
<< "given internal field does not correspond to the mesh. "
|
||||||
<< "Field size: " << iF.size()
|
<< "Field size: " << iF.size()
|
||||||
<< " mesh size: " << internalField().size()
|
<< " mesh size: " << primitiveField().size()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -279,13 +279,13 @@ public:
|
|||||||
|
|
||||||
//- Return dimensioned internal field reference
|
//- Return dimensioned internal field reference
|
||||||
const DimensionedField<Type, pointMesh>&
|
const DimensionedField<Type, pointMesh>&
|
||||||
dimensionedInternalField() const
|
internalField() const
|
||||||
{
|
{
|
||||||
return internalField_;
|
return internalField_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return internal field reference
|
//- Return internal field reference
|
||||||
const Field<Type>& internalField() const
|
const Field<Type>& primitiveField() const
|
||||||
{
|
{
|
||||||
return internalField_;
|
return internalField_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,7 +116,7 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
compressible::turbulenceModel::propertiesName,
|
compressible::turbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,7 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
turbulenceModel::propertiesName,
|
turbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -147,8 +147,8 @@ externalWallHeatFluxTemperatureFvPatchScalarField
|
|||||||
<< "\n patch type '" << p.type()
|
<< "\n patch type '" << p.type()
|
||||||
<< "' either q or h and Ta were not found '"
|
<< "' either q or h and Ta were not found '"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << dimensionedInternalField().name()
|
<< " of field " << internalField().name()
|
||||||
<< " in file " << dimensionedInternalField().objectPath()
|
<< " in file " << internalField().objectPath()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||||
<< patch().name() << ':'
|
<< patch().name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " :"
|
<< this->internalField().name() << " :"
|
||||||
<< " heat transfer rate:" << Q
|
<< " heat transfer rate:" << Q
|
||||||
<< " walltemperature "
|
<< " walltemperature "
|
||||||
<< " min:" << gMin(*this)
|
<< " min:" << gMin(*this)
|
||||||
|
|||||||
@ -403,9 +403,9 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
|||||||
scalar Q = gAverage(kappaw*snGrad());
|
scalar Q = gAverage(kappaw*snGrad());
|
||||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||||
<< patch().name() << ':'
|
<< patch().name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " <- "
|
<< this->internalField().name() << " <- "
|
||||||
<< nbrPatch.name() << ':'
|
<< nbrPatch.name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " :"
|
<< this->internalField().name() << " :"
|
||||||
<< " heat[W]:" << Q
|
<< " heat[W]:" << Q
|
||||||
<< " walltemperature "
|
<< " walltemperature "
|
||||||
<< " min:" << gMin(*this)
|
<< " min:" << gMin(*this)
|
||||||
|
|||||||
@ -163,7 +163,7 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
turbulenceModel::propertiesName,
|
turbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||||
<< patch().name() << ':'
|
<< patch().name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " :"
|
<< this->internalField().name() << " :"
|
||||||
<< " mass flux[Kg/s]:" << phi
|
<< " mass flux[Kg/s]:" << phi
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,8 +96,8 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
|
|||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "' not type '" << mappedPatchBase::typeName << "'"
|
<< "' not type '" << mappedPatchBase::typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << dimensionedInternalField().name()
|
<< " of field " << internalField().name()
|
||||||
<< " in file " << dimensionedInternalField().objectPath()
|
<< " in file " << internalField().objectPath()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,10 +237,10 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||||
<< patch().name() << ':'
|
<< patch().name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " <- "
|
<< this->internalField().name() << " <- "
|
||||||
<< nbrMesh.name() << ':'
|
<< nbrMesh.name() << ':'
|
||||||
<< nbrPatch.name() << ':'
|
<< nbrPatch.name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " :"
|
<< this->internalField().name() << " :"
|
||||||
<< " heat transfer rate:" << Q
|
<< " heat transfer rate:" << Q
|
||||||
<< " walltemperature "
|
<< " walltemperature "
|
||||||
<< " min:" << gMin(*this)
|
<< " min:" << gMin(*this)
|
||||||
|
|||||||
@ -102,8 +102,8 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
|
|||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "' not type '" << mappedPatchBase::typeName << "'"
|
<< "' not type '" << mappedPatchBase::typeName << "'"
|
||||||
<< "\n for patch " << p.name()
|
<< "\n for patch " << p.name()
|
||||||
<< " of field " << dimensionedInternalField().name()
|
<< " of field " << internalField().name()
|
||||||
<< " in file " << dimensionedInternalField().objectPath()
|
<< " in file " << internalField().objectPath()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,10 +237,10 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||||
<< patch().name() << ':'
|
<< patch().name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " <- "
|
<< this->internalField().name() << " <- "
|
||||||
<< nbrMesh.name() << ':'
|
<< nbrMesh.name() << ':'
|
||||||
<< nbrPatch.name() << ':'
|
<< nbrPatch.name() << ':'
|
||||||
<< this->dimensionedInternalField().name() << " :"
|
<< this->internalField().name() << " :"
|
||||||
<< " heat transfer rate:" << Q
|
<< " heat transfer rate:" << Q
|
||||||
<< " walltemperature "
|
<< " walltemperature "
|
||||||
<< " min:" << gMin(Tp)
|
<< " min:" << gMin(Tp)
|
||||||
|
|||||||
@ -203,7 +203,7 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
compressible::turbulenceModel::propertiesName,
|
compressible::turbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ void alphatWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
compressibleTurbulenceModel::propertiesName,
|
compressibleTurbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -154,7 +154,7 @@ void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs()
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
turbulenceModel::propertiesName,
|
turbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -206,7 +206,7 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
turbulenceModel::propertiesName,
|
turbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ void Foam::LESModels::IDDESDelta::calcDelta()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalarField& faceToFacenMax = tfaceToFacenMax.ref().internalFieldRef();
|
scalarField& faceToFacenMax = tfaceToFacenMax.ref().primitiveFieldRef();
|
||||||
|
|
||||||
const cellList& cells = mesh.cells();
|
const cellList& cells = mesh.cells();
|
||||||
const vectorField& faceCentres = mesh.faceCentres();
|
const vectorField& faceCentres = mesh.faceCentres();
|
||||||
@ -113,7 +113,7 @@ void Foam::LESModels::IDDESDelta::calcDelta()
|
|||||||
<< "Case must be either 2D or 3D" << exit(FatalError);
|
<< "Case must be either 2D or 3D" << exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
delta_.internalFieldRef() =
|
delta_.primitiveFieldRef() =
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
max
|
max
|
||||||
|
|||||||
@ -48,7 +48,7 @@ void Foam::LESModels::cubeRootVolDelta::calcDelta()
|
|||||||
|
|
||||||
if (nD == 3)
|
if (nD == 3)
|
||||||
{
|
{
|
||||||
delta_.internalFieldRef() = deltaCoeff_*pow(mesh.V(), 1.0/3.0);
|
delta_.primitiveFieldRef() = deltaCoeff_*pow(mesh.V(), 1.0/3.0);
|
||||||
}
|
}
|
||||||
else if (nD == 2)
|
else if (nD == 2)
|
||||||
{
|
{
|
||||||
@ -68,7 +68,7 @@ void Foam::LESModels::cubeRootVolDelta::calcDelta()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delta_.internalFieldRef() = deltaCoeff_*sqrt(mesh.V()/thickness);
|
delta_.primitiveFieldRef() = deltaCoeff_*sqrt(mesh.V()/thickness);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -71,7 +71,7 @@ void Foam::LESModels::maxDeltaxyz::calcDelta()
|
|||||||
|
|
||||||
if (nD == 3)
|
if (nD == 3)
|
||||||
{
|
{
|
||||||
delta_.internalFieldRef() = hmax;
|
delta_.primitiveFieldRef() = hmax;
|
||||||
}
|
}
|
||||||
else if (nD == 2)
|
else if (nD == 2)
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ void Foam::LESModels::maxDeltaxyz::calcDelta()
|
|||||||
<< "Case is 2D, LES is not strictly applicable\n"
|
<< "Case is 2D, LES is not strictly applicable\n"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
delta_.internalFieldRef() = hmax;
|
delta_.primitiveFieldRef() = hmax;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -63,14 +63,14 @@ Foam::anisotropicFilter::anisotropicFilter
|
|||||||
{
|
{
|
||||||
for (direction d=0; d<vector::nComponents; d++)
|
for (direction d=0; d<vector::nComponents; d++)
|
||||||
{
|
{
|
||||||
coeff_.internalFieldRef().replace
|
coeff_.primitiveFieldRef().replace
|
||||||
(
|
(
|
||||||
d,
|
d,
|
||||||
(1/widthCoeff_)*
|
(1/widthCoeff_)*
|
||||||
sqr
|
sqr
|
||||||
(
|
(
|
||||||
2.0*mesh.V()
|
2.0*mesh.V()
|
||||||
/fvc::surfaceSum(mag(mesh.Sf().component(d)))().internalField()
|
/fvc::surfaceSum(mag(mesh.Sf().component(d)))().primitiveField()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -100,14 +100,14 @@ Foam::anisotropicFilter::anisotropicFilter
|
|||||||
{
|
{
|
||||||
for (direction d=0; d<vector::nComponents; d++)
|
for (direction d=0; d<vector::nComponents; d++)
|
||||||
{
|
{
|
||||||
coeff_.internalFieldRef().replace
|
coeff_.primitiveFieldRef().replace
|
||||||
(
|
(
|
||||||
d,
|
d,
|
||||||
(1/widthCoeff_)*
|
(1/widthCoeff_)*
|
||||||
sqr
|
sqr
|
||||||
(
|
(
|
||||||
2.0*mesh.V()
|
2.0*mesh.V()
|
||||||
/fvc::surfaceSum(mag(mesh.Sf().component(d)))().internalField()
|
/fvc::surfaceSum(mag(mesh.Sf().component(d)))().primitiveField()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,7 +131,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
turbulenceModel::propertiesName,
|
turbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -127,7 +127,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
|
|||||||
IOobject::groupName
|
IOobject::groupName
|
||||||
(
|
(
|
||||||
turbulenceModel::propertiesName,
|
turbulenceModel::propertiesName,
|
||||||
dimensionedInternalField().group()
|
internalField().group()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user