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

meaning of "v*dx" assembly where v is a TestFunction

+1 vote

Let's say I have

mesh = UnitIntervalMesh(1)
Q3 = FunctionSpace(mesh, 'CG', 3)
v = TestFunction(Q3)
R = assemble(v*dx)

Is R the vector such that $$R[i] = \int_{x_{i-1}}^{x_{i+1}}{\phi_i(x)dx}$$
where $\phi_i$ is the basis function at node i?

asked Dec 5, 2016 by chaffra FEniCS User (1,830 points)
edited Jul 3, 2017 by chaffra

1 Answer

0 votes

Yes, that is correct.
You can view the resulting vector (and confirm it yourself) with:

print R.array()
answered Dec 6, 2016 by jmmal FEniCS User (5,890 points)
...