The easy way is to do
const unsigned int n = vec.size();
FullMatrix<double> o_p (n,n);
for (unsigned int i=0; i<n; ++i)
for (unsigned int j=0; j<n; ++j)
o_p(i,j) = vec[i] * vec[j];
But the issue is that generally you end up with a full matrix this way. Is
that what you want? How large are your vectors?
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/