%% initial conditions for reservoar.m
%clear all;
%close all;
%clc;
%
A=zeros(size(xl,2),size(xl,2));
b=zeros(size(xl,2),1);
% boundary conditions
A(1,1)=1;
b(1)=Pbh;
A(end,end)=1;
b(end)=Pres;
%
    for i=2:size(xl,2)-1
        A(i,i-1)=( (1/(h^2))-(1/(2*i*h^2)) );
        A(i,i)= -2/(h^2);
        A(i,i+1) = ( (1/(h^2))+(1/(2*i*h^2)) );
    end
 % 
 P(:,1)=A\b;
 clear A b 
    