Commit 56bf3f6c authored by andy's avatar andy
Browse files

ENH: Use const ref instead of copy for vector

parent 154eea44
......@@ -75,8 +75,8 @@ Foam::tmp<Foam::vectorField> Foam::cyclicAMIFvPatch::delta() const
{
forAll(patchD, faceI)
{
vector ddi = patchD[faceI];
vector dni = nbrPatchD[faceI];
const vector& ddi = patchD[faceI];
const vector& dni = nbrPatchD[faceI];
pdv[faceI] = ddi - dni;
}
......@@ -85,8 +85,8 @@ Foam::tmp<Foam::vectorField> Foam::cyclicAMIFvPatch::delta() const
{
forAll(patchD, faceI)
{
vector ddi = patchD[faceI];
vector dni = nbrPatchD[faceI];
const vector& ddi = patchD[faceI];
const vector& dni = nbrPatchD[faceI];
pdv[faceI] = ddi - transform(forwardT()[0], dni);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment