Remove .internalField() clutter for const-access to the internal field

This commit is contained in:
Henry Weller 2016-04-28 12:37:31 +01:00
parent ea5401c770
commit 15b36331fe
21 changed files with 64 additions and 64 deletions

View File

@ -45,7 +45,7 @@ void writeFluentField
Ostream& stream
)
{
const scalarField& phiInternal = phi.internalField();
const scalarField& phiInternal = phi;
// Writing cells
stream
@ -75,7 +75,7 @@ void writeFluentField
{
// Form empty patch field repeat the internal field to
// allow for the node interpolation in Fluent
const scalarField& phiInternal = phi.internalField();
const scalarField& phiInternal = phi;
// Get reference to internal cells
const labelList emptyFaceCells =

View File

@ -44,7 +44,7 @@ void writeFluentField
Ostream& stream
)
{
const vectorField& phiInternal = phi.internalField();
const vectorField& phiInternal = phi;
// Writing cells
stream

View File

@ -320,7 +320,7 @@ void Foam::MRFZone::addCoriolis
const labelList& cells = mesh_.cellZones()[cellZoneID_];
vectorField& ddtUc = ddtU.internalField();
const vectorField& Uc = U.internalField();
const vectorField& Uc = U;
const vector Omega = this->Omega();

View File

@ -43,8 +43,8 @@ void Foam::MRFZone::makeRelativeRhoFlux
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vectorField& Cfi = Cf.internalField();
const vectorField& Sfi = Sf.internalField();
const vectorField& Cfi = Cf;
const vectorField& Sfi = Sf;
scalarField& phii = phi.internalField();
// Internal faces
@ -143,8 +143,8 @@ void Foam::MRFZone::makeAbsoluteRhoFlux
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
const vectorField& Cfi = Cf.internalField();
const vectorField& Sfi = Sf.internalField();
const vectorField& Cfi = Cf;
const vectorField& Sfi = Sf;
scalarField& phii = phi.internalField();
// Internal faces

View File

@ -351,7 +351,7 @@ localEulerDdtScheme<Type>::fvmDdt
fvMatrix<Type>& fvm = tfvm.ref();
const scalarField& rDeltaT = localRDeltaT().internalField();
const scalarField& rDeltaT = localRDeltaT();
fvm.diag() = rDeltaT*mesh().Vsc();
@ -386,7 +386,7 @@ localEulerDdtScheme<Type>::fvmDdt
);
fvMatrix<Type>& fvm = tfvm.ref();
const scalarField& rDeltaT = localRDeltaT().internalField();
const scalarField& rDeltaT = localRDeltaT();
fvm.diag() = rDeltaT*rho.value()*mesh().Vsc();
@ -423,7 +423,7 @@ localEulerDdtScheme<Type>::fvmDdt
);
fvMatrix<Type>& fvm = tfvm.ref();
const scalarField& rDeltaT = localRDeltaT().internalField();
const scalarField& rDeltaT = localRDeltaT();
fvm.diag() = rDeltaT*rho.internalField()*mesh().Vsc();
@ -463,7 +463,7 @@ localEulerDdtScheme<Type>::fvmDdt
);
fvMatrix<Type>& fvm = tfvm.ref();
const scalarField& rDeltaT = localRDeltaT().internalField();
const scalarField& rDeltaT = localRDeltaT();
fvm.diag() = rDeltaT*alpha.internalField()*rho.internalField()*mesh().Vsc();

View File

@ -72,9 +72,9 @@ Foam::fv::faceCorrectedSnGrad<Type>::fullGradCorrection
const pointField& points = mesh.points();
const faceList& faces = mesh.faces();
const vectorField& Sf = mesh.Sf().internalField();
const vectorField& C = mesh.C().internalField();
const scalarField& magSf = mesh.magSf().internalField();
const vectorField& Sf = mesh.Sf();
const vectorField& C = mesh.C();
const scalarField& magSf = mesh.magSf();
const labelList& owner = mesh.owner();
const labelList& neighbour = mesh.neighbour();

View File

@ -126,7 +126,7 @@ snGradScheme<Type>::snGrad
GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tsf.ref();
// set reference to difference factors array
const scalarField& deltaCoeffs = tdeltaCoeffs().internalField();
const scalarField& deltaCoeffs = tdeltaCoeffs();
// owner/neighbour addressing
const labelUList& owner = mesh.owner();

