[petsc-users] several MPIDense functions
Jed Brown
jed at 59a2.org
Thu May 20 18:31:48 CDT 2010
On Thu, 20 May 2010 18:23:51 -0500, Yujie <recrusader at gmail.com> wrote:
> Dear Jed,
>
> Thank you for your help. I have debugged the codes. However, the
> errors appear when running Line 135 of the following codes:
>
> "126: PetscErrorCode MatRealPart(Mat mat)
> 127: {
>
> 133: if (!mat->assembled) SETERRQ(PETSC_ERR_ARG_WRONGSTATE,"Not for
> unassembled matrix");
> 134: if (mat->factor) SETERRQ(PETSC_ERR_ARG_WRONGSTATE,"Not for
> factored matrix");
> 135: if (!mat->ops->realpart) SETERRQ1(PETSC_ERR_SUP,"Mat type
> %s",((PetscObject)mat)->type_name);
> 136: MatPreallocated(mat);
> 137: (*mat->ops->realpart)(mat);
> 138: return(0);
> 139: }"
>
> That mean there is not MatRealPart function for MPIDense. How to check
> which functions I have added some functions for?
For best readability, do
(gdb) set print pretty
Then look at the ops table.
(gdb) print *mat->ops
Locate the slots that you are actually setting, and the ones that you
meant to set.
Jed
More information about the petsc-users
mailing list