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?

--Matt

--------------------------------------------------------------
Matthew Young
Graduate Student
Boston University Dept. of Astronomy
--------------------------------------------------------------

Reply via email to