# The parallel solution of the 3D heat conduction equation using PETSc results in errors

**URL:** <https://community.freefem.org/t/the-parallel-solution-of-the-3d-heat-conduction-equation-using-petsc-results-in-errors/3555>\
**Category:** General Discussion\
**Created:** [October 21, 2024, 2:20pm UTC](https://community.freefem.org/t/the-parallel-solution-of-the-3d-heat-conduction-equation-using-petsc-results-in-errors/3555 "2024-10-21T14:20:10Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [October 21, 2024, 4:24pm UTC](https://community.freefem.org/t/the-parallel-solution-of-the-3d-heat-conduction-equation-using-petsc-results-in-errors/3555/6 "2024-10-21T16:24:02Z")

</div>

I think that you are falling into the trap of varf-on, see

> [@Change of sign in linear part of variational problem (varf vs problem)](https://community.freefem.org/t/change-of-sign-in-linear-part-of-variational-problem-varf-vs-problem/2984/2):
>
> solve vSolve(u, v) = a(u, v) + l(v) solves a(u, v) + l(v) = 0 while varf vPb(u, v) = a(u, v) + l(v) solves a(u, v) = l(v), so it is expected that you need to shift the sign in front of the linear form.

For your `heat` definition you should probably change the sign of the rhs parts:  
+int3d(Th)( Cv/dt \* Told \* Tv )  
+int3d(Th)( Joule \* Tv )

---

_[View the full topic](https://community.freefem.org/t/the-parallel-solution-of-the-3d-heat-conduction-equation-using-petsc-results-in-errors/3555)._
