From 6b819eb50af2e88ab399191695936051ae34a01d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 13 Apr 2010 17:12:57 +0200 Subject: [PATCH] STYLE: use new fvPatch::start() method --- .../test/nearWallDist-wave/testWallDist2.C | 3 +-- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 2 +- .../fvMeshDistribute/fvMeshDistributeTemplates.C | 2 +- .../activeBaffleVelocityFvPatchVectorField.C | 2 +- .../directMappedFixedValueFvPatchField.C | 2 +- ...irectMappedVelocityFluxFixedValueFvPatchField.C | 4 ++-- .../extendedCellToFaceStencilTemplates.C | 2 +- .../extendedUpwindCellToFaceStencilTemplates.C | 2 +- .../fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C | 14 +++++++------- .../schemes/CentredFitScheme/CentredFitData.C | 2 +- .../schemes/UpwindFitScheme/UpwindFitData.C | 4 ++-- .../inverseFaceDistanceDiffusivity.C | 2 +- .../inversePointDistanceDiffusivity.C | 2 +- .../directMappedFixedInternalValueFvPatchField.C | 6 ++++-- .../rawTopoChangerFvMeshTemplates.C | 2 +- ...entTemperatureCoupledBaffleFvPatchScalarField.C | 2 +- ...mperatureCoupledBaffleMixedFvPatchScalarField.C | 2 +- 17 files changed, 28 insertions(+), 27 deletions(-) diff --git a/applications/test/nearWallDist-wave/testWallDist2.C b/applications/test/nearWallDist-wave/testWallDist2.C index e5d528e7d3..ee9fff90b3 100644 --- a/applications/test/nearWallDist-wave/testWallDist2.C +++ b/applications/test/nearWallDist-wave/testWallDist2.C @@ -176,8 +176,7 @@ int main(int argc, char *argv[]) forAll(patchField, patchFaceI) { - label meshFaceI = - patchField.patch().patch().start() + patchFaceI; + const label meshFaceI = patchField.patch().start() + patchFaceI; scalar dist = faceInfo[meshFaceI].distSqr(); if (faceInfo[meshFaceI].valid()) diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 3deee0484f..d66982bb35 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -332,7 +332,7 @@ Foam::dynamicRefineFvMesh::refine const fvsPatchScalarField& patchPhiU = phiU.boundaryField()[patchI]; - label faceI = patchPhi.patch().patch().start(); + label faceI = patchPhi.patch().start(); forAll(patchPhi, i) { diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C index 588dda7566..5d29abaf90 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C @@ -186,7 +186,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields forAll(bfld, patchI) { fvsPatchField& patchFld = bfld[patchI]; - label faceI = patchFld.patch().patch().start(); + label faceI = patchFld.patch().start(); forAll(patchFld, i) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C index d996a2e8b9..2b9fd74349 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C @@ -231,7 +231,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs() Info<< "openFraction = " << openFraction_ << endl; - vectorField::subField Sfw = patch().patch().faceAreas(); + vectorField::subField Sfw = this->patch().patch().faceAreas(); vectorField newSfw = (1 - openFraction_)*initWallSf_; forAll(Sfw, facei) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C index a3d7598451..27b5adcbbb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C @@ -249,7 +249,7 @@ void directMappedFixedValueFvPatchField::updateCoeffs() { const fvPatchField& pf = nbrField.boundaryField()[patchI]; - label faceStart = pf.patch().patch().start(); + label faceStart = pf.patch().start(); forAll(pf, faceI) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C index 80f50e4808..402ec5ea56 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C @@ -116,7 +116,7 @@ directMappedVelocityFluxFixedValueFvPatchField // Force calculation of schedule (uses parallel comms) const directMappedPolyPatch& mpp = refCast ( - patch().patch() + this->patch().patch() ); (void)mpp.map().schedule(); } @@ -187,7 +187,7 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs() const fvPatchVectorField& Upf = UField.boundaryField()[patchI]; const scalarField& phipf = phiField.boundaryField()[patchI]; - label faceStart = Upf.patch().patch().start(); + label faceStart = Upf.patch().start(); forAll(Upf, faceI) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C index 25caa5a090..e37d17f60a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C @@ -139,7 +139,7 @@ Foam::extendedCellToFaceStencil::weightedSum if (pSfCorr.coupled()) { - label faceI = pSfCorr.patch().patch().start(); + label faceI = pSfCorr.patch().start(); forAll(pSfCorr, i) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C index 27eb7032ef..9ba34e2282 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C @@ -106,7 +106,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum if (pSfCorr.coupled()) { - label faceI = pSfCorr.patch().patch().start(); + label faceI = pSfCorr.patch().start(); forAll(pSfCorr, i) { diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C index 4a7078723c..4fa17952ec 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C @@ -73,14 +73,14 @@ tmp > fvMeshSubset::interpolate // Construct addressing const fvPatch& subPatch = sMesh.boundary()[patchI]; const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]]; - label baseStart = basePatch.patch().start(); - label baseSize = basePatch.size(); + const label baseStart = basePatch.start(); + const label baseSize = basePatch.size(); labelList directAddressing(subPatch.size()); forAll(directAddressing, i) { - label baseFaceI = faceMap[subPatch.patch().start()+i]; + label baseFaceI = faceMap[subPatch.start()+i]; if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) { @@ -197,14 +197,14 @@ tmp > fvMeshSubset::interpolate // Construct addressing const fvPatch& subPatch = sMesh.boundary()[patchI]; const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]]; - label baseStart = basePatch.patch().start(); - label baseSize = basePatch.size(); + const label baseStart = basePatch.start(); + const label baseSize = basePatch.size(); labelList directAddressing(subPatch.size()); forAll(directAddressing, i) { - label baseFaceI = faceMap[subPatch.patch().start()+i]; + label baseFaceI = faceMap[subPatch.start()+i]; if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) { @@ -239,7 +239,7 @@ tmp > fvMeshSubset::interpolate { fvsPatchField& pfld = patchFields[patchI]; - label meshFaceI = pfld.patch().patch().start(); + label meshFaceI = pfld.patch().start(); forAll(pfld, i) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C index bca4e0aaf6..a10c1cc22b 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C @@ -103,7 +103,7 @@ void Foam::CentredFitData::calcFit() if (pw.coupled()) { - label facei = pw.patch().patch().start(); + label facei = pw.patch().start(); forAll(pw, i) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C index 49d22582fd..47a7d69e46 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C @@ -121,7 +121,7 @@ void Foam::UpwindFitData::calcFit() if (pw.coupled()) { - label facei = pw.patch().patch().start(); + label facei = pw.patch().start(); forAll(pw, i) { @@ -180,7 +180,7 @@ void Foam::UpwindFitData::calcFit() if (pw.coupled()) { - label facei = pw.patch().patch().start(); + label facei = pw.patch().start(); forAll(pw, i) { diff --git a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C index 2ef5a2a1fc..934f29e018 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C @@ -144,7 +144,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct() } else { - label start = bfld.patch().patch().start(); + const label start = bfld.patch().start(); forAll(bfld, i) { diff --git a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C index ec47a05a6c..00063e203c 100644 --- a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C @@ -190,7 +190,7 @@ void Foam::inversePointDistanceDiffusivity::correct() } else { - label start = bfld.patch().patch().start(); + const label start = bfld.patch().start(); forAll(bfld, i) { diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C b/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C index 9c84101d85..0f5c3db7c1 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C @@ -111,8 +111,10 @@ void directMappedFixedInternalValueFvPatchField::updateCoeffs() directMappedFixedValueFvPatchField::updateCoeffs(); // Get the coupling information from the directMappedPatchBase - const directMappedPatchBase& mpp = - refCast(this->patch().patch()); + const directMappedPatchBase& mpp = refCast + ( + this->patch().patch() + ); const polyMesh& nbrMesh = mpp.sampleMesh(); const fvPatch& nbrPatch = refCast diff --git a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C index 0207910567..388487c505 100644 --- a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C +++ b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C @@ -45,7 +45,7 @@ void Foam::rawTopoChangerFvMesh::setUnmappedValues fld.boundaryField()[patchI] ); - label start = fvp.patch().patch().start(); + const label start = fvp.patch().start(); forAll(fvp, i) { if (!mappedFace[start+i]) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C index 97e665b707..ae719eb968 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C @@ -237,7 +237,7 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs() // Get the coupling information from the directMappedPatchBase const directMappedPatchBase& mpp = refCast ( - patch().patch() + this->patch().patch() ); const polyMesh& nbrMesh = mpp.sampleMesh(); const fvPatch& nbrPatch = refCast diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C index 42d82bb63a..bb3ce48d3a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C @@ -200,7 +200,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs() // Get the coupling information from the directMappedPatchBase const directMappedPatchBase& mpp = refCast ( - patch().patch() + this->patch().patch() ); const polyMesh& nbrMesh = mpp.sampleMesh(); const fvPatch& nbrPatch = refCast