Gradient operator in one dimension returns scalar
Hello,
I have made a toy 1D problem to get a handle on SUPG for electro-diffusion of particles. The scalar potential is calculated in the usual manner (cf. FEniCS book), and looks good on a plot. Now, curiously, when I try to derive the E-field from this, using:
mesh_funcspace_
efield = project(
...I receive a UFL shape mismatch error. The projection works if I project to a scalar function space--but this baffles me, as obviously the gradient of the scalar potential is a (1D) vector E-field.
(I also tried manual projection, where I get the same error; see below.)
Thanks in advance,
Charl
---------
In [21]: potential
Out[21]: Coefficient(
In [22]: inner(grad(
Shape mismatch.
In [23]: inner(grad(
Out[23]: Form([Integral(
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Charl
- Solved:
- Last query:
- Last reply: