<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">The Jacobian interface has the shift parameter which I think is the 'factor' you are looking for. </div>
<div class=""><br class="">
</div>
<div class="">In the Jacobian function</div>
<div class=""><br class="">
</div>
IJacobian(TS ts,PetscReal time,Vec X,Vec Xdot,PetscReal shift,Mat A,Mat B,void *ctx)
<div class=""><br class="">
</div>
<div class="">you can save shift and time to your MatShell context, and later, use them in the shell matrix operations. For example, </div>
<div class="">the Jacobian of F in your case is dF/du+shift*dF/du_t.</div>
<div class=""><br class="">
</div>
<div class="">As Barry indicated, you should not manually set this 'factor', it is determined internally by PETSc according to the time-stepping scheme you are using.  </div>
<div class=""><br class="">
</div>
<div class="">Hong (Mr.)</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Mar 27, 2017, at 12:56 PM, Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" class="">mail2amneet@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Mon, Mar 27, 2017 at 10:42 AM, Matthew Knepley <span dir="ltr" class="">
<<a href="mailto:knepley@gmail.com" target="_blank" class="">knepley@gmail.com</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
1) sounds easier and matches your current code.</blockquote>
</div>
<br class="">
Great! </div>
<div class="gmail_extra"><br class="">
</div>
<div class="gmail_extra">For matrix free TS, the form of F(t,u,u_t) =  <span style="color:rgb(80,0,80);font-size:12.800000190734863px" class="">rho u*_t - div ( sigma) as written  "on paper" and should not </span></div>
<div class="gmail_extra"><span style="color:rgb(80,0,80);font-size:12.800000190734863px" class="">contain time stepping factors like (1/2) that comes from CN?  Similarly for RHS = G(t,u). What about Jacobian of F (MATSHELL </span></div>
<div class="gmail_extra"><span style="color:rgb(80,0,80);font-size:12.800000190734863px" class="">to solve momentum eqn) --- </span><span style="font-size:12.800000190734863px;color:rgb(80,0,80)" class="">should that contain these factors?</span></div>
<div class="gmail_extra"><br clear="all" class="">
<div class=""><br class="">
</div>
-- <br class="">
<div class="gmail_signature">
<div dir="ltr" class="">
<div class="">--Amneet <br class="">
<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>