<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 16.06.2011 17:40, Jed Brown wrote:
<blockquote
cite="mid:BANLkTikngjx5qtnWDx+L0oXJi93Vju3A6A@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Thu, Jun 16, 2011 at 17:34, Matthew
Knepley <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:knepley@gmail.com">knepley@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div>Yes, you can do MF applications of A' A. You could just
make a MatShell that called MatMult and MatMultTranspose.</div>
</blockquote>
<div><br>
</div>
<div>MatShell is not necessary, just use MatCreateTranspose().</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/Mat/MatCreateTranspose.html">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-dev/docs/manualpages/Mat/MatCreateTranspose.html</a></div>
</div>
</blockquote>
<br>
That's not very clear to me. I understand what Matthew mean, but can
I use MF without MatShell at all?<br>
So far I imagine it like this:<br>
1. I create matrix using MatCreateShell<br>
2. I set MATOP_MULT and MATOP_MULTTRANSPOSE using
MatShellSetOperation<br>
3. Inside my operations I represent the product (A'*A)v as<br>
w = Av -- using MatMult<br>
f = A'w -- using MatMultTranspose<br>
<br>
Where should I use MatCreateTranspose?<br>
<br>
<blockquote
cite="mid:BANLkTikngjx5qtnWDx+L0oXJi93Vju3A6A@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div><br>
</div>
<div>But I think Alexander is clear on that part.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div>For modifying the matrix, MatGetRow() IF you are using an
AIJ matrix, return a pointer directly to the values.</div>
</blockquote>
<div><br>
</div>
<div>This is only for SeqAIJ.</div>
<div><br>
</div>
<div><br>
</div>
<div>Alexander, could you clarify where in the Gauss-Newton
procedure you outlined is the dense matrix on which you need
to do the nonlinear row operation?</div>
</div>
</blockquote>
<br>
So if my system is:<br>
(A'*A)v=A'r<br>
then A everywhere is transformed.<br>
<br>
There is possibility to compute transformed A directly instead of
applying it afterward as Matthew suggested. It could be through the
using C_tr instead of C in this formula:<br>
A_i = C*F(m)^-1*v<br>
Since I assemble C myself I can apply transformation per element.
That is not as elegant as using chain rule, but still possible. <br>
<br>
<blockquote
cite="mid:BANLkTikngjx5qtnWDx+L0oXJi93Vju3A6A@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div><br>
</div>
<div>Also, the matrix A'*A has a huge null space. What sort of
regularization are you using.</div>
</div>
</blockquote>
<br>
I use Tikhonov regularization. And there is variety of choices for
regularization matrix you use.<br>
<br>
Could you (Matthew and Jed) suggest any solver which is better for
this kind of problem?<br>
<br>
Thanks a lot for your help.<br>
Regards,<br>
Alexander<br>
<br>
</body>
</html>