<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Oct 29, 2018 at 5:39 AM Fengwen Wang <<a href="mailto:fwan@mek.dtu.dk">fwan@mek.dtu.dk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_361969475093982486divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p><span style="font-size:12pt">Hi Matt and Barry,</span></p>
<p>I only have a regular 2D square domain of a unit cell. </p></div></div></blockquote><div>The boundary condition implies some sort of topology. For example, if you condition was</div><div><br></div><div> u, v (x = 0) = u, v (x = 1)</div><div><br></div><div>you are on a cylinder. And if you add</div><div><br></div><div> u, v (y = 0) = u, v (y = 1)</div><div><br></div><div>you are on a torus. However, you are hooking the right edge to the top edge</div><div>and also transforming the basis. I cannot understand what is meant.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div id="m_361969475093982486divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>How can I use DMPlex to apply such a boundary condition?</p>
<p><br>
</p>
<p>Thanks a lot.</p>
<p><br>
</p>
<p>Best regards</p>
<p>Fengwen<br>
</p>
<p><br>
</p>
<br>
<p></p>
<div id="m_361969475093982486Signature">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div class="m_361969475093982486BodyFragment"><font size="2">
<div class="m_361969475093982486PlainText">____________________________________________________<br>
Senior Researcher<br>
Department of Mechanical Engineering, DTU<br>
Nils Koppels Allé <br>
Building 404 <br>
2800 Kgs. Lyngby <br>
<a href="mailto:fwan@mek.dtu.dk" target="_blank">fwan@mek.dtu.dk</a></div>
</font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_361969475093982486divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Monday, October 29, 2018 10:24:36 AM<br>
<b>To:</b> Barry Smith<br>
<b>Cc:</b> Fengwen Wang; PETSc; PETSc<br>
<b>Subject:</b> Re: [petsc-maint] How to impose boundary conditions using DMDA</font>
<div> </div>
</div>
<div>
<div dir="ltr"><br>
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Sun, Oct 28, 2018 at 12:18 PM Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>> wrote</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Matt,<br>
<br>
How difficult would it be to impose such boundary conditions with DMPlex? Presumably you just connect the mesh up "properly" and it is straightforward?<br>
</blockquote>
<div><br>
</div>
<div>If you figure out what topology is meant by this, it should not be hard. However, I</div>
<div>cannot figure out what they mean right now.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Barry<br>
<br>
<br>
> On Oct 27, 2018, at 10:23 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br>
> <br>
> On Sat, Oct 27, 2018 at 2:02 AM Fengwen Wang <<a href="mailto:fwan@mek.dtu.dk" target="_blank">fwan@mek.dtu.dk</a>> wrote:<br>
> Dear Colleagues,<br>
> <br>
> <br>
> <br>
> I use the finite element method to solve my problem in Petsc.<br>
> <br>
> <br>
> <br>
> Mesh is defined as a regular mesh using DMDA. I have a special boundary condition which I do not know how to impose it in Petsc.
<br>
> <br>
> <br>
> <br>
> In a 2D problem, the domain is unit size, two degrees of freedom per node (u, v). I would like impose the following boundary condition:<br>
> <br>
> <br>
> <br>
> u(x=1) = -v ( y=1) and v(x=1 )= -u (y=1) .<br>
> <br>
> <br>
> <br>
> How can I impose such a boundary condition in Petsc? <br>
> <br>
> In a serial code, you could do this just by equating those variables, but in parallel we have no support for such a boundary condition.<br>
> <br>
> Thanks,<br>
> <br>
> Matt<br>
> Thanks a lot. <br>
> <br>
> <br>
> <br>
> Best regards<br>
> <br>
> Fengwen<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> ____________________________________________________<br>
> Senior Researcher<br>
> Department of Mechanical Engineering, DTU<br>
> Nils Koppels Allé <br>
> Building 404 <br>
> 2800 Kgs. Lyngby <br>
> <a href="mailto:fwan@mek.dtu.dk" target="_blank">fwan@mek.dtu.dk</a><br>
> <br>
> <br>
> -- <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<br>
> <br>
> <a href="https://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">
https://www.cse.buffalo.edu/~knepley/</a><br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="m_361969475093982486m_4259734006606295976gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<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.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><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.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>