mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: avoid remove dangling reference (finiteArea)
This commit is contained in:
@ -105,12 +105,13 @@ leastSquaresFaGrad<Type>::calcGrad
|
|||||||
{
|
{
|
||||||
const faPatchField<Type>& bf = vsf.boundaryField()[patchi];
|
const faPatchField<Type>& bf = vsf.boundaryField()[patchi];
|
||||||
|
|
||||||
const Field<Type>& vsfp =
|
tmp<Field<Type>> tvsfp(bf);
|
||||||
(
|
|
||||||
bf.coupled()
|
if (bf.coupled())
|
||||||
? bf.patchNeighbourField().cref()
|
{
|
||||||
: const_cast<faPatchField<Type>&>(bf)
|
tvsfp = bf.patchNeighbourField();
|
||||||
);
|
}
|
||||||
|
const auto& vsfp = tvsfp();
|
||||||
|
|
||||||
const faePatchVectorField& ownLsp = ownLs.boundaryField()[patchi];
|
const faePatchVectorField& ownLsp = ownLs.boundaryField()[patchi];
|
||||||
const labelUList& edgeFaces =
|
const labelUList& edgeFaces =
|
||||||
|
|||||||
@ -209,8 +209,8 @@ Foam::edgeInterpolationScheme<Type>::interpolate
|
|||||||
label size = vf.boundaryField()[pi].patch().size();
|
label size = vf.boundaryField()[pi].patch().size();
|
||||||
label start = vf.boundaryField()[pi].patch().start();
|
label start = vf.boundaryField()[pi].patch().start();
|
||||||
|
|
||||||
Field<Type> pOwnVf = vf.boundaryField()[pi].patchInternalField();
|
Field<Type> pOwnVf(vf.boundaryField()[pi].patchInternalField());
|
||||||
Field<Type> pNgbVf = vf.boundaryField()[pi].patchNeighbourField();
|
Field<Type> pNgbVf(vf.boundaryField()[pi].patchNeighbourField());
|
||||||
|
|
||||||
Field<Type>& pSf = sf.boundaryFieldRef()[pi];
|
Field<Type>& pSf = sf.boundaryFieldRef()[pi];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user