Pass vector value to function when using MPI

When running with MPI, your mesh is distributed. This means that all processes do not contain all cells, which also means that all processes do not have all degrees of freedom.

As it seems like you are assuming a 1-1 relationship between the input vertices and your degrees of freedom, you should consider: How to apply a boundary condition to a range of DOFs? - #9 by dokken