mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use new fvPatch::start() method
This commit is contained in:
@ -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())
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -186,7 +186,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
|
||||
forAll(bfld, patchI)
|
||||
{
|
||||
fvsPatchField<T>& patchFld = bfld[patchI];
|
||||
label faceI = patchFld.patch().patch().start();
|
||||
label faceI = patchFld.patch().start();
|
||||
|
||||
forAll(patchFld, i)
|
||||
{
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -249,7 +249,7 @@ void directMappedFixedValueFvPatchField<Type>::updateCoeffs()
|
||||
{
|
||||
const fvPatchField<Type>& pf =
|
||||
nbrField.boundaryField()[patchI];
|
||||
label faceStart = pf.patch().patch().start();
|
||||
label faceStart = pf.patch().start();
|
||||
|
||||
forAll(pf, faceI)
|
||||
{
|
||||
|
||||
@ -116,7 +116,7 @@ directMappedVelocityFluxFixedValueFvPatchField
|
||||
// Force calculation of schedule (uses parallel comms)
|
||||
const directMappedPolyPatch& mpp = refCast<const directMappedPolyPatch>
|
||||
(
|
||||
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)
|
||||
{
|
||||
|
||||
@ -139,7 +139,7 @@ Foam::extendedCellToFaceStencil::weightedSum
|
||||
|
||||
if (pSfCorr.coupled())
|
||||
{
|
||||
label faceI = pSfCorr.patch().patch().start();
|
||||
label faceI = pSfCorr.patch().start();
|
||||
|
||||
forAll(pSfCorr, i)
|
||||
{
|
||||
|
||||
@ -106,7 +106,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum
|
||||
|
||||
if (pSfCorr.coupled())
|
||||
{
|
||||
label faceI = pSfCorr.patch().patch().start();
|
||||
label faceI = pSfCorr.patch().start();
|
||||
|
||||
forAll(pSfCorr, i)
|
||||
{
|
||||
|
||||
@ -73,14 +73,14 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > 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<GeometricField<Type, fvsPatchField, surfaceMesh> > 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<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
|
||||
{
|
||||
fvsPatchField<Type>& pfld = patchFields[patchI];
|
||||
|
||||
label meshFaceI = pfld.patch().patch().start();
|
||||
label meshFaceI = pfld.patch().start();
|
||||
|
||||
forAll(pfld, i)
|
||||
{
|
||||
|
||||
@ -103,7 +103,7 @@ void Foam::CentredFitData<Polynomial>::calcFit()
|
||||
|
||||
if (pw.coupled())
|
||||
{
|
||||
label facei = pw.patch().patch().start();
|
||||
label facei = pw.patch().start();
|
||||
|
||||
forAll(pw, i)
|
||||
{
|
||||
|
||||
@ -121,7 +121,7 @@ void Foam::UpwindFitData<Polynomial>::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<Polynomial>::calcFit()
|
||||
|
||||
if (pw.coupled())
|
||||
{
|
||||
label facei = pw.patch().patch().start();
|
||||
label facei = pw.patch().start();
|
||||
|
||||
forAll(pw, i)
|
||||
{
|
||||
|
||||
@ -144,7 +144,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct()
|
||||
}
|
||||
else
|
||||
{
|
||||
label start = bfld.patch().patch().start();
|
||||
const label start = bfld.patch().start();
|
||||
|
||||
forAll(bfld, i)
|
||||
{
|
||||
|
||||
@ -190,7 +190,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
}
|
||||
else
|
||||
{
|
||||
label start = bfld.patch().patch().start();
|
||||
const label start = bfld.patch().start();
|
||||
|
||||
forAll(bfld, i)
|
||||
{
|
||||
|
||||
@ -111,8 +111,10 @@ void directMappedFixedInternalValueFvPatchField<Type>::updateCoeffs()
|
||||
directMappedFixedValueFvPatchField<Type>::updateCoeffs();
|
||||
|
||||
// Get the coupling information from the directMappedPatchBase
|
||||
const directMappedPatchBase& mpp =
|
||||
refCast<const directMappedPatchBase>(this->patch().patch());
|
||||
const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
|
||||
(
|
||||
this->patch().patch()
|
||||
);
|
||||
const polyMesh& nbrMesh = mpp.sampleMesh();
|
||||
const fvPatch& nbrPatch =
|
||||
refCast<const fvMesh>
|
||||
|
||||
@ -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])
|
||||
|
||||
@ -237,7 +237,7 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs()
|
||||
// Get the coupling information from the directMappedPatchBase
|
||||
const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
|
||||
(
|
||||
patch().patch()
|
||||
this->patch().patch()
|
||||
);
|
||||
const polyMesh& nbrMesh = mpp.sampleMesh();
|
||||
const fvPatch& nbrPatch = refCast<const fvMesh>
|
||||
|
||||
@ -200,7 +200,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
|
||||
// Get the coupling information from the directMappedPatchBase
|
||||
const directMappedPatchBase& mpp = refCast<const directMappedPatchBase>
|
||||
(
|
||||
patch().patch()
|
||||
this->patch().patch()
|
||||
);
|
||||
const polyMesh& nbrMesh = mpp.sampleMesh();
|
||||
const fvPatch& nbrPatch = refCast<const fvMesh>
|
||||
|
||||
Reference in New Issue
Block a user