[petsc-users] Problems of Viewing Mat with MATLAB format
Yaoyu Hu
huyaoyu1986 at gmail.com
Wed Sep 7 01:42:01 CDT 2016
Thank you Barry. I put the new codes in the source by hand and it works fine.
HU Yaoyu.
>
> Thanks for reporting this. It is our error. Please find attached the patch that resolves the problem
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: matviewmatlab.patch
> Type: application/octet-stream
> Size: 900 bytes
> Desc: not available
> URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160906/f05d01f5/attachment.obj>
> -------------- next part --------------
>
>
> I have also fixed this in the maint and master branches.
>
> Barry
>
>> On Sep 6, 2016, at 2:48 AM, Yaoyu Hu <huyaoyu1986 at gmail.com> wrote:
>>
>> Hi everyone,
>>
>> I want to view a parallel dense Mat with MATLAB format. I use the
>> following method.
>>
>> ========= Sample codes. =========
>>
>> /* Set the name of the Mat.*/
>> PetscObjectSetName()
>>
>> /* View the Mat. */
>> PetscViewerASCIIOpen()
>> PetscViewerPushFormat()
>> MatView()
>> PetscViewerDestroy()
>>
>> ====== End of sample codes. =======
>>
>> However, after the Mat has been viewed, the MATLAB object?s name is
>> not the same with that specified by PetscObjectSetName(). The
>> resultant MATLAB file looks like this:
>>
>> ========= Sample viewed file in MATLAB format. ==========
>>
>> %Mat Object:Mat_ElementLastFaceVelocity 8 MPI processes
>> % type: mpidense
>> % Size = 16000 18
>> Mat_0x1370b20_7 = zeros(16000,18);
>> Mat_0x1370b20_7 = [
>>
>> ======= End of sample viewed file in MATLAB format. ========
>>
>> The Mat Object has the right name but the MATLAB object has the name
>> Mat_0xxxxxxx. How can I make the MATLAB object has the same name with
>> the Mat object?
>>
>> I also checkout the output for Vec object. The resultant MATLAB file
>> has the right names for both Vec object and MATLAB object.
>>
>> Thanks!
>>
>> P.S.: I am using Version 3.7.0
>>
>> HU Yaoyu
>
More information about the petsc-users
mailing list