From: Shengli X. <she...@gm...> - 2006-05-17 07:11:36
|
Hi, DenseVector a,b; DenseMatrix C; How to multiply "transpose(a)*C*b" in LibMesh? Thank you! --=20 ShengliXu Department of Engineering Mechanics State Key Laboratory of Structural Analysis for Industrial Equipment Dalian University of Technology Dalian, 116023, P. R. China Email:sh...@st... she...@gm... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D |
From: John P. <pet...@cf...> - 2006-05-17 13:31:29
|
Shengli Xu writes: > Hi, > DenseVector a,b; > DenseMatrix C; > How to multiply "transpose(a)*C*b" in LibMesh? > Thank you! I don't see an interface for multiplying a dense matrix by a dense vector. For the time being, you'll have to do it by hand, the old-fashioned way, with loops. transpose(x)*y is the same thing as x . y (dot product). Here's a pseudocode DenseVector temp; for i for j temp(i) += C(i,j)*b(j); end end Real sum=0; for i sum += a(i) * temp1(i); end |