mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: various: move boundaryField(), internalField() out of loop
This commit is contained in:
@ -360,9 +360,11 @@ Foam::dynamicRefineFvMesh::refine
|
||||
}
|
||||
|
||||
// Recalculate new boundary faces.
|
||||
forAll(phi.boundaryField(), patchI)
|
||||
surfaceScalarField::GeometricBoundaryField& bphi =
|
||||
phi.boundaryField();
|
||||
forAll(bphi, patchI)
|
||||
{
|
||||
fvsPatchScalarField& patchPhi = phi.boundaryField()[patchI];
|
||||
fvsPatchScalarField& patchPhi = bphi[patchI];
|
||||
const fvsPatchScalarField& patchPhiU =
|
||||
phiU.boundaryField()[patchI];
|
||||
|
||||
@ -404,8 +406,7 @@ Foam::dynamicRefineFvMesh::refine
|
||||
const fvsPatchScalarField& patchPhiU =
|
||||
phiU.boundaryField()[patchI];
|
||||
|
||||
fvsPatchScalarField& patchPhi =
|
||||
phi.boundaryField()[patchI];
|
||||
fvsPatchScalarField& patchPhi = bphi[patchI];
|
||||
|
||||
patchPhi[i] = patchPhiU[i];
|
||||
}
|
||||
@ -549,6 +550,9 @@ Foam::dynamicRefineFvMesh::unrefine
|
||||
}
|
||||
|
||||
surfaceScalarField& phi = const_cast<surfaceScalarField&>(*iter());
|
||||
surfaceScalarField::GeometricBoundaryField& bphi =
|
||||
phi.boundaryField();
|
||||
|
||||
const surfaceScalarField phiU
|
||||
(
|
||||
fvc::interpolate
|
||||
@ -582,10 +586,7 @@ Foam::dynamicRefineFvMesh::unrefine
|
||||
|
||||
const fvsPatchScalarField& patchPhiU =
|
||||
phiU.boundaryField()[patchI];
|
||||
|
||||
fvsPatchScalarField& patchPhi =
|
||||
phi.boundaryField()[patchI];
|
||||
|
||||
fvsPatchScalarField& patchPhi = bphi[patchI];
|
||||
patchPhi[i] = patchPhiU[i];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user