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

"gradients of vector fields"

0 votes

Hi

I'm trying to formulate and solve the generalized Laplace equation, but i would like to use edge elements instead of node ones because i had already set up another big part of code using the first ones. My questioning is located in the FFC part, where i have the following ufl form in one integral:

helem = FiniteElement("Nedelec 1st kind H(curl)", tetrahedron, 1)

u = TrialFunction(helem)
v = TestFunction(helem)

Some constants

sigma_r = TensorConstant("tetrahedron")

a = -inner(nabla_grad(u),sigma_rnabla_grad(v))dx # Volume integral form

So my real question is what the nabla_grad(u) has as a result. In the "Fenics book" at page 8 it says that this is the gradient of a vector. What does gradient of a vector mean? I would understand it if it said that this is the divergence of a vector. Does anyone know which is the exact process of the nabla_grad(u), where u is a vector function?

Kind regards and many thanks

asked Apr 3, 2015 by paschal91 FEniCS Novice (240 points)

1 Answer

+1 vote

A gradient of a vector is simply the gradient of each of its components put into a tensor (usually row-wise). You can generalize many operators in this way, e.g., the divergence of a tensor yields a vector, etc. You should however take care that you use a suitable weak form for the edge elements. They are not a straightforward replacement for nodal elements since the function spaces are in H(curl) and not in H^1.

answered Apr 5, 2015 by Christian Waluga FEniCS Expert (12,310 points)
edited Apr 5, 2015 by Christian Waluga
...