Dear Kyusik,
 

> I'm sorry to tell you that actually I don't know how to project 
> grad_solution into the vector-valued FE space....
>
> Do you happen to know some example tutorial code that includes it....?
>

Off the top of my head, no I don't know of an example tutorial that 
demonstrates it. But you're effectively solving a least-squares problem for 
the solution gradient so its relatively straight-forward to do:
1. Create a vector-valued finite element system (maybe an 
FESystem<dim>(FE_Q<dim>(1),dim) ) and use it to distribute DoFs onto a new 
DoFHandler.
2. Create a mass matrix "M" with the new DoFHandler.
3. Create a RHS vector "f" of the form f_i = \int_\Omega f(x) \phi_i(x) dx 
. Here f(x) = \grad \psi (x) is the gradient of the solution evaluated at 
point x and \phi_i is a vector-valued shape function. So you need to 
obviously compute the gradient of the solution at all quadrature points 
when doing integration - you would do this with the function I mentioned 
previously.
4. Solve the linear system M.d = f, where "d" represents the (continuous) 
gradient of the solution to the scalar problem.

There's some useful information in the introduction to the VectorTools 
namespace 
<https://www.dealii.org/8.5.0/doxygen/deal.II/namespaceVectorTools.html> 
(namely 
on projection and the form of the RHS vector), so you can look there as 
well for more information. 

As I said before, you could avoid these complexities by expanding your 
original equation into the two separate terms. However, the benefit to the 
projection approach is that you can evaluate this term for one order lower 
polynomial since you don't need to directly compute second derivatives. 
With the projection one might incur some loss of accuracy of the gradient 
field, but I'm not quite sure to what extent this would affect your 
calculation. 

Regards,
Jean-Paul

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