diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C index 5401b662b9..017be50b6c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C +++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C @@ -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 = diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C index 24fb46b807..f5953c2994 100644 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C +++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C @@ -44,7 +44,7 @@ void writeFluentField Ostream& stream ) { - const vectorField& phiInternal = phi.internalField(); + const vectorField& phiInternal = phi; // Writing cells stream diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C index 02348e3e55..f424434856 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C @@ -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(); diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C index 165dfe7b8a..8d681da85c 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C @@ -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 diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C index da4c454a50..5de6d069e9 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C @@ -351,7 +351,7 @@ localEulerDdtScheme::fvmDdt fvMatrix& fvm = tfvm.ref(); - const scalarField& rDeltaT = localRDeltaT().internalField(); + const scalarField& rDeltaT = localRDeltaT(); fvm.diag() = rDeltaT*mesh().Vsc(); @@ -386,7 +386,7 @@ localEulerDdtScheme::fvmDdt ); fvMatrix& fvm = tfvm.ref(); - const scalarField& rDeltaT = localRDeltaT().internalField(); + const scalarField& rDeltaT = localRDeltaT(); fvm.diag() = rDeltaT*rho.value()*mesh().Vsc(); @@ -423,7 +423,7 @@ localEulerDdtScheme::fvmDdt ); fvMatrix& fvm = tfvm.ref(); - const scalarField& rDeltaT = localRDeltaT().internalField(); + const scalarField& rDeltaT = localRDeltaT(); fvm.diag() = rDeltaT*rho.internalField()*mesh().Vsc(); @@ -463,7 +463,7 @@ localEulerDdtScheme::fvmDdt ); fvMatrix& fvm = tfvm.ref(); - const scalarField& rDeltaT = localRDeltaT().internalField(); + const scalarField& rDeltaT = localRDeltaT(); fvm.diag() = rDeltaT*alpha.internalField()*rho.internalField()*mesh().Vsc(); diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.C b/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.C index b0eb52a108..4e7b8b83f9 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/faceCorrectedSnGrad/faceCorrectedSnGrad.C @@ -72,9 +72,9 @@ Foam::fv::faceCorrectedSnGrad::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(); diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C index 5994fbdcf9..2ad75944f4 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C @@ -126,7 +126,7 @@ snGradScheme::snGrad GeometricField& 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(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C index 429b36ba1b..67d865b18b 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/pointLinear/pointLinear.C @@ -51,9 +51,9 @@ correction Field& 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(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C index 718949afbd..ed7b2576c6 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C @@ -157,9 +157,9 @@ Foam::surfaceInterpolationScheme::interpolate const surfaceScalarField& lambdas = tlambdas(); const surfaceScalarField& ys = tys(); - const Field& vfi = vf.internalField(); - const scalarField& lambda = lambdas.internalField(); - const scalarField& y = ys.internalField(); + const Field& 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::dotInterpolate const surfaceScalarField& lambdas = tlambdas(); - const Field& vfi = vf.internalField(); - const scalarField& lambda = lambdas.internalField(); + const Field& vfi = vf; + const scalarField& lambda = lambdas; const fvMesh& mesh = vf.mesh(); const labelUList& P = mesh.owner(); diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C index 24ca385704..64f7307438 100644 --- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C +++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C @@ -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; diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index e4f28920a4..fa478e3f30 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -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()); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C index 489b453cb9..807ca3ad91 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C @@ -125,8 +125,8 @@ tmp 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_; } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C index a6350c3ac1..55ea60d322 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C @@ -108,8 +108,8 @@ tmp 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; diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C index 2d6e8b77b8..ab51ea57e8 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C @@ -125,9 +125,9 @@ tmp 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)); diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 59cfd243ea..ed59cb3757 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -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) << ", " diff --git a/src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C b/src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C index 277e5e6d91..651897ba41 100644 --- a/src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C +++ b/src/sampling/meshToMesh0/calculateMeshToMesh0Weights.C @@ -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) { diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index 9ac59bfedc..969f6ca1fa 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -55,8 +55,8 @@ template void Foam::heThermo::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::heThermo::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) { diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C index b73f3207d2..99f228a159 100644 --- a/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C +++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C @@ -30,8 +30,8 @@ License template void Foam::hePsiThermo::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(); diff --git a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C index ec0a220d6d..febff08db1 100644 --- a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C @@ -30,8 +30,8 @@ License template void Foam::heRhoThermo::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(); diff --git a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C index 6c3d0f1ff6..703e088005 100644 --- a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C +++ b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C @@ -32,9 +32,9 @@ License template void Foam::heheuPsiThermo::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::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::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::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::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::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::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) { diff --git a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C index 7dc39c3adc..b6b4bea3be 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C +++ b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C @@ -33,8 +33,8 @@ void Foam::heSolidThermo::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::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) {