> 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:
bang...@math.tamu.edu
www:
http://www.math.tamu.edu/~bangerth/