STYLE: use new fvPatch::start() method

This commit is contained in:
Mark Olesen
2010-04-13 17:12:57 +02:00
parent af039f0eb7
commit 6b819eb50a
17 changed files with 28 additions and 27 deletions

View File

@ -176,8 +176,7 @@ int main(int argc, char *argv[])
forAll(patchField, patchFaceI) forAll(patchField, patchFaceI)
{ {
label meshFaceI = const label meshFaceI = patchField.patch().start() + patchFaceI;
patchField.patch().patch().start() + patchFaceI;
scalar dist = faceInfo[meshFaceI].distSqr(); scalar dist = faceInfo[meshFaceI].distSqr();
if (faceInfo[meshFaceI].valid()) if (faceInfo[meshFaceI].valid())

View File

@ -332,7 +332,7 @@ Foam::dynamicRefineFvMesh::refine
const fvsPatchScalarField& patchPhiU = const fvsPatchScalarField& patchPhiU =
phiU.boundaryField()[patchI]; phiU.boundaryField()[patchI];
label faceI = patchPhi.patch().patch().start(); label faceI = patchPhi.patch().start();
forAll(patchPhi, i) forAll(patchPhi, i)
{ {

View File

@ -186,7 +186,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
forAll(bfld, patchI) forAll(bfld, patchI)
{ {
fvsPatchField<T>& patchFld = bfld[patchI]; fvsPatchField<T>& patchFld = bfld[patchI];
label faceI = patchFld.patch().patch().start(); label faceI = patchFld.patch().start();
forAll(patchFld, i) forAll(patchFld, i)
{ {

View File

@ -231,7 +231,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
Info<< "openFraction = " << openFraction_ << endl; Info<< "openFraction = " << openFraction_ << endl;
vectorField::subField Sfw = patch().patch().faceAreas(); vectorField::subField Sfw = this->patch().patch().faceAreas();
vectorField newSfw = (1 - openFraction_)*initWallSf_; vectorField newSfw = (1 - openFraction_)*initWallSf_;
forAll(Sfw, facei) forAll(Sfw, facei)
{ {

View File

@ -249,7 +249,7 @@ void directMappedFixedValueFvPatchField<Type>::updateCoeffs()
{ {
const fvPatchField<Type>& pf = const fvPatchField<Type>& pf =
nbrField.boundaryField()[patchI]; nbrField.boundaryField()[patchI];
label faceStart = pf.patch().patch().start(); label faceStart = pf.patch().start();
forAll(pf, faceI) forAll(pf, faceI)
{ {

View File

@ -116,7 +116,7 @@ directMappedVelocityFluxFixedValueFvPatchField
// Force calculation of schedule (uses parallel comms) // Force calculation of schedule (uses parallel comms)
const directMappedPolyPatch& mpp = refCast<const directMappedPolyPatch> const directMappedPolyPatch& mpp = refCast<const directMappedPolyPatch>
( (
patch().patch() this->patch().patch()
); );
(void)mpp.map().schedule(); (void)mpp.map().schedule();
} }
@ -187,7 +187,7 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs()
const fvPatchVectorField& Upf = UField.boundaryField()[patchI]; const fvPatchVectorField& Upf = UField.boundaryField()[patchI];
const scalarField& phipf = phiField.boundaryField()[patchI]; const scalarField& phipf = phiField.boundaryField()[patchI];
label faceStart = Upf.patch().patch().start(); label faceStart = Upf.patch().start();
forAll(Upf, faceI) forAll(Upf, faceI)
{ {

View File

@ -139,7 +139,7 @@ Foam::extendedCellToFaceStencil::weightedSum
if (pSfCorr.coupled()) if (pSfCorr.coupled())
{ {
label faceI = pSfCorr.patch().patch().start(); label faceI = pSfCorr.patch().start();
forAll(pSfCorr, i) forAll(pSfCorr, i)
{ {

View File

@ -106,7 +106,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum
if (pSfCorr.coupled()) if (pSfCorr.coupled())
{ {
label faceI = pSfCorr.patch().patch().start(); label faceI = pSfCorr.patch().start();
forAll(pSfCorr, i) forAll(pSfCorr, i)
{ {

View File

@ -73,14 +73,14 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
// Construct addressing // Construct addressing
const fvPatch& subPatch = sMesh.boundary()[patchI]; const fvPatch& subPatch = sMesh.boundary()[patchI];
const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]]; const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]];
label baseStart = basePatch.patch().start(); const label baseStart = basePatch.start();
label baseSize = basePatch.size(); const label baseSize = basePatch.size();
labelList directAddressing(subPatch.size()); labelList directAddressing(subPatch.size());
forAll(directAddressing, i) forAll(directAddressing, i)
{ {
label baseFaceI = faceMap[subPatch.patch().start()+i]; label baseFaceI = faceMap[subPatch.start()+i];
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize)
{ {
@ -197,14 +197,14 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
// Construct addressing // Construct addressing
const fvPatch& subPatch = sMesh.boundary()[patchI]; const fvPatch& subPatch = sMesh.boundary()[patchI];
const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]]; const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]];
label baseStart = basePatch.patch().start(); const label baseStart = basePatch.start();
label baseSize = basePatch.size(); const label baseSize = basePatch.size();
labelList directAddressing(subPatch.size()); labelList directAddressing(subPatch.size());
forAll(directAddressing, i) forAll(directAddressing, i)
{ {
label baseFaceI = faceMap[subPatch.patch().start()+i]; label baseFaceI = faceMap[subPatch.start()+i];
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize)
{ {
@ -239,7 +239,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
{ {
fvsPatchField<Type>& pfld = patchFields[patchI]; fvsPatchField<Type>& pfld = patchFields[patchI];
label meshFaceI = pfld.patch().patch().start(); label meshFaceI = pfld.patch().start();
forAll(pfld, i) forAll(pfld, i)
{ {

View File

@ -103,7 +103,7 @@ void Foam::CentredFitData<Polynomial>::calcFit()
if (pw.coupled()) if (pw.coupled())
{ {
label facei = pw.patch().patch().start(); label facei = pw.patch().start();
forAll(pw, i) forAll(pw, i)
{ {

View File

@ -121,7 +121,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
if (pw.coupled()) if (pw.coupled())
{ {
label facei = pw.patch().patch().start(); label facei = pw.patch().start();
forAll(pw, i) forAll(pw, i)
{ {
@ -180,7 +180,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
if (pw.coupled()) if (pw.coupled())
{ {
label facei = pw.patch().patch().start(); label facei = pw.patch().start();
forAll(pw, i) forAll(pw, i)
{ {

View File

@ -144,7 +144,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct()
} }
else else
{ {
label start = bfld.patch().patch().start(); const label start = bfld.patch().start();
forAll(bfld, i) forAll(bfld, i)
{ {

View File

@ -190,7 +190,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
} }
else else
{ {
label start = bfld.patch().patch().start(); const label start = bfld.patch().start();
forAll(bfld, i) forAll(bfld, i)
{ {

View File

@ -111,8 +111,10 @@ void directMappedFixedInternalValueFvPatchField<Type>::updateCoeffs()
directMappedFixedValueFvPatchField<Type>::updateCoeffs(); directMappedFixedValueFvPatchField<Type>::updateCoeffs();
// Get the coupling information from the directMappedPatchBase // Get the coupling information from the directMappedPatchBase
const directMappedPatchBase& mpp = const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
refCast<const directMappedPatchBase>(this->patch().patch()); (
this->patch().patch()
);
const polyMesh& nbrMesh = mpp.sampleMesh(); const polyMesh& nbrMesh = mpp.sampleMesh();
const fvPatch& nbrPatch = const fvPatch& nbrPatch =
refCast<const fvMesh> refCast<const fvMesh>

View File

@ -45,7 +45,7 @@ void Foam::rawTopoChangerFvMesh::setUnmappedValues
fld.boundaryField()[patchI] fld.boundaryField()[patchI]
); );
label start = fvp.patch().patch().start(); const label start = fvp.patch().start();
forAll(fvp, i) forAll(fvp, i)
{ {
if (!mappedFace[start+i]) if (!mappedFace[start+i])

View File

@ -237,7 +237,7 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs()
// Get the coupling information from the directMappedPatchBase // Get the coupling information from the directMappedPatchBase
const directMappedPatchBase& mpp = refCast<const directMappedPatchBase> const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
( (
patch().patch() this->patch().patch()
); );
const polyMesh& nbrMesh = mpp.sampleMesh(); const polyMesh& nbrMesh = mpp.sampleMesh();
const fvPatch& nbrPatch = refCast<const fvMesh> const fvPatch& nbrPatch = refCast<const fvMesh>

View File

@ -200,7 +200,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
// Get the coupling information from the directMappedPatchBase // Get the coupling information from the directMappedPatchBase
const directMappedPatchBase& mpp = refCast<const directMappedPatchBase> const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
( (
patch().patch() this->patch().patch()
); );
const polyMesh& nbrMesh = mpp.sampleMesh(); const polyMesh& nbrMesh = mpp.sampleMesh();
const fvPatch& nbrPatch = refCast<const fvMesh> const fvPatch& nbrPatch = refCast<const fvMesh>