<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 20, 2017 at 11:46 AM, David Fuentes <span dir="ltr"><<a href="mailto:fuentesdt@gmail.com" target="_blank">fuentesdt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<p class="m_802134873794636337gmail-p1"><b>Is there a way to pass the boundary set id to the function pointers for the residual evaluation on the boundary ?</b><br><b></b></p><p class="m_802134873794636337gmail-p1"><b></b></p>
<p class="m_802134873794636337gmail-p2"><b><a href="https://bitbucket.org/petsc/petsc/src/d89bd21cf2b5366df29efb6006298d2bc22fb509/src/dm/dt/interface/dtfe.c?at=master&fileviewer=file-view-default#dtfe.c-4245" target="_blank">https://bitbucket.org/petsc/<wbr>petsc/src/<wbr>d89bd21cf2b5366df29efb6006298d<wbr>2bc22fb509/src/dm/dt/<wbr>interface/dtfe.c?at=master&<wbr>fileviewer=file-view-default#<wbr>dtfe.c-4245</a></b></p>
<p class="m_802134873794636337gmail-p1"><b>I want to pass the boundary condition/constraint ID (ids):<span class="m_802134873794636337gmail-Apple-converted-space"> </span>PetscErrorCode PetscDSAddBoundary(PetscDS ds, DMBoundaryConditionType type, const char name[], const char labelname[], PetscInt field, PetscInt numcomps, const PetscInt *comps, void (*bcFunc)(void), PetscInt numids, const PetscInt *ids, void *ctx)</b><br><b></b></p>
<p class="m_802134873794636337gmail-p2"><b>to the functions for the residual evaluation on the boundary.</b></p>
<p class="m_802134873794636337gmail-p1"><b></b><br></p>
<p class="m_802134873794636337gmail-p2"><b>For example, I have two side sets in an exodus file. I want to implement Neumann boundary conditions on side set = 2 and Mixed/Cauchy BC on side set = 3. Or similarly use different</b></p>
<p class="m_802134873794636337gmail-p2"><b>gmsh BC tags for Neumann/Mixed BC.</b></p></div>
</blockquote></div>I am not completely against this, but let me respond with my rationale first. What I thought you would do, is call AddBoundary() twice. Once with the</div><div class="gmail_extra">Neumann function and value 2, and once with the Cauchy function and value 3. Does that not work in your situation?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, I am refectoring this right now because a DS object can only take a single boundary integral point function (which is a pain for inhomogeneous Neumann),</div><div class="gmail_extra">so I welcome input.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> Thanks,</div><div class="gmail_extra"><br></div><div class="gmail_extra"> Matt<br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>