# Changes

,  14:19, 19 July 2012
no edit summary
We want to solve the equation
$-\mathrm{div}\ ( \varepsilon\ \nabla u(x, y) - \nabla \varphi(x,y)\ u(x, y) ) ) + u(x, y) = 1 \qquad in \Omega$$\varphi(x, y)\ =\ x + y$ with mixed Dirichlet / Neumann boundary conditions
$\varphiu(x, y)\ =\ u_d(x + , y )\qquad \mbox{ on } \Gamma_D$
$-( \varepsilon\ \nabla u(x, y) - \nabla \varphi(x,y)\ u(x, y) ) \cdot \mathbf{n} \qquad \mbox{ on } \Gamma_N$
<b> Create the mesh and precompute the mesh properties </b>
<b> Construct an initial guess</b>
For a We need this even if our problem is linear problem only and stationaryas we are going to use the values at boundary nodes are actually relevant<br>to set Dirichelet boundary conditions. Get the node coordinates from the mesh structure
<pre>
xu = mesh.p(1,:).';
yu = mesh.p(2,:).';
nelems = columns(mesh.t);</pre>nnodes = columns(mesh.p); <pre>
uin = 3*xu;
</pre>
<b> Set the coefficients for the problem:</b>
Get the number of elements and nodes in the mesh

<pre>
nelems = columns(mesh.t);
nnodes = columns(mesh.p);
</pre>
<pre>
epsilon = .1;
alfa = ones(nelems,1);gamma = ones(nnodes,1);eta phi = epsilon*ones(nnodes,1);beta = xu+yu;delta = ones(nelems,1);zeta = ones(nnodes,1);f = ones(nelems,1);g = ones(nnodes,1);
</pre>
<pre>