Thanks for the fast reply, this is exactly what I needed!

El miércoles, 22 de junio de 2016, 19:38:35 (UTC+2), bangerth escribió:
>
>
> > I am solving an eigenvalue problem similar than step-36. After solving 
> for the 
> > eigenpairs, I evaluate the eigenfunctions in the standard way: 
> > 
> >          VectorTools::point_value ( mapping, dof_handler, efun[m], 
> > q_points[j], Uq ); 
> > 
> > where: efun[m] is the m-th eigenfunction from step-36, 
> > q_points[j] are selected quadrature points, 
> > Uq is where I store the FE evaluation. 
> > 
> > As expected, this operation is awfully slow! it takes seconds for a 
> single 
> > point evaluation with a decent discretization and having m 
> eigenfunctions 
> > makes it worse! 
>
> Yes. But there is a much more efficient way to do this: 
>    FEValues fe_values (...); 
>    std::vector<double> sol_at_q_points (...); 
>    for (cell=...) 
>      { 
>         fe_values.reinit (cell); 
>         fe_values.get_function_values (efun[m], sol_at_q_points); 
>
> This gives you the values of efun[m] at all quadrature points on the 
> current 
> cell at once, and this approach is efficient and independent of the 
> overall 
> size of the problem. 
>
> Best 
>   W. 
>
> -- 
> ------------------------------------------------------------------------ 
> Wolfgang Bangerth               email:            [email protected] 
> <javascript:> 
>                                  www: http://www.math.tamu.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