<div dir="ltr">On Fri, Apr 19, 2013 at 7:36 PM, Dharmendar Reddy <span dir="ltr"><<a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hello,<br></div> I need to assemble the operators for an eigenvalue problem. <br>
</div>Consider for example a 1D Schrodinger equation<br><br></div>-div(grad(psi)) = E psi for x in [0, L] and psi(0) = 0 and psi(L) = 0<br>
<br></div>I understand how to get the 1D mesh into a DM object. <br><br></div><div>I was thinking to create the default section using 1 scalar field per node add boundary points.<br></div><div><br></div><div>Use DMCreateMatrix to get the operators.<br>
<br></div><div>Now if i do element by element assembly, <br>Do i need to use matsetclosure or masetvalues?<br></div></div></div></blockquote><div><br></div><div style>MatSetClosure() just calls GetTransitiveClosure()+SectionGetOffset() to</div>
<div style>translate points to indices, and then calls MatSetValues(). In some sense,</div><div style>its a convenience method.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>how are the elements with boundary nodes handled ?<br></div></div></div></blockquote><div><br></div><div style>You choose. If you want boundary dofs eliminated, use the mechanism in the PetscSection.</div>
<div style>Otherwise, use the linear algebra tools like MatZeroRowsColumns().</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>
</div><div>Are the values for boundary nodes ignored ?<br></div></div></div></blockquote><div><br></div><div style>See above.</div><div style><br></div><div style> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div></div><div>I will pass the assembled operators to slepc to solve the eigenvalue problem. <br><br></div><div>Thanks<span class="HOEnZb"><font color="#888888"><br>Reddy<br></font></span></div><span class="HOEnZb"><font color="#888888"><div>
<br></div></font></span></div><span class="HOEnZb"><font color="#888888"><div><div><div><div><div><div><div><div><div><br><br>-- <br>-----------------------------------------------------<br>
Dharmendar Reddy Palle<br>Graduate Student<br>Microelectronics Research center,<br>University of Texas at Austin,<br>10100 Burnet Road, Bldg. 160<br>MER 2.608F, TX 78758-4445<br>e-mail: <a href="mailto:dharmareddy84@gmail.com" target="_blank">dharmareddy84@gmail.com</a><br>
Phone: <a href="tel:%2B1-512-350-9082" value="+15123509082" target="_blank">+1-512-350-9082</a><br>United States of America.<br>Homepage: <a href="https://webspace.utexas.edu/~dpr342" target="_blank">https://webspace.utexas.edu/~dpr342</a><br>
</div></div></div></div></div></div></div></div></div></font></span></div>
</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>