[petsc-users] Invalid MAT_CLASSID

Harshad Sahasrabudhe hsahasra at purdue.edu
Mon Oct 20 15:17:01 CDT 2014


I get the Mat object from libMesh::PetscMatrix<>::mat()
<http://libmesh.github.io/libmesh/doxygen/classlibMesh_1_1PetscMatrix.html#aaca7a5afeb063716ee67fa11302c2aea>,
and it's been created and assembled before I call MatGetType.

On Mon, Oct 20, 2014 at 4:12 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Mon, Oct 20, 2014 at 3:07 PM, Harshad Sahasrabudhe <hsahasra at purdue.edu
> > wrote:
>
>> Hi,
>>
>> I get the following error when I call MatGetType even though I'm calling
>> the function with a Mat object.
>>
>> [0]PETSC ERROR: Invalid argument!
>> [0]PETSC ERROR: Wrong type of object: Parameter # 1!
>>
>> What could be going wrong?
>>
>
> You are not calling it with a valid Mat object. Did you call MatCreate?
>
>    Matt
>
>
>> Thanks,
>> Harshad
>>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141020/00a47e4d/attachment-0001.html>


More information about the petsc-users mailing list