[petsc-users] Request for Assistance with Parallel Matrix Solving Using petsc4py in EasyFEA

Barry Smith bsmith at petsc.dev
Wed Mar 11 15:56:43 CDT 2026


   Does it compute the “correct” result with one MPI process? 

> On Mar 10, 2026, at 4:29 AM, Matthieu Noel <matthieu.noel at inria.fr> wrote:
> 
> Dear PETSc users,
> 
> My name is Matthieu Noel, and I am a research software engineer at INRIA.
> 
> During my PhD thesis, I developed EasyFEA, an open-source finite element analysis tool documented here: https://urldefense.us/v3/__https://easyfea.readthedocs.io/en/stable/__;!!G_uCfscf7eWS!amVjI34KAEi2OPKDSvbAf_KFPOQhJrRXO699hc77p7t_jxsDTydSHMdI9UyytIKID9qvprkJ7WKI-kGnJEmhU_Q$  <https://urldefense.us/v3/__https://easyfea.readthedocs.io/en/stable/__;!!G_uCfscf7eWS!flSI4RbIKcgCgsNyOejSxJzr9vPWftTgzTVo2hSxHxa1AjYCAMppGknY5M5EGs9muBjuX4s8jfd0PCpQUkoOjKZWz9tvihE$>.
> 
> I am currently working on Issue #26 (https://urldefense.us/v3/__https://github.com/matnoel/EasyFEA/issues/26__;!!G_uCfscf7eWS!amVjI34KAEi2OPKDSvbAf_KFPOQhJrRXO699hc77p7t_jxsDTydSHMdI9UyytIKID9qvprkJ7WKI-kGnGJrxEcw$  <https://urldefense.us/v3/__https://github.com/matnoel/EasyFEA/issues/26__;!!G_uCfscf7eWS!flSI4RbIKcgCgsNyOejSxJzr9vPWftTgzTVo2hSxHxa1AjYCAMppGknY5M5EGs9muBjuX4s8jfd0PCpQUkoOjKZWmhF-Su0$>), where I aim to use petsc4py to solve a simple stationary thermal problem in parallel.
> 
> The main challenge is constructing and solving the parallel matrix system (Ax = b).
> 
> Current Status:
> 
> Mesh partitioning has been successfully performed using GMSH.
> EasyFEA provides the assembled matrix system (Ax = b) with applied boundary conditions.
> My current implementation using petsc4py runs without errors, but the results obtained are incorrect.
> <DbhO7xbQSISvapJk.png>
> I suspect the problem lies in how the parallel matrix and vectors are assembled or solved, particularly in handling ghost DOFs and ensuring proper communication between MPI ranks.
> 
> I would be extremely grateful for any guidance, resources, or examples you could share to help me address this issue.
> My current development branch is available here: https://urldefense.us/v3/__https://github.com/matnoel/EasyFEA/tree/26_mpi__;!!G_uCfscf7eWS!amVjI34KAEi2OPKDSvbAf_KFPOQhJrRXO699hc77p7t_jxsDTydSHMdI9UyytIKID9qvprkJ7WKI-kGn21mLc64$  <https://urldefense.us/v3/__https://github.com/matnoel/EasyFEA/tree/26_mpi__;!!G_uCfscf7eWS!flSI4RbIKcgCgsNyOejSxJzr9vPWftTgzTVo2hSxHxa1AjYCAMppGknY5M5EGs9muBjuX4s8jfd0PCpQUkoOjKZWW8q1-8I$>.
> 
> The PETSc function can be found at this link: https://urldefense.us/v3/__https://github.com/matnoel/EasyFEA/blob/26_mpi/EasyFEA/Simulations/Solvers.py*L649-L767__;Iw!!G_uCfscf7eWS!amVjI34KAEi2OPKDSvbAf_KFPOQhJrRXO699hc77p7t_jxsDTydSHMdI9UyytIKID9qvprkJ7WKI-kGn3ULFHJE$  <https://urldefense.us/v3/__https://github.com/matnoel/EasyFEA/blob/26_mpi/EasyFEA/Simulations/Solvers.py*L649-L767__;Iw!!G_uCfscf7eWS!flSI4RbIKcgCgsNyOejSxJzr9vPWftTgzTVo2hSxHxa1AjYCAMppGknY5M5EGs9muBjuX4s8jfd0PCpQUkoOjKZWlmD8DH8$>
> I am currently running the script in the attached files.
> 
> 
> Thank you in advance for your time and expertise.
> 
> 
> Best regards,
> Matthieu Noel
> 
> 
> 
> 
> 
> <Thermal1.py>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20260311/ef407842/attachment.html>


More information about the petsc-users mailing list