Evaluating the l2_norm of an MPI::Vector

24 views
Skip to first unread message

Wasim Niyaz Munshi ce21d400

unread,
Apr 13, 2023, 8:22:44 AM4/13/23
to deal.II User Group
Hello everyone. I have a vector distributed over multiple processors. I want to compute the modulus of the entire vector and also the modulus of the portions of vector stored by each process. I would really appreciate some help in this regard.

Regards
Wasim

Wolfgang Bangerth

unread,
Apr 13, 2023, 12:20:38 PM4/13/23
to dea...@googlegroups.com
On 4/13/23 06:22, Wasim Niyaz Munshi ce21d400 wrote:
> **
Wasim:
For the former operation, vector.l2_norm() works. There are similar
functions for l1 and linfinity norms.

The latter operation is uncommon, and so there is no function. Why would
you want to compute the norm of only the elements stored on the current
process?

Best
W.



--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Wasim Niyaz Munshi ce21d400

unread,
Apr 13, 2023, 12:45:28 PM4/13/23
to dea...@googlegroups.com
Thank You Prof. Bangerth. I actually needed the norm of the entire vector only. I was just curious if there existed a function that did it for each processor.

Regards
Wasim

--
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 a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/pxDuRdxQoEo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/d203d5f7-568e-4743-51d3-6388188e5ec0%40colostate.edu.
Reply all
Reply to author
Forward
0 new messages