Skip to content
Snippets Groups Projects
Commit bbd6219e authored by mattijs's avatar mattijs
Browse files

COMP: finiteArea: dangling reference warning

parent 58aa8c97
No related branches found
No related tags found
No related merge requests found
......@@ -105,12 +105,20 @@ leastSquaresFaGrad<Type>::calcGrad
{
const faPatchField<Type>& bf = vsf.boundaryField()[patchi];
const Field<Type>& vsfp =
//const Field<Type>& vsfp =
//(
// bf.coupled()
// ? bf.patchNeighbourField().cref()
// : const_cast<faPatchField<Type>&>(bf)
//);
const tmp<Field<Type>> tvsfp
(
bf.coupled()
? bf.patchNeighbourField().cref()
: const_cast<faPatchField<Type>&>(bf)
? bf.patchNeighbourField()
: bf
);
const Field<Type>& vsfp = tvsfp();
const faePatchVectorField& ownLsp = ownLs.boundaryField()[patchi];
const labelUList& edgeFaces =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment