[petsc-users] MatView and complex matrices

Barry Smith bsmith at mcs.anl.gov
Tue Apr 1 13:54:09 CDT 2014


On Apr 1, 2014, at 1:28 PM, Jed Brown <jed at jedbrown.org> wrote:

> Torquil Macdonald Sørensen <torquil at gmail.com> writes:
> 
>> On 01/04/14 16:41, Jed Brown wrote:
>>> Torquil Macdonald Sørensen <torquil at gmail.com> writes:
>>> 
>>> The complex version could make two plots.
>> 
>> Yes, that would be very useful.
> 
> Hmm, this would be nicer if PETSc plotting had "subfig" capability.

   It does. In a couple of different ways. 

1) PetscViewerDrawGetDraw(viewer,window number,&draw) allows you to create any number of draw windows associated with a Draw viewer, so if complex just request another draw for the imaginary part

2) PetscDrawViewPortsCreate() and friends. ViewPorts are like subfig

  In this case since you are starting with a viewer I would use 1.

   I intended a long time ago to merge the two concepts so one could trivially switch between having multiple viewports in the same window and multiple windows but life got in the way.

   Barry




More information about the petsc-users mailing list