<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Sep 12, 2018, at 4:23 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<div class="gmail_quote">
<div dir="ltr" class="">On Wed, Sep 12, 2018 at 5:16 PM Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">
<br class="">
   The function norm given by the -snes_monitor is the function norm for the DVI problem (which depends on where the solution is constrained) while FormFunction() norm you compute is for the original unconstrained problem.<br class="">
<br class="">
    I am still not sure why you solve this as a DVI. If you solve it without the constraints do you get the "wrong" answer?<br class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">If this is a variational crack problem, you can solve it unconstrained if you use a quadratic penalty term. However,</div>
<div class="">that induces spurious long range communication between crack tips. If you bound the phase field between 0 and 1,</div>
<div class="">you can use a linear penalty which has physical behavior.</div>
</div>
</div>
</div>
</blockquote>
<div>Not really, you still need the growth constraint from iteration to iteration or you could get healing in unloading cycles, or cack path that change over time. A classical and easy to reproduce examples is to look at a crack tip with two small inclusion
 at different directions and different orientation relative to the tip. As the loading increase, you could have a crack that goes from tip to inclusion 1, then later from tip to inclusion 2 without going through inclusion 1...</div>
<div><br class="">
</div>
<div>@Josh: are you alternating solves in displacement and phase field or trying to implement a monolithic approach? Convergence of monolithic approaches is elusive, and they do not necessarily give you physical path (that is paths that can be interpolated
 along a path of monotonically decreasing energy)</div>
<div>With a staggered  (alternate directions) approach, there is no excuse for not using SNESVI. As you mentioned, since you are propagating a crack tip, most of the constraints are saturated and the active set changes very little from step to step. In my experience,
 SNESVI is very fast in this situation (2-3 iterations), and its cost still negligible compared to the cost of the computation of the equilibrium displacement.</div>
