The manual page (assuming cell_matrix is a FullMatrix)

https://dealii.org/developer/doxygen/deal.II/classFullMatrix.html#abdd86a102fefa37a3916a612d8e329bd

says there is an option “zero_string”, may be set it to “0” and try it.

best
praveen

> On 17-May-2023, at 8:28 PM, Vinayak Vijay <vinayak....@gmail.com> wrote:
> 
> Hello,
> 
> I am trying to print out a matrix to a file using the following commands:
> 
> std::ofstream file("mat.txt");
> cell_matrix.print_formatted(file);
> 
> However, the matrix that is printed out to the file has some missing
> entries, which are actually 0.
> 
> Can someone tell me how can i print the 0 entries as well?
> 
> Thanks
> Vinayak
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/49b4be8d-1f9a-41ce-8b20-d0cb81a32dean%40googlegroups.com.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/B06064C4-57E6-4257-945D-78CC7E2E53E2%40gmx.net.

Reply via email to