<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="">
Hi Josh,
<div class=""><br class="">
</div>
<div class="">Luis Caffarelli has some writings from his Fermi lecture on the Obstacle problem that may or may not be helpful. He primarily looks at it in the context of variational inequalities.</div>
<div class=""><br class="">
</div>
<div class=""><a href="http://user.math.uzh.ch/ros-oton/Caffarelli-The-obstacle-problem-SNS-1998.pdf" class="">http://user.math.uzh.ch/ros-oton/Caffarelli-The-obstacle-problem-SNS-1998.pdf</a></div>
<div class=""><br class="">
</div>
<div class="">I don’t have an academic reference for the solution of this as an optimization problem, but I have implemented it before as a TAO/MFEM test case for the ATPESC 2018 Hands-On Lessons.</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://xsdk-project.github.io/ATPESC2018HandsOnLessons/lessons/obstacle_tao/" class="">https://xsdk-project.github.io/ATPESC2018HandsOnLessons/lessons/obstacle_tao/</a></div>
<div class=""><br class="">
</div>
<div class="">Hope that helps.<br class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div style="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;">
——<br class="">
<b class="">Alp Dener</b></div>
<div style="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;">
Argonne National Laboratory</div>
<div style="text-align: start; text-indent: 0px;"><a href="http://www.mcs.anl.gov/person/alp-dener" class="">http://www.mcs.anl.gov/person/alp-dener</a></div>
<div style="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;">
<br class="">
</div>
<div style="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;">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Sep 12, 2018, at 11:01 AM, Josh L <<a href="mailto:ysjosh.lo@gmail.com" class="">ysjosh.lo@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi Alp,
<div class=""><br class="">
</div>
<div class="">Yes, my minimal energy problem reduces to the solution of (1).</div>
<div class=""><br class="">
</div>
<div class="">Is there any reference on the problem you mention in the last paragraph?<br class="">
<br class="">
</div>
<div class="">Thanks,</div>
<div class="">Josh</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">2018-09-12 9:26 GMT-05:00 Dener, Alp <span dir="ltr" class="">
<<a href="mailto:adener@anl.gov" target="_blank" class="">adener@anl.gov</a>></span>:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;line-break:after-white-space" class="">Hi Josh,
<div class=""><br class="">
</div>
<div class="">In the FormFunctionAndGradient() function, the gradient you compute and provide TAO must be the gradient of the objective function with respect to the optimization variables. If your optimization variables are u, and your objective function is
 J(u), then FormFunctionGradient would need to compute J(u) and dJ/du.</div>
<div class=""><br class="">
</div>
<div class="">I’m not entirely sure if I understand your problem correctly, but it seems that your minimal energy problem reduces to the solution of equation (1). Is this correct?</div>
<div class=""><br class="">
</div>
<div class="">TAO is not the right package to solve time-dependent PDEs like (1) directly. You would want to use TS for that. However, TAO can be used to solve the original energy minimization problem. A good example of this is the canonical obstacle problem
 that aims to minimize the Dirichlet energy function subject to a constraint that represents the obstacle. That problem reduces to the solution of the Laplace equation with the appropriate boundary conditions matching the obstacle, which would be discretized
 and solved as a stand-alone PDE. However, the same problem can also be solved as an optimization problem where the objective function is the Dirichlet energy function, and the associated gradient is related to the stiffness matrix associated with the Laplace
 equation. The two formulations are mathematically equivalent. If I’m interpreting your problem correctly, you should be able to take a similar approach, but you would need to derive the gradient of your energy function and see how you can construct it in relation
 to equation (1).</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="word-wrap:break-word;line-break:after-white-space" class="">
<div style="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;" class="">
——<span class="HOEnZb"><font color="#888888" class=""><br class="">
<b class="">Alp Dener</b></font></span></div>
<span class="HOEnZb"><font color="#888888" class="">
<div style="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;" class="">
Argonne National Laboratory</div>
<div style="text-align:start;text-indent:0px" class=""><a href="http://www.mcs.anl.gov/person/alp-dener" target="_blank" class="">http://www.mcs.anl.gov/person/<wbr class="">alp-dener</a></div>
<div style="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;" class="">
<br class="">
</div>
<div style="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;" class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</div>
</font></span></div>
</div>
<div class="">
<div class="h5">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Sep 11, 2018, at 3:51 PM, Josh L <<a href="mailto:ysjosh.lo@gmail.com" target="_blank" class="">ysjosh.lo@gmail.com</a>> wrote:</div>
<br class="m_1889243619814234431Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi,
<div class=""><br class="">
</div>
<div class="">I am using PETSc TAO to solve the following equation obtained from minimizing certain energy and constitutive model:</div>
<div class=""><br class="">
</div>
<div class="">u_xx - u - u_t =0    (1)</div>
<div class=""><br class="">
</div>
<div class="">For simplicity, the coefficients are neglected. </div>
<div class="">In the routine to form function value and gradient, I use (1) to form my gradient vector, and my energy definition to calculate function value.Is it correct? </div>
<div class=""><br class="">
</div>
<div class="">I only found one tao example that solves time dependent problem, but it is using TS which I am not using.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Josh</div>
<div class=""> </div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>