[petsc-users] several MPIDense functions
Yujie
recrusader at gmail.com
Thu May 20 18:23:51 CDT 2010
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?
Actually, I am always curious that I didn't change the functions
before MatConjugate() in struct MatOps_Values of MPIDense.c. I just
added MatConjugate, MatRealPart, MatImaginaryPart at the end of
MatOps_Values. I don't know where is the errors from? Could you give
me any comments? thanks again.
Regards,
Yujie
On Thu, May 20, 2010 at 4:22 PM, Jed Brown <jed at 59a2.org> wrote:
> On Thu, 20 May 2010 16:17:20 -0500, Yujie <recrusader at gmail.com> wrote:
>> At least, there are "0" and "MatSetSizes" between MatConjugate and
>> MatRealPart in seqdense.c;
>> there are three "0" between MatConjugate and MatRealPart (why not be
>> two "0") in mpidense.c?
>
> The indexing is wrong, run in a debugger and see which function gets
> called. It won't be the one you expect (but the skew should tell you
> where you are off). Or just use petsc-3.1 which has this feature.
>
> Jed
>
More information about the petsc-users
mailing list