<div dir="ltr"><p>Hello,</p>
<p>I am struggling with a strange error when using VecAXPY. I have a ghost vector H that needs to be updated as</p>
<p>H = H + eta * dH - eta_old * dH</p>
<p>However, for some reason I obtain different results when using <br>
</p>
<p>call VecAXPY(H, eta - eta_old, dH, ierr)</p>
<p>instead of</p>
<p>call VecAXPY(H, - eta_old, dH, ierr)</p>
<p>call VecAXPY(H, eta, dH, ierr)</p>
<p>where eta and eta_old are PetscScalars.<br>
</p>
<p>The first option seems to provide a wrong output, but I do not understand what can go wrong in such simple operation.<br>
</p>
<p>Thank you.</p>
</div>