<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Alright, I see the source of my confusion: I've now seen three different that are all called a "Constrained Pressure Residual" preconditioner. What I have generally seen is exactly what Matt describes: R is just a restriction to a subset of DoFs (pressure,
and sometimes saturation), and P is just R' (using Matlab notation here). A CPR preconditioner in which P differs from R' is not something I've seen until now.<br>
<br>
I'll see if I can think of a succinct change to the documentation for PCFIELDSPLIT to describe the two cases and submit a pull request.<br>
<br>
--Richard<br>
<br>
<div class="moz-cite-prefix">On 3/3/19 8:38 AM, Jed Brown wrote:<br>
</div>
<blockquote type="cite" cite="mid:87imwzykum.fsf@jedbrown.org">
<pre class="moz-quote-pre" wrap="">Matthew Knepley <a class="moz-txt-link-rfc2396E" href="mailto:knepley@gmail.com"><knepley@gmail.com></a> writes:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On Sun, Mar 3, 2019 at 12:58 AM Jed Brown via petsc-dev <
<a class="moz-txt-link-abbreviated" href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">My take is that someone looking for CPR is more likely to end up on the
PCFIELDSPLIT manual page than the PCGALERKIN page. The solver you have
configured in your mail is not the CPR we have been asked about here.
See Barry's message and example code below.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Thanks for retrieving this Jed. I am sure Richard and I both have the same
question. Perhaps I am being an idiot.
I am supposing that R is just a restriction to some subset of dofs, so its
just binary, so that R A P just selects that
submatrix.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Look at the source. These are not subsets:
/*
Apply the restriction operator for the Galkerin problem
*/
PetscErrorCode ApplyR(Mat A, Vec x,Vec y)
{
PetscErrorCode ierr;
PetscInt b;
PetscFunctionBegin;
ierr = VecGetBlockSize(x,&b);CHKERRQ(ierr);
ierr = VecStrideGather(x,0,y,INSERT_VALUES);CHKERRQ(ierr);
for (PetscInt k=1;k<b;++k) {ierr = VecStrideGather(x,k,y,ADD_VALUES);CHKERRQ(ierr);}
PetscFunctionReturn(0);
}
/*
Apply the interpolation operator for the Galerkin problem
*/
PetscErrorCode ApplyP(Mat A, Vec x,Vec y)
{
PetscErrorCode ierr;
PetscInt offset = 1;
PetscFunctionBegin;
ierr = VecStrideScatter(x,offset,y,INSERT_VALUES);CHKERRQ(ierr);
PetscFunctionReturn(0);
}
</pre>
</blockquote>
<br>
</body>
</html>