%---------------------------------------------------------------- 
%                           BC.m
%---------------------------------------------------------------- 
%       
%      For each increment of the analysis, the following       
%      values must be specified at each node        
%       
%      PHIa   = ambient value of PHI
%         Q   = specfied point source multiplied by DTIME
%        QS   = specfied flux on surface
%        HS   = coefficient for convective transfer of PHI
%      NPBC   = nodal point boundary condition
% 
%       PHI   = current value of PHI if changing with time.
%               Need not be specified if it remains constant.
% 
%---------------------------------------------------------------- 
for I=1:NUMNP
   code=NPcode(I);
   if code == 0              % node not on boudary
      PHIa(I) = 0.;
      Q(I)    = 0.;
      NPBC(I) = 0;
      HS(I)   = 0.;
      QS(I)   = 0.;
   elseif code == 1          % point is on  boundary
      PHIa(I) = 0;;          % set ambient temperature
      Q(I)    = 0.;          % no point source
      NPBC(I) = 1;           % temperature unknown
      HS(I)   = 0;           % coefficient of thermal convection
      QS(I)   = 0;           % specified surface flux
      PHI(I)  = 3*XORD(I) -5*YORD(I);
   end
end