</div>
<div>In addition, once you can handle growth through SNESVI, you have no excuse not to use a linear damage dissipation potential, which is physically much reasonable (finite support often damage localisation, existence of an elastic limit, and correct nucleation
 in a wide range of situation as shown in my recent paper (Tanné et al JMPS 2018)</div>
<div><br class="">
</div>
<div>My implementation of phase field fracture is available at <a href="https://bitbucket.org/bourdin/mef90-sieve" class="">
https://bitbucket.org/bourdin/mef90-sieve</a> It is still based on an old petsc because I can never find the time to catch up with the release, and because I needed some form of I/O in “natural ordering” that only came in recently.</div>
<div><br class="">
</div>
<div>Feel free to ping me directly if you need more details</div>
<div><br class="">
</div>
<div>Blaise Bourdin</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<div class="gmail_quote">
<div class=""><br class="">
</div>
<div class="">   Matt</div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">
    Barry<br class="">
<br class="">
<br class="">
> On Sep 12, 2018, at 3:32 PM, Josh L <<a href="mailto:ysjosh.lo@gmail.com" target="_blank" class="">ysjosh.lo@gmail.com</a>> wrote:<br class="">
><span class="Apple-converted-space"> </span><br class="">
> Hi,<br class="">
><span class="Apple-converted-space"> </span><br class="">
> my solution is mostly very close to 1. only  for a very small area where solution goes from 0 to 1(a smeared crack).<span class="Apple-converted-space"> </span><br class="">
><span class="Apple-converted-space"> </span><br class="">
> I set -snes_atol 1e-7 and it is converging.<br class="">
><span class="Apple-converted-space"> </span><br class="">
> I've noticed the following:<br class="">
><span class="Apple-converted-space"> </span><br class="">
> There is a difference between the function norm.<br class="">
><span class="Apple-converted-space"> </span><br class="">
> I calculate the function norm in FormFunction, so every time it is called it gives the function norm<br class="">
> , and the result is different from the function norm given by -snes_monitor if i set<span class="Apple-converted-space"> </span><br class="">
>     <span class="Apple-converted-space"> </span><br class="">
>      SNESSetType(snes,SNESVINEWTONRSLS,ierr)<br class="">
>      SNESVISetVariableBounds(snes,xl,xu,ierr)<br class="">
><span class="Apple-converted-space"> </span><br class="">
> The function norm calculated in FromFunction is NOT reducing, however, the function norm given by -snes_monitor is reducing<br class="">
> They are the same if I just use regular SNES without setting variable bounds.<br class="">
><span class="Apple-converted-space"> </span><br class="">
><span class="Apple-converted-space"> </span><br class="">
> Thanks,<br class="">
> Josh<br class="">
><span class="Apple-converted-space"> </span><br class="">
> 2018-09-12 12:02 GMT-05:00 Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank" class="">bsmith@mcs.anl.gov</a>>:<br class="">
><span class="Apple-converted-space"> </span><br class="">
>      You have too tight a convergence tolerance for your problem.  You can't expect to get more than 1.e-12 as the minimum residual norm or even less.<span class="Apple-converted-space"> </span><br class="">
><span class="Apple-converted-space"> </span><br class="">
>       How close is your solution to 1 and -1?<br class="">
><span class="Apple-converted-space"> </span><br class="">
>       If you really need much higher convergence you can try ./configure --with-precision=__float128<span class="Apple-converted-space"> </span><br class="">
><span class="Apple-converted-space"> </span><br class="">
><span class="Apple-converted-space"> </span><br class="">
>       Barry<br class="">
><span class="Apple-converted-space"> </span><br class="">
> > On Sep 11, 2018, at 11:53 PM, Josh L <<a href="mailto:ysjosh.lo@gmail.com" target="_blank" class="">ysjosh.lo@gmail.com</a>> wrote:<br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> > Yes, I initialize all u_i to 1.0<br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> > <span class="Apple-converted-space"> </span><br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> > 2018-09-11 23:37 GMT-05:00 Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank" class="">bsmith@mcs.anl.gov</a>>:<br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> >    Do you start with initial conditions of  0 <= u_i <= 1 ?<br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> >     Run with -snes_monitor -snes_converged_reason -ksp_monitor_true_residual -info -snes_linesearch_monitor and send all the output<br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> >   Barry<br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> > > On Sep 11, 2018, at 11:33 PM, Josh L <<a href="mailto:ysjosh.lo@gmail.com" target="_blank" class="">ysjosh.lo@gmail.com</a>> wrote:<br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > > Hi,<br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > > I am using SNES to solve an nonlinear equation f(u), and I know all the u_i should be 0 and 1.<br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > > First, I use SNES without constraint, and it converges.<br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > > But, If I set<span class="Apple-converted-space"> </span><br class="">
> > >      SNESSetType(snes,SNESVINEWTONRSLS,ierr)<br class="">
> > >      SNESVISetVariableBounds(snes,xl,xu,ierr)<br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > > where xl and xu is vector, and xl_i=0 and xu_i=1<br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > > then SNES fails to converge, because linesearch fails(snes reason = -6), and the norm of residual is not reducing(the norm of incremental solution is reducing)<br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > > The reason to add constraint is that I want to implement some irreversibility.<br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > ><span class="Apple-converted-space"> </span><br class="">
> > > Thanks,<br class="">
> > > Josh <span class="Apple-converted-space"> </span><br class="">
> > > <span class="Apple-converted-space"> </span><br class="">
> ><span class="Apple-converted-space"> </span><br class="">
> ><span class="Apple-converted-space"> </span><br class="">
><span class="Apple-converted-space"> </span><br class="">
><span class="Apple-converted-space"> </span><br class="">
<br class="">
</blockquote>
</div>
<br clear="all" class="">
<div class=""><br class="">
</div>
--<span class="Apple-converted-space"> </span><br class="">
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">
-- Norbert Wiener</div>
<div class=""><br class="">
</div>
<div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
<div class=""><span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">
<span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="">
-- </div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="">
Department of Mathematics and Center for Computation & Technology</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="">
Louisiana State University, Baton Rouge, LA 70803, USA</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="">
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 <a href="http://www.math.lsu.edu/~bourdin" class="">
http://www.math.lsu.edu/~bourdin</a></div>
<div class=""><br class="khtml-block-placeholder">
</div>
<div class=""><br class="khtml-block-placeholder">
</div>
<br class="Apple-interchange-newline">
</div>
</span></div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</span><br class="Apple-interchange-newline">
</div>
<br class="">
</body>
</html>