From: Roy Stogner <roystgnr@ic...>  20070313 14:06:26

On Tue, 13 Mar 2007, Ingo Schmidt wrote: > b) I need two functions, one assembling the "rhs/residual" and one the > jacobian, which PETSc is calling permanently during the newton > iteration. Both functions are looping over each element of the system. > That doubles the numerical effort, or? Not quite. It's definitely wasted effort, but in my applications at least doing a Jacobian calculation is significantly more expensive than doing a residual calculation, so the shared calculations between the two can't be too bad. You're doing NewmarkSystem stuff, though, and I'm not sure how the expense tradeoffs change there. > Roy, you mentioned that glue code is needed to switch to PETSc's SNES > package. > > c) Could you sketch the steps which are necessary? I was specifically speaking of glue code necessary to switch my own framework over: Another subclass of DiffSolver needs to be written, to use a PetscNonlinearSolver with a DiffSystem target. For you, FEMSystem would have to be extended to make time_evolving allow both first order and second order time derivatives, and a NewmarkSolver subclass of TimeSolver would need to be written.  Roy 