<div dir="ltr"><div class="gmail_extra">Hi all,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm still working on my code with dof>>1 and I came to the point where I want to use DMDASetBlcokFills to set the pattern of each block (see ex10.c from advection-diffusion).</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I have a doubt...</div><div class="gmail_extra">Let's imagine I have a system of 2 diffusion equations (dof=2) with one coupling, both with Dirichlet boundary conditions:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">u_t - D u_xx = -k*u*v u(x=0,t)=u(x=L,t)=0</div><div class="gmail_extra">v_t - D v_xx = -k*u*v v(x=0,t)=v(x=L,t)=0</div><div class="gmail_extra"><br>
</div><div class="gmail_extra">If I write everything under IFunction, then the IJacobian is:</div><div class="gmail_extra"><br></div><div class="gmail_extra"> 1 0 |</div><div class="gmail_extra"> 0 1 |</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">-D/dx^2 0 | a+2D/dx^2+kv +ku | -D/dx^2 0</div><div class="gmail_extra"> 0 -D/dx^2 | +kv +ku | 0 -D/dx^2</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">The first block on top represents Dirichlet boundary conditions. The three other blocks are for interior nodes.</div><div class="gmail_extra">
<br></div><div class="gmail_extra">My question is on how to set dfill matrix. For boundary conditions, the diagonal block does not have the same pattern as the one for interior node.</div><div class="gmail_extra">We see that for node i=0, components are just coupled with themselves while for the interior diagonal block, they are coupled one with each other.</div>
<div class="gmail_extra">Then, how to set dfill ? Should it be<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">{1, 0,</div><div class="gmail_extra"> 0, 1 }</div><div class="gmail_extra"><br></div>
<div class="gmail_extra">or</div><div class="gmail_extra"><br></div><div class="gmail_extra">{ 1, 1,</div><div class="gmail_extra"> 1, 1} ?</div><div class="gmail_extra"><br></div><div class="gmail_extra">BTW, does DMDASetBlockFills help during solving or is it just for managing memory ?</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Christophe</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>