Correct, this makes a copy. There really isn't a different way (in
deal.II): Tensor objects own their data, they are not "views", and so
they cannot avoid the copy. Of course, if you don't want to do the copy,
then you can always write out the tensor operation you are interested in
from the original vector elements by hand.
That said: It would greatly surprise me if the copying of elements is
limiting the speed of your program. Have you benchmarked this? Are you
sure that you aren't trying to optimize a part of the program that
doesn't actually need to be optimized?
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/