Store the information in the context argument for these two functions (and 
use the same context argument for both, for simplicity).

   Barry

> On Apr 13, 2017, at 9:13 PM, Young, Matthew, Adam <[email protected]> wrote:
> 
> I'd like to develop a hybrid fluid/PIC code based on 
> petsc/petsc-3.7/src/ksp/ksp/examples/tutorials/ex50.c.html, in which 
> KSPSolve() solves an equation for the electrostatic potential at each time 
> step. To do so, I need KSPSetComputeOperators() and KSPSetComputeRHS() to 
> know about scalar fields (e.g. density) that I compute by gathering the 
> particles before solving for the potential. Should I pass them via an 
> application context, store them in a DM dof, or something else?
> 
> --Matt
> 
> ----------------------------
> Matthew Young
> PhD Candidate
> Astronomy Department
> Boston University

Reply via email to