[petsc-users] how to visualize the matordering?

Barry Smith bsmith at petsc.dev
Tue Sep 10 08:09:08 CDT 2024


   You can save the plot in an image file that does not require X. For example

    -mat_view_ordering draw:image:filename   

   Several image formats are available.


   Barry


> On Sep 10, 2024, at 7:36 AM, Klaij, Christiaan <C.Klaij at marin.nl> wrote:
> 
> I'm saving a petsc mat to file and loading it into python to make a spy plot of its sparsity pattern, so far so good. 
> 
> Now I would like to compare with a reordened pattern, say rcm. I've notice the option -mat_view_ordering draw, but do not have X Windows on this machine. What is the recommended way to get the reordened matrix for inspection?
> 
> Chris
> <image859244.png>
> dr. ir.​​​​ 	Christiaan	 Klaij
>  | 	Senior Researcher	 | 	Research & Development	
> T +31 317 49 33 44 <tel:+31%20317%2049%2033%2044>	 | 	 C.Klaij at marin.nl <mailto:C.Klaij at marin.nl> 	| https://urldefense.us/v3/__http://www.marin.nl__;!!G_uCfscf7eWS!cB3QbQAW-a4JBnC6ienjVNxxG6Tu93rh2v5D0sKWoMilcEnEoHpZ5t6yP-XPhz9FiAGj8ULbp-EHk-ndDfGJ_wo$  <https://urldefense.us/v3/__https://www.marin.nl/__;!!G_uCfscf7eWS!ZlpBqrxu1xOtAsOWM9zgbuOyULFV7FmZJfrJqgSnScyCr8z-tfyvuf3b2aXiy8qER3gQEm4Qu44oMudMb3ZvYBA$>
> <image612326.png> <https://urldefense.us/v3/__https://www.facebook.com/marin.wageningen__;!!G_uCfscf7eWS!ZlpBqrxu1xOtAsOWM9zgbuOyULFV7FmZJfrJqgSnScyCr8z-tfyvuf3b2aXiy8qER3gQEm4Qu44oMudMrq6nsrQ$>	
> <image769878.png> <https://urldefense.us/v3/__https://www.linkedin.com/company/marin__;!!G_uCfscf7eWS!ZlpBqrxu1xOtAsOWM9zgbuOyULFV7FmZJfrJqgSnScyCr8z-tfyvuf3b2aXiy8qER3gQEm4Qu44oMudMuNr3Ucw$>	
> <image635531.png> <https://urldefense.us/v3/__https://www.youtube.com/marinmultimedia__;!!G_uCfscf7eWS!ZlpBqrxu1xOtAsOWM9zgbuOyULFV7FmZJfrJqgSnScyCr8z-tfyvuf3b2aXiy8qER3gQEm4Qu44oMudMadib6bE$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240910/94a061f0/attachment-0001.html>


More information about the petsc-users mailing list