View File

@ -51,9 +51,9 @@ correction
Field<Type>& sfCorr = tsfCorr.ref().internalField();
const pointField& points = mesh.points();
const pointField& C = mesh.C().internalField();
const pointField& C = mesh.C();
const faceList& faces = mesh.faces();
const scalarField& w = mesh.weights().internalField();
const scalarField& w = mesh.weights();
const labelList& owner = mesh.owner();
const labelList& neighbour = mesh.neighbour();

View File

@ -157,9 +157,9 @@ Foam::surfaceInterpolationScheme<Type>::interpolate
const surfaceScalarField& lambdas = tlambdas();
const surfaceScalarField& ys = tys();
const Field<Type>& vfi = vf.internalField();
const scalarField& lambda = lambdas.internalField();
const scalarField& y = ys.internalField();
const Field<Type>& vfi = vf;
const scalarField& lambda = lambdas;
const scalarField& y = ys;
const fvMesh& mesh = vf.mesh();
const labelUList& P = mesh.owner();
@ -251,8 +251,8 @@ Foam::surfaceInterpolationScheme<Type>::dotInterpolate
const surfaceScalarField& lambdas = tlambdas();
const Field<Type>& vfi = vf.internalField();
const scalarField& lambda = lambdas.internalField();
const Field<Type>& vfi = vf;
const scalarField& lambda = lambdas;
const fvMesh& mesh = vf.mesh();
const labelUList& P = mesh.owner();

View File

@ -147,7 +147,7 @@ Foam::scalar Foam::fv::meanVelocityForce::magUbarAve
void Foam::fv::meanVelocityForce::correct(volVectorField& U)
{
const scalarField& rAU = rAPtr_().internalField();
const scalarField& rAU = rAPtr_();
// Integrate flow variables over cell set
scalar rAUave = 0.0;

View File

@ -1081,8 +1081,8 @@ void kinematicSingleLayer::info()
{
Info<< "\nSurface film: " << type() << endl;
const scalarField& deltaInternal = delta_.internalField();
const vectorField& Uinternal = U_.internalField();
const scalarField& deltaInternal = delta_;
const vectorField& Uinternal = U_;
scalar addedMassTotal = 0.0;
outputProperties().readIfPresent("addedMassTotal", addedMassTotal);
addedMassTotal += returnReduce(addedMassTotal_, sumOp<scalar>());

View File

@ -125,8 +125,8 @@ tmp<volScalarField> constantRadiation::Shs()
if ((time >= timeStart_) && (time <= timeStart_ + duration_))
{
scalarField& Shs = tShs.ref();
const scalarField& Qr = QrConst_.internalField();
const scalarField& alpha = owner_.alpha().internalField();
const scalarField& Qr = QrConst_;
const scalarField& alpha = owner_.alpha();
Shs = mask_*Qr*alpha*absorptivity_;
}

View File

@ -108,8 +108,8 @@ tmp<volScalarField> primaryRadiation::Shs()
);
scalarField& Shs = tShs.ref();
const scalarField& QinP = QinPrimary_.internalField();
const scalarField& alpha = owner_.alpha().internalField();
const scalarField& QinP = QinPrimary_;
const scalarField& alpha = owner_.alpha();
Shs = QinP*alpha;

View File

@ -125,9 +125,9 @@ tmp<volScalarField> standardRadiation::Shs()
);
scalarField& Shs = tShs.ref();
const scalarField& QinP = QinPrimary_.internalField();
const scalarField& delta = owner_.delta().internalField();
const scalarField& alpha = owner_.alpha().internalField();
const scalarField& QinP = QinPrimary_;
const scalarField& delta = owner_.delta();
const scalarField& alpha = owner_.alpha();
Shs = beta_*QinP*alpha*(1.0 - exp(-kappaBar_*delta));

View File

