[petsc-users] Distributing already assembled stiffness matrix

Barry Smith bsmith at mcs.anl.gov
Fri Oct 20 17:42:03 CDT 2017


> On Oct 18, 2017, at 4:14 AM, Jaganathan, Srikrishna <srikrishna.jaganathan at fau.de> wrote:
> 
> Hello,
> 
> 
> I have been trying to distribute a already existing stiffness matrix in my FEM code to petsc parallel matrix object , but I am unable to find any documentation regarding it.

   I really really don't recommend doing this. If you code is sequential and you want to speed up the linear solves then use some linear solver library that uses OpenMP for parallelism and be done with it. Mix sequential finite element assembly with MPI parallel solvers is just not worth going within 100 meters of.

   Barry



> It was quite straightforward to create a sequential petsc matrix object and everything was working as intended.I have read some of the user comments in the mailing lists regarding similar situation and most of the times the solution suggested is to create stiffness matrix from the the mesh in distributed format. Since its a little difficult in my case to pass the mesh data in the code , is there anyway to distribute already existing stiffness matrix ?
> 
> Thanks and Regards
> 
> Srikrishna Jaganathan



More information about the petsc-users mailing list