On 11/02/2016 07:06 AM, hanks0...@gmail.com wrote:
Anyway, what I'm trying to do is to get error = |exact_solution -
numerical_solution| (absolute value of two Deal.II Vector) and then plot this
one using Visit.
But I don't know how to change all elements of error(Deal.II Vector) to
absolute values.
Actually it seems that I can do this by solving (pi_i, pi_j)
(error_j)=(pi_i,std::abs(exact_solution_i - numerical_solution_i)) (i.e.
solving linear system)
But, I wonder if there is more simple way to do that...
There is :-)
for (unsigned int i=0; i<error.size(); ++i)
error(i) = std::fabs(error(i));
Cheers
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
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.
For more options, visit https://groups.google.com/d/optout.