@ -727,7 +727,7 @@ void thermoSingleLayer::info()
{
kinematicSingleLayer::info();
const scalarField& Tinternal = T_.internalField();
const scalarField& Tinternal = T_;
Info<< indent << "min/mean/max(T) = "
<< gMin(Tinternal) << ", "

View File

@ -51,8 +51,8 @@ void Foam::meshToMesh0::calculateInverseDistanceWeights() const
// get reference to source mesh data
const labelListList& cc = fromMesh_.cellCells();
const vectorField& centreFrom = fromMesh_.C().internalField();
const vectorField& centreTo = toMesh_.C().internalField();
const vectorField& centreFrom = fromMesh_.C();
const vectorField& centreTo = toMesh_.C();
forAll(cellAddressing_, celli)
{

View File

@ -55,8 +55,8 @@ template<class BasicThermo, class MixtureType>
void Foam::heThermo<BasicThermo, MixtureType>::init()
{
scalarField& heCells = he_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& pCells = this->p_;
const scalarField& TCells = this->T_;
forAll(heCells, celli)
{
@ -188,8 +188,8 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::he
volScalarField& he = the.ref();
scalarField& heCells = he.internalField();
const scalarField& pCells = p.internalField();
const scalarField& TCells = T.internalField();
const scalarField& pCells = p;
const scalarField& TCells = T;
forAll(heCells, celli)
{

View File

@ -30,8 +30,8 @@ License
template<class BasicPsiThermo, class MixtureType>
void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::calculate()
{
const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& hCells = this->he_;
const scalarField& pCells = this->p_;
scalarField& TCells = this->T_.internalField();
scalarField& psiCells = this->psi_.internalField();

View File

@ -30,8 +30,8 @@ License
template<class BasicPsiThermo, class MixtureType>
void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate()
{
const scalarField& hCells = this->he().internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& hCells = this->he();
const scalarField& pCells = this->p_;
scalarField& TCells = this->T_.internalField();
scalarField& psiCells = this->psi_.internalField();

View File

@ -32,9 +32,9 @@ License
template<class BasicPsiThermo, class MixtureType>
void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::calculate()
{
const scalarField& hCells = this->he_.internalField();
const scalarField& heuCells = this->heu_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& hCells = this->he_;
const scalarField& heuCells = this->heu_;
const scalarField& pCells = this->p_;
scalarField& TCells = this->T_.internalField();
scalarField& TuCells = this->Tu_.internalField();
@ -177,8 +177,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heheuPsiThermo
)
{
scalarField& heuCells = this->heu_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& TuCells = this->Tu_.internalField();
const scalarField& pCells = this->p_;
const scalarField& TuCells = this->Tu_;
forAll(heuCells, celli)
{
@ -309,9 +309,9 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::Tb() const
volScalarField& Tb_ = tTb.ref();
scalarField& TbCells = Tb_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_;
const scalarField& TCells = this->T_;
const scalarField& hCells = this->he_;
forAll(TbCells, celli)
{
@ -369,8 +369,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psiu() const
volScalarField& psiu = tpsiu.ref();
scalarField& psiuCells = psiu.internalField();
const scalarField& TuCells = this->Tu_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& TuCells = this->Tu_;
const scalarField& pCells = this->p_;
forAll(psiuCells, celli)
{
@ -424,8 +424,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psib() const
volScalarField& psib = tpsib.ref();
scalarField& psibCells = psib.internalField();
const volScalarField Tb_(Tb());
const scalarField& TbCells = Tb_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& TbCells = Tb_;
const scalarField& pCells = this->p_;
forAll(psibCells, celli)
{
@ -478,8 +478,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::muu() const
volScalarField& muu_ = tmuu.ref();
scalarField& muuCells = muu_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& TuCells = this->Tu_.internalField();
const scalarField& pCells = this->p_;
const scalarField& TuCells = this->Tu_;
forAll(muuCells, celli)
{
@ -537,8 +537,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::mub() const
volScalarField& mub_ = tmub.ref();
scalarField& mubCells = mub_.internalField();
const volScalarField Tb_(Tb());
const scalarField& pCells = this->p_.internalField();
const scalarField& TbCells = Tb_.internalField();
const scalarField& pCells = this->p_;
const scalarField& TbCells = Tb_;
forAll(mubCells, celli)
{

View File

@ -33,8 +33,8 @@ void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
{
scalarField& TCells = this->T_.internalField();
const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& hCells = this->he_;
const scalarField& pCells = this->p_;
scalarField& rhoCells = this->rho_.internalField();
scalarField& alphaCells = this->alpha_.internalField();
@ -219,8 +219,8 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
volVectorField& Kappa = tKappa.ref();
vectorField& KappaCells = Kappa.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& pCells = this->p_.internalField();
const scalarField& TCells = this->T_;
const scalarField& pCells = this->p_;
forAll(KappaCells, celli)
{