[petsc-users] PETSc within a larger simulation

Young, Matthew, Adam may at bu.edu
Fri Mar 20 13:02:40 CDT 2015

I have a PETSc routine that I am trying to use as an electric-field solver within a particle-in-cell code. The existing PIC code is parallelized with MPI. The pure PIC code (written many years ago by my advisor) is well-tested and I am trying to add an option for it to operate as a hybrid fluid/PIC code. This requires solving Ax=b at every time step but I don't think I understand how to manage communication between the existing code and my PETSc solver. Since we may not always run the hybrid version, the code calls MPI_Init() before PetscInitialize(). Section 14.1 of the manual suggests that I use PetscSetCommWorld between MPI_Init() and PetscInitialize(), but that routine appears to not be supported anymore. Is that correct? Can you point me to examples of simulations that use PETSc within a larger code?


Matthew Young
Graduate Student
Boston University Dept. of Astronomy

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

More information about the petsc-users mailing list