% Imposes (homogeneous) Dirichlet b.c. according to a list of nodes Node_flag % (on the matrix and rhs) % Node_flag(k,1)=1 -> Dirichlet % Node_flag(k,1)=2 -> Neumann % function [K,rhs]=Dirichlet(K,rhs,Node,Node_flagx,Node_flagy,nnode) for k=1:nnode if Node_flagx(k,1)==1, K(:,k) = 0; K(k,:) = 0; K(k,k) = 1; rhs_d(k,1) = 0; end end return