<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 31, 2017 at 10:00 PM, Justin Pogacnik <span dir="ltr"><<a href="mailto:j.pogacnik@auckland.ac.nz" target="_blank">j.pogacnik@auckland.ac.nz</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" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Thanks Matt! That works perfectly now. I have another question regarding accessing the quadrature information.<br>
</p>
<p><br>
</p>
<p>When I use PetscFEGetQuadrature(), then PetscQuadratureView(), I see what I expect regarding point locations, weights.<br>
</p>
<p><br>
</p>
<p>However, when I try to use PetscQuadratureGetData() the pointers seem to point to random memory locations. <br>
</p>
<p><br>
</p>
<p>The exact line from my test problem is: call PetscQuadratureGetData(quad,q_<wbr>nc,q_dim,q_num,pq_points,pq_<wbr>weights,ierr);<br>
</p>
<p>where the pq_* are the pointers giving strange output. The q_nc, q_dim, and q_num are all giving what I would expect to see. </p></div></blockquote><div>You are clearly the first Fortran user interested in this stuff ;) Handling of arrays in Fortran demands some more work</div><div>from us. I need to write a wrapper for that function. I will do it as soon as I can.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Happy to send along the file if that helps.<br>
</p>
<p><br>
</p>
<p>Thanks again,<br>
</p>
<p><br>
</p>
<p>Justin<br>
</p>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div id="m_-2885720920021194062divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
<b>Sent:</b> Thursday, June 1, 2017 1:34 AM<br>
<b>To:</b> Justin Pogacnik<br>
<b>Cc:</b> <a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [petsc-users] PetscFECreateDefault in Fortran</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, May 31, 2017 at 7:53 AM, Matthew Knepley <span dir="ltr">
<<a href="mailto:knepley@gmail.com" target="_blank">knepley@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">
<div class="gmail_extra">
<div class="gmail_quote"><span>On Tue, May 30, 2017 at 10:19 PM, Justin Pogacnik <span dir="ltr">
<<a href="mailto:j.pogacnik@auckland.ac.nz" target="_blank">j.pogacnik@auckland.ac.nz</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" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello,</p>
<p>I'm developing a finite element code in fortran 90. I recently updated my PETSc and am now getting the following error during compile/linking on an existing application:<br>
</p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span>Undefined symbols for architecture x86_64:</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span> "_petscfecreatedefault_", referenced from:</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span> _MAIN__ in fe_test.o</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span>ld: symbol(s) not found for architecture x86_64</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span>collect2: error: ld returned 1 exit status</span></p>
<p style="margin-right:0px;margin-left:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span>make: *** [dist/fe_test] Error 1</span></p>
<p><br>
</p>
<p>I'm running Mac OS X Yosemite (10.10.5). I've created a "minimum working example" (attached) that re-creates the problem. It's basically just dm/impls/plex/examples/tu<wbr>torials/ex3f90, but tries to create a PetscFE object. Everything goes fine and the
DM looks like what is expected if PetscFECreateDefault is commented out. Any idea what am I missing?</p>
</div>
</blockquote>
</span>
<div>Yes, I had not made a Fortran binding for this function. I will do it now.</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I have merged it to the 'next' branch, and it will be in 'master' soon.</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">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> <br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<div><font size="3">Many thanks!</font></div>
<span class="m_-2885720920021194062m_-7360822853962826608m_8823127664598162381HOEnZb"><font color="#888888">
<div><font size="3"><br>
</font></div>
<div><font size="3">Justin</font></div>
<p><br>
</p>
<p><br>
</p>
<br>
<span class="m_-2885720920021194062m_-7360822853962826608HOEnZb"><font color="#888888"></font></span></font></span></div>
<span class="m_-2885720920021194062m_-7360822853962826608HOEnZb"><font color="#888888"></font></span></blockquote>
</div>
<span class="m_-2885720920021194062m_-7360822853962826608HOEnZb"><font color="#888888"><br>
<br clear="all"><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
-- <br>
<div class="m_-2885720920021194062m_-7360822853962826608m_8823127664598162381gmail_signature">
<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">http://www.caam.rice.edu/~mk51<wbr>/</a><br>
</div>
</div>
</div>
</font></span></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_-2885720920021194062m_-7360822853962826608gmail_signature">
<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">http://www.caam.rice.edu/~mk51<wbr>/</a><br>
</div>
</div>
</div>
</font></span></div>
</div>
</div>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><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">http://www.caam.rice.edu/~mk51/</a><br></div></div></div>
</div></div>