[petsc-users] Question for time dependent problems

Travis C. Fisher travis.fisher at nasa.gov
Tue Jul 5 14:38:12 CDT 2011


I am wondering if there is a "right way" to set up preconditioning for 
time dependent nonlinear problems (using precondtioned matrix free 
SNES). For example, I want to use implicit Runge Kutta, and freeze my 
preconditioner at the beginning of each step. Currently how I do this is:

Problem set up:
1. Specify nonzero structure of precondtioner matrix.
2. Specify MAT_NEW_NONZERO_LOCATION_ERR and MAT_KEEP_NONZERO_PATTERN.

Beginning of a time step (1st implicit stage of RK scheme):
1. Use MatZeroEntries on the preconditioner
2. Calculate and assemble preconditioning matrix
3. In the jacobian evaluation routine, use flag = SAME_NONZERO_PATTERN 
(I'd like it to use the nonzero structure I've already specified)

Subsequent nonlinear solves in time step:
1. Use flag = SAME_PRECONDITIONER in the jacobian evaluation

In this way, I only initialize the preconditioning matrix structure 
once. I am wondering if I have made any large mistakes here or if I am 
misunderstanding the character of the solver?

Is there a tutorial case for this situation? I want to note that my 
initial nonzero structure may contain entries that are zero, but may not 
be zero in subsequent calculations. I am wondering what PETSC does with 
these during ASM/ILU preconditioning? i.e. Does it remove them from my 
originally specified nonzero structure?

I appreciate any direction you can give me.

Thanks,

Travis Fisher


More information about the petsc-users mailing list