This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Do the following two forms have the same meaning

0 votes

Hello,

Say I want to write $a = K*u_0$ , where $K$ is stiffness matrix and $u_0$ is initial condition.

So are the following two forms the same?

k = inner(nabla_grad(u),nabla_grad(v))*dx # stiffness matrix integrand
K = assemble(k) 
a = K*u_0

OR

a = inner(nabla_grad(u_0), nabla_grad(v))*dx
asked Nov 20, 2015 by Chaitanya_Raj_Goyal FEniCS User (4,150 points)
edited Nov 20, 2015 by Chaitanya_Raj_Goyal

1 Answer

0 votes
 
Best answer

These are the same (up to boundary conditions).
It follows from the finite element method. If you
set up
$u = \sum_i u_i N_i$
$u_0$ is the vector containing $u_i$,
$N_i$ is trial function and $N_j$ is test function then you
may prove it by writing out the expressions for K and a.

answered Nov 20, 2015 by Kent-Andre Mardal FEniCS Expert (14,380 points)
selected Nov 23, 2015 by Chaitanya_Raj_Goyal
...