[petsc-dev] KSP accepts mismatched sizes between Mat and PC

Alp Dener alp.dener at gmail.com
Mon Apr 16 13:57:58 CDT 2018


Sounds good. The fact that it isn’t checking for size is helpful for my use
case as well. I just wanted to make sure it wasn’t a bug.

—
Alp Dener

On April 16, 2018 at 1:56:30 PM, Smith, Barry F. (bsmith at mcs.anl.gov) wrote:

Normally they need to be the same, but not always. For KSPLSQR the A matrix
may be rectangular but the B matrix is A^TA which is square. This special
case is why we don't do error checking.

Barry


> On Apr 16, 2018, at 1:04 PM, Alp Dener <alp.dener at gmail.com> wrote:
>
> Hi Barry,
>
> While I was working on some active-set related stuff in TAO, I discovered
that I can call KSPSetOperators() with differently sized Mat and PC objects
without getting any errors or warnings about the size mismatch. Note that
my Mat object is explicit, but the PC object is a MATSHELL. Is this
intended behavior, or is it a bug?
>
>> Alp Dener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20180416/4ef5f002/attachment.html>


More information about the petsc-dev mailing list