# I have been struggling about having a list of node indices:
#
# nodes = [1, 10, 22, ..., 32]
#
# of nodes at the boundary and an associated list of values
#
# node_values = [10.2, 1.2,0.1, ..., -0.2]
#
# and how to assign this to a function defined on the mesh, in order to use it as boundary conditions, instead of using an analytical function or a constant.
#
# After searchin thoroughly I manage to find a solution that works for low order basis functions, for both scalars and vector. I put here my solution to see if this is the way to do it and how can I extend it to higher order basis functions. Also, if it helps someone: