<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px;">
<div>
<div><font face="Calibri,sans-serif">I am not 100% confident because I am not sure how libMesh handles the Dirichlet boundary conditions, I checked it with MatIsSymmetric() and obtained 1 as the response. Please find attached the binary files (I set up the
 viewer with </font>PetscViewerSetFormat(viewer, PETSC_VIEWER_DEFAULT); hope that’s the right way)</div>
<div style="font-family: Calibri, sans-serif; color: rgb(0, 0, 0);"><br>
</div>
<div style="font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">Thanks</div>
</div>
<div style="font-family: Calibri, sans-serif; color: rgb(0, 0, 0);"><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-family: Calibri, sans-serif; color: rgb(0, 0, 0);">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, January 20, 2016 at 9:47 AM<br>
<span style="font-weight:bold">To: </span>Miguel Salazar <<a href="mailto:salazardetro1@llnl.gov">salazardetro1@llnl.gov</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>" <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [petsc-users] Preconditioners for KSPSolveTranspose() in linear elasticity<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Jan 20, 2016 at 11:35 AM, Salazar De Troya, Miguel
<span dir="ltr"><<a href="mailto:salazardetro1@llnl.gov" target="_blank">salazardetro1@llnl.gov</a>></span> wrote:<br>
<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">
<div style="word-wrap:break-word">
<div>
<div style="color:rgb(0,0,0)">Hello</div>
<div style="color:rgb(0,0,0)"><br>
</div>
<div style="color:rgb(0,0,0)">I am trying to speed up a two dimensional linear elasticity problem with isotropic and heterogeneous properties. It is a topology optimization problem, therefore some regions have an almost zero stiffness whereas other regions
 have a higher value, making the matrix ill-conditioned. So far, from having searched mail lists on similar problems, I have come up with the following CL options to pass to the petsc solver (two dimensional problem):</div>
<div style="color:rgb(0,0,0)"><br>
</div>
<div style="color:rgb(0,0,0)">-ksp_type cg -pc_type fieldsplit -pc_fieldsplit_block_size 2 -fieldsplit_pc_type hypre -fieldsplit_pc_hypre_type boomeramg -fieldsplit_pc_hypre_boomeramg_strong_threshold 0.7 -pc_fieldsplit_0 0,1 -pc_fieldsplit_type symmetric_multiplicative
 -ksp_atol 1e-10</div>
<div style="color:rgb(0,0,0)"><br>
</div>
<div>It works reasonably well and shows similar number of iterations for different levels of refinement. However, it does not converge when I use the same options for KSPSolveTranspose(). I obtain DIVERGED_INDEFINITE_PC after three iterations. I believe this
 has to do with the field split, but I do not where to start. I am using libMesh which interfaces with petsc through the file petsc_linear solver.C (<a href="http://libmesh.github.io/doxygen/classlibMesh_1_1PetscLinearSolver.html#a4e66cc138b52e80e93a75e55315245ee" target="_blank">http://libmesh.github.io/doxygen/classlibMesh_1_1PetscLinearSolver.html#a4e66cc138b52e80e93a75e55315245ee</a>)
 The KSPSolveTranspose() is called in adjoint_solve(). Changing that to KSPSolve() solves the issue and to me it is not a problem because my matrix is symmetric, but I don’t want to have to change it in the libMesh source code. So the question is, why do those
 CL options not work for the KSPSolveTranspose() despite having a symmetric matrix? </div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>1) Are you sure the matrix itself is symmetric? It could have boundary conditions that break this symmetry.</div>
<div><br>
</div>
<div>2) This sounds like a bug in PCApplyTranspose_FieldSplit() since I am almost certain it is not tested.</div>
<div><br>
</div>
<div>3) Can you send the matrix and rhs? This should be easy by using MatView() for a binary viewer.</div>
<div><br>
</div>
<div>  Thanks,</div>
<div><br>
</div>
<div>    Matt</div>
<div> </div>
<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">
<div style="word-wrap:break-word">
<div>Thanks</div>
</div>
</blockquote>
</div>
-- <br>
<div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>