Note, you can also run with the option -mat_view and it will print each matrix that gets assembled.
Also in the debugger you can do call MatView(mat,0) > On Apr 1, 2024, at 2:18 PM, Matthew Knepley <[email protected]> wrote: > > This Message Is From an External Sender > This message came from outside your organization. > On Mon, Apr 1, 2024 at 1:57 PM Shatanawi, Sawsan Muhammad via petsc-users > <[email protected] <mailto:[email protected]>> wrote: >> This Message Is From an External Sender >> This message came from outside your organization. >> >> Hello everyone, >> >> I hope this email finds you well. >> >> Is there a way we can check how the matrix looks like after setting it. >> I have tried debugging it with gdb- break points- and print statements, but >> it only gave me one value instead of a matrix. >> >> Thank you in advance for your time and assistance. >> > I usually use MatView(), which can print to the screen. Is that what you want? > > Thanks, > > Matt >> Best regards, >> >> Sawsan >> >> > > > -- > What most experimenters take for granted before they begin their experiments > is infinitely more interesting than any results to which their experiments > lead. > -- Norbert Wiener > > https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bT1jdavVG8lGjxjhujAttmcaK9R1GFUxJtuFl1S2JK74c0mhrCwc2DkQippCFh8qwrk_9x5Dxjv-2H967RRgQPA$ > > <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cFl9o86vmX7ZWINcjhpIy1gzc938wF-1bgwtrPGwm8zQQ71WUgVstEpSos7o1OWqfmTup5bgaekGgXgHtARk$>
