### Nodal dirichletbc using pointwise method

51
views
0
8 weeks ago by
I have a list pairs of [(node_coordinates, values)] that I want to apply DirichletBC with method="pointwise". Right now I iterate through the list and apply DirichletBC for each pair in python with something like this:

for each in bcslist:
bcs.append(DirichletBC(V.sub(0), each[1], "near(x[0],"+str(each[0][0]), method="pointwise")
​

This works but as the list grows, it takes very long time to compile through the list. Any suggestions?
Community: FEniCS Project