<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>body{font-family:Helvetica,Arial;font-size:13px}</style>
</head>
<body>
<div style="font-family:Helvetica,Arial;font-size:13px; "><br>
</div>
Hi Todd,<br>
<p class="airmail_on">On October 29, 2019 at 7:15:50 AM, Munson, Todd (<a href="mailto:tmunson@mcs.anl.gov">tmunson@mcs.anl.gov</a>) wrote:</p>
<div>
<blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">
<span>
<div>
<div></div>
<div><br>
Hi,<span class="Apple-converted-space"> </span><br>
<br>
Is the matrix for the linear PDE symmetric? If so, then the VI is equivalent to<span class="Apple-converted-space"> </span><br>
finding the stationary points of a bound-constrained quadratic program and you<span class="Apple-converted-space"> </span><br>
may want to use the TAO Newton Trust-Region or Line-Search methods for<span class="Apple-converted-space"> </span><br>
bound-constrained optimization problems.<span class="Apple-converted-space"> </span><br>
<br>
Alp: are there flags set when a problem is linear with a symmetric matrix? Maybe<span class="Apple-converted-space"> </span><br>
we can do an internal reformulation in those cases to use the optimization tools.<span class="Apple-converted-space"> </span></div>
</div>
</span></blockquote>
</div>
<p>The Mat object options can be set to encode symmetry information, but I don’t think there’s an existing way to encode whether a Jacobian or a Hessian is constant.</p>
<p>https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetOption.html</p>
<div>
<blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">
<span>
<div>
<div>Is there an easy way to get the matrix and the constant vector for one of the<span class="Apple-converted-space"> </span><br>
problems that fails or does not perform well? Typically, the TAO RSLS<span class="Apple-converted-space"> </span><br>
methods will work well for the types of problems that you have and if<span class="Apple-converted-space"> </span><br>
they are not, then I can go about finding out why and making some<span class="Apple-converted-space"> </span><br>
improvements.<span class="Apple-converted-space"> </span><br>
<br>
Monotone in this case is that your matrix is positive semidefinite; x^TMx >= 0 for<span class="Apple-converted-space"> </span><br>
all x. For M symmetric, this is the same as M having all nonnegative eigenvalues.<span class="Apple-converted-space"> </span><br>
<br>
Todd.<span class="Apple-converted-space"> </span><br>
<br>
> On Oct 28, 2019, at 11:14 PM, Alexander Lindsay <alexlindsay239@gmail.com> wrote:<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> On Thu, Oct 24, 2019 at 4:52 AM Munson, Todd <tmunson@mcs.anl.gov> wrote:<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> Hi,<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> For these problems, how large are they? And are they linear or nonlinear?<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span><br>
> What I can do is use some fancier tools to help with what is going on with<span class="Apple-converted-space"> </span><br>
> the solvers in certain cases.<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> For the results cited above:<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> 100 elements -> 101 dofs<span class="Apple-converted-space"> </span><br>
> 1,000 elements -> 1,001 dofs<span class="Apple-converted-space"> </span><br>
> 10,000 elements -> 10,001 dofs<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> The PDE is linear with simple bounds constraints on the variable: 0 <= u <= 10<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> For Barry's question, the matrix in the SS solver is a diagonal matrix plus<span class="Apple-converted-space"> </span><br>
> a column scaling of the Jacobian.<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> Note: semismooth, reduced space and interior point methods mainly work for<span class="Apple-converted-space"> </span><br>
> problems that are strictly monotone.<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> Dumb question, but monotone in what way?<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> Thanks for the replies!<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> Alex<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> Finding out what is going on with<span class="Apple-converted-space"> </span><br>
> your problems with some additional diagnostics might yield some<span class="Apple-converted-space"> </span><br>
> insights.<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> Todd.<span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
> > On Oct 24, 2019, at 3:36 AM, Smith, Barry F. <bsmith@mcs.anl.gov> wrote:<span class="Apple-converted-space"> </span><br>
> ><span class="Apple-converted-space"> </span><br>
> ><span class="Apple-converted-space"> </span><br>
> > See bottom<span class="Apple-converted-space"> </span><br>
> ><span class="Apple-converted-space"> </span><br>
> ><span class="Apple-converted-space"> </span><br>
> >> On Oct 14, 2019, at 1:12 PM, Justin Chang via petsc-users <petsc-users@mcs.anl.gov> wrote:<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> It might depend on your application, but for my stuff on maximum principles for advection-diffusion, I found RS to be much better than SS. Here’s the paper I wrote documenting the performance numbers I came across<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> https://www.sciencedirect.com/science/article/pii/S0045782516316176<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> Or the arXiV version:<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> https://arxiv.org/pdf/1611.08758.pdf<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> On Mon, Oct 14, 2019 at 1:07 PM Alexander Lindsay via petsc-users <petsc-users@mcs.anl.gov> wrote:<span class="Apple-converted-space"> </span><br>
> >> I've been working on mechanical contact in MOOSE for a while, and it's led to me to think about general inequality constraint enforcement. I've been playing around with both `vinewtonssls` and `vinewtonrsls`. In Benson's and Munson's Flexible Complementarity
Solvers paper, they were able to solve 73.7% of their problems with SS and 65.5% with RS which led them to conclude that the SS method is generally more robust. We have had at least one instance where a MOOSE user reported an order of magnitude reduction in
non-linear iterations when switching from SS to RS. Moreover, when running the problem described in this issue, I get these results:<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> num_elements = 100<span class="Apple-converted-space"> </span><br>
> >> SS nl iterations = 53<span class="Apple-converted-space"> </span><br>
> >> RS nl iterations = 22<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> num_elements = 1000<span class="Apple-converted-space"> </span><br>
> >> SS nl iterations = 123<span class="Apple-converted-space"> </span><br>
> >> RS nl iterations = 140<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> num_elements = 10000<span class="Apple-converted-space"> </span><br>
> >> SS: fails to converge within 50 nl iterations during the second time step whether using a `basic` or `bt` line search<span class="Apple-converted-space"> </span><br>
> >> RS: fails to converge within 50 nl iterations during the second time step whether using a `basic` or `bt` line search (although I believe `vinewtonrsls` performs a line-search that is guaranteed to keep the degrees of freedom within their bounds)<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> So depending on the number of elements, it appears that either SS or RS may be more performant. I guess since I can get different relative performance with even the same PDE, it would be silly for me to ask for guidance on when to use which? In the conclusion
of Benson's and Munson's paper, they mention using mesh sequencing for generating initial guesses on finer meshes. Does anyone know whether there have been any publications using PETSc/TAO and mesh sequencing for solving large VI problems?<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> >> A related question: what needs to be done to allow SS to run with `-snes_mf_operator`? RS already appears to support the option.<span class="Apple-converted-space"> </span><br>
> ><span class="Apple-converted-space"> </span><br>
> > This may not make sense. Is the operator used in the SS solution process derivable from the function that is being optimized with the constraints or some strange scaled beast?<span class="Apple-converted-space"> </span><br>
> >><span class="Apple-converted-space"> </span><br>
> ><span class="Apple-converted-space"> </span><br>
><span class="Apple-converted-space"> </span><br>
<br>
</div>
</div>
</span></blockquote>
<br>
</div>
<div>—
<div>Alp Dener</div>
<div>Postdoctoral Researcher</div>
<div>Argonne National Laboratory</div>
<div>https://www.anl.gov/profile/alp-dener</div>
</div>
</body>
</html>