Dear Sirs,
I have my mesh defined in .*xml. I have my list of nodes from mesh in *.xml.
I am looking for apply a source in this list of nodes.
For exemplo my mesh is in :
https://www.dropbox.com/s/5qvrqew8cnfmj6a/Square3.xml?dl=0
The problem is how to apply a source term in a list of nodes from mesh.
For exemplo this list of nodes:
DATA=[4,5,6,17,18]
Unfortunately I did this simple code, but the list of nodes does not is iqual from array:
from dolfin import*
import sys, math, numpy
mesh = Mesh("Square3.xml")
V = FunctionSpace(mesh, "CG", 1)
B = Function(V)
a=[4,5,6,17,18]
for i in a:
B.vector()[i]=1
plot(B)
Kind regards,
Sr. Costa