Dear Sir
I am not able to understand the Graph. I can explain even better
Here Domain is a unit square with two triangular elements, which means we have 5 edges( 5 unknows at each edge since we are using nedelec element ) and variational form is
K=assemble(inner(curl(u), curl(v))*dx+inner(u,v)*dx)
F=assemble(inner(f,v)*dx)
After solving the above variational form we get, u1, u2,u3,u4, u5 but when I plotted solution u I got only 4 vectors at each node, which I could not understand please help me with that.
full code is
from scipy import constants as S
import numpy as N
from dolfin import *
from mshr import*
import sys
import os
import matplotlib.pyplot as plt
mesh = UnitSquareMesh(1, 1)
V = FunctionSpace(mesh, "Nedelec 1st kind H(curl)", 1)
u = TrialFunction(V)
v = TestFunction(V)
f=Expression(("3-x[1]*x[1]", "3-x[0]*x[0]"), degree=2)
dm = V.dofmap()
#print(vertices(mesh))
def boundary_lr(x, on_boundary):
return near(x[1],1) and on_boundary
A_lr = Constant((2,2))
bc = DirichletBC(V, A_lr, boundary_lr)
K=assemble(inner(curl(u), curl(v))*dx+inner(u,v)*dx)
F=assemble(inner(f,v)*dx)
bc.apply(K, F)
u=Function(V)
solve(K, u.vector(), F)
print(u.vector()[:])
plot(mesh)
c=plot(u)
plt.colorbar(c)
plt.show()
And solution is
u=[2. 2. 2.29772978 3.61269561 2. 2.
3.63632356 1.97884064]
but plot is
My doubt is In graph we have only vectorial representation at node.