<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="qrichtext" content="1">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi,</div>
<div><br>
</div>
<div>I am trying to solve a 2 dimensional finite difference reaction diffusion problem where diffusional coupling is position based, i.e. fibres, discontinuities etc occur due to material properties (e.g. Heart tissue).</div>
<div><br>
</div>
<div>I have managed to import a matlab matrix representing coupling in four directions as below:</div>
<div><br>
</div>
<div>
<pre style="margin-top: 0px; margin-bottom: 0px;">    PetscViewerBinaryOpen(PETSC_COMM_WORLD,”R",FILE_MODE_READ,&fd);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;">    VecCreate(PETSC_COMM_WORLD,&R);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;">    VecLoad(R,fd);<!--EndFragment--></pre>
</div>
<div><br>
</div>
<div>…..Repeated to get L, U, D, coupling.</div>
<div><br>
</div>
<div>How can I now make R,L,U,D available to my finite difference part of the code? So that I can do</div>
<div><br>
</div>
<div><br>
</div>
<div>v is field.</div>
<div><br>
</div>
<div>
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment-->vxx = u[j][i].R*(u[j][i-1].v - u[j][i].v)  + u[j][i].L*(u[j][i+1].v – u[j][i].v);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;">And similarly for up & down coupling.</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><br></pre>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;">
<div><br>
</div>
<div>Thanks</div>
<div>Mohammad Imtiaz</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</span>
</body>
</html>