<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>I could have posted my message on the user list but it seems to
me that it's more in the petsc development part. Don't hesitate to
tell me if I'm wrong.<br>
I am developing a code called cafes that studies fluid-particle
interactions in a Stokes fluid. For that, we implemented the whole
solver in matrix free on a cartesian grid. The preconditioner is
naturally a geometrical multigrid for the velocity. The set of
matrix free for each level is set by hand (I worked with Matthew
on this a long time ago now!). <br>
I would have liked to implement telescope on this part. I started
it but I didn't get out of it. So I would like to have your help.<br>
What I tried to do was to describe my classical multigrid up to a
level N1 and then take the coarse solver and apply the telescope
preconditioner to it up to a level N2. I don't know if this is the
best way but it seemed the most intuitive. The problem is that I
could not get the coarse matrix because the setup is not done yet
(I use a DMKSPSetComputeOperators for the matrices). <br>
</p>
<p>The construction of the matrix free for each level is here:
<a class="moz-txt-link-freetext" href="https://github.com/gouarin/cafes/blob/master/cafes/problem/stokes.hpp#L59-L88">https://github.com/gouarin/cafes/blob/master/cafes/problem/stokes.hpp#L59-L88</a></p>
<p>The description of the Stokes preconditioner is described here :
<a class="moz-txt-link-freetext" href="https://github.com/gouarin/cafes/blob/master/cafes/problem/stokes.hpp#L109-L162">https://github.com/gouarin/cafes/blob/master/cafes/problem/stokes.hpp#L109-L162</a></p>
<p>I have tried multiple implementations without success. For me,
the start is to add at line 105 something like</p>
<div style="color: #d4d4d4;background-color: #1e1e1e;font-family: Menlo, Monaco, 'Courier New', monospace;font-weight: normal;font-size: 12px;line-height: 18px;white-space: pre;"><div><span style="color: #57a64a;">KSP coarse;</span></div><div><span style="color: #57a64a;">ierr = PCMGGetCoarseSolve(pc_i, &coarse);CHKERRQ(ierr);</span></div><span style="color: #57a64a;">
</span></div>
<div style="color: #d4d4d4;background-color: #1e1e1e;font-family: Menlo, Monaco, 'Courier New', monospace;font-weight: normal;font-size: 12px;line-height: 18px;white-space: pre;"><span style="color: #57a64a;">PC pc_coarse;</span><div><span style="color: #57a64a;">ierr = KSPGetPC(coarse, &pc_coarse);CHKERRQ(ierr);</span></div><div><span style="color: #57a64a;">ierr = PCSetType(pc_coarse, PCTELESCOPE);CHKERRQ(ierr);</span></div></div>
<div><span style="color: #57a64a;"><br>
</span></div>
<div>Then, to create the several matrices of the levels of
TELESCOPE, I thought using the same process as before with
DMKSPSetComputeOperators. But it doesn't work...<br>
</div>
<div>Could you tell me how I can make it work ?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Loic<br>
</div>
<div><br>
</div>
<div><span style="color: #57a64a;"></span></div>
</body>
</html>