This is one way to do it. You are just projecting J_tor to a finite
    element space and use that for output or further processing. As others
    have already noted, the only problem I can see is that computing
    solution_max may be inaccurate. This is because in general, if you have
    a finite element function
       u_h(x) = \sum_i \varphi_i(x) U_i
    then
       max_{x \in \Omega} u_h(x)
    is not the same as
       max_i U_i

    For (bi-,tri-)linear functions the two are the same but for higher order
    finite elements, that is not the case.


you mean that solution is not u_h(x) but U_i. is it right?

Well, both are the solution -- one is a function of x, the other is a vector of nodal values, but they ultimately represent the same object. U_i is the vector you get out of the linear solver.


Then, is there other way to get maximum value of solution for higher order
finite elements?

Not easily. To see the problem, think about using quadratic finite elements in 1d. Let's say you have only one cell [0,1], so the shape functions are defined at x=0, x=1/2, and x=1. Assume you have nodal values 1,0,0, then your solution vector is

  u_h(x)  =  sum_i  U_i \varphi_i(x)  =  1 * \varphi_0(x)
          =  2(1-x)(1/2-x)
          =  1 - 3x + 2x^2

Note that while the minimal value of U_i is zero, the function u_h(x) has a mimimum at u_h'(x)=-3+4x=0, i.e., at x=3/4 where its value is
  u_h(3/4) = 1 - 9/4 + 2*9/16 = -1/8

In other words, even though your nodal values are 1,0,0, the minimum of this function is -1/8 < 0 !

In general, the location and the value of the minimum depend in complex ways on the nodal values and can not easily be predicted. The best you can do is to use a quadrature formula with sufficiently many points and sample the solution at these points to get upper bounds for the minimum, and lower bounds for the maximum of the solution function u_h(x).

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to