<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 2, 2014 at 4:11 AM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
I am trying to use DMPlexCreateSection from fortran. I was<br>
able to solve a Poisson equation earlier using DMPlex for handling<br>
mesh data.<br>
<br>
Now i need to solve a system of equations: (poisson + continuity equations)<br>
<br>
- div (grad phi) = (C + n) --- (1)<br>
div (J ) = 0 --------------- (2)<br>
J = n grad(phi)<br>
( C is constant)<br>
Simulation domain is defined as, rectangular regions 1 and 2 shown below.<br>
<br>
-------------<br>
| 1 |<br>
-------------<br>
| |<br>
| 2 |<br>
| |<br>
--------------<br>
<br>
Now, equation 1 is defined in region 1 and 2<br>
and equation 2 is defined only for region 2.<br>
<br>
How do i setup the section ? DMPlexCreateSection applies the given<br>
DOF layout per cell to all cells in the mesh.<br>
<br>
I am not sure if all the function calls inside<br>
DMPlexCreateSectionIntial and DMPlexCreateSectionBCDof are accessible<br>
from Fotran.<br></blockquote><div><br></div><div>You don't want them anyway since they apply to the whole domain. The control flow could be:</div><div><br></div><div> DMPlexSetChart()</div><div> <loop over region 1></div>
<div> DMPlexSetDof() and DMPlexSetFieldDof()</div><div> <loop over region 2></div><div> DMPlexSetDof() and DMPlexSetFieldDof()</div><div> <loop over BC></div><div> DMPlexSetConstraintDof() and DMPlexSetFieldConstraintDof()</div>
<div> DMPlexSetUp()</div><div> <loop over BC></div><div> DMPlexSetConstraintIndices() and DMPlexSetFieldConstraintIndices()</div><div><br></div><div>We could try and package some of this up if it looks generic.</div>
<div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Thanks<br>
<span class=""><font color="#888888">Reddy<br>
<br>
--<br>
-----------------------------------------------------<br>
Dharmendar Reddy Palle<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>