Kyusik,

 //by Han(To get psi0) 
>   Vector<double>::iterator max;
>   max=std::max_element(solution.begin(),solution.end());
>
This can only work if you know that the maximum is attained at one of the 
support_points
of your FiniteElement. In general, you can use 
VectorTools::integrate_difference to find a good approximation
to the maximum value of your solution. 

cell_rhs(i) += (fe_values.shape_value(i, q_index)*
> right_hand_side.value(fe_values.quadrature_point(q_index),
> sol_tmp[q_index],*max) *
> fe_values.JxW (q_index));
>
I don't quite understand this line. Does right_hand_side.value really take 
three arguments? 
How does this resemble x*solution+solution_max/y?


> In other words, I just calculated  (pi_i,pi_j) x J_tor_j=(rhs_i,pi_i)   
>  (where pi is test function)
> It worked, the results are as I expected. But someone said to me it is 
> very inefficient way.
> I agree with that opinion
>
In principle, your approach looks good. You can have a look at the 
implementation of VectorTools::project for improving this.
Why would you think that what you are doing is extremely inefficient?

Best,
Daniel

-- 
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.

Reply via email to