addExternalVelocityCornerXY

Hello,
In 2D model I need to add dirichlet boundary condition to many nodes. The position of these nodes is saved in stored in a boolean mask. How this can be done, if only addExternalVelocityCornerXY(iX, iY, lattice) is available.
thank you!