Andrew,

> I've written two functions that take in a std::vector of first order or
> symmetric second order tensor and then project them to the nodes using the
> projection matrix obtained from
> FETools::compute_projection_from_quadrature_points_matrix
> This way you compute the projection_matrix once and can use it multiple
> times. The size of the input vector of tensors at the quadrature points is
> the number of quadrature points of the lhs.
>
> The result is a std::vector of tensors where the size of the vector
> corresponds to the number of nodes.

This looks good to me. Can I ask you to change two things:
- make the name of the two functions the same -- this is what overloading
  in C++ is there for
- in the implementation, you create two n_support_points-by-1 and
  n_quad_points-by-1 matrices and then use mmult. The better way would be to
  use vectors for this purpose and vmult, but you should also consider moving 
  the declaration of these objects out of the loop so that memory allocation
  would not have to happen every time (you'll have to reset to zero the 
  component_at_qp vector using =0 in the loop).

(Nit pick: it's "column", not "collumn" in the comments.)

Let me know if you have an updated patch. Feel free to already move these 
functions into fe_tools.{h,cc} and just send the output of
  svn diff

Best
 W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to