function [Nodeu] = bc_maxrule(Nodeu, maxbcid_u, maxbcid)
%function [Nodeu] = bc_maxrule(Nodeu, maxbcid_u, maxbcid)

if maxbcid_u < maxbcid
    ids = Nodeu > maxbcid_u;
    Nodeu(ids) = Nodeu(ids) + maxbcid - maxbcid_u;
end