<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 28, 2014 at 12:49 PM, Konstantinos Kontzialis <span dir="ltr"><<a href="mailto:ckontzialis@lycos.com" target="_blank">ckontzialis@lycos.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Dear all,</div>
<div> </div>
<div> I'm trying to solve the magnetic induction equation on a 3D finite element mesh. </div>
<div> I'm coding the following:</div>
<div> </div>
<div> call TSCreate (petsc_comm_world, ts_mhd, ierpetsc) <br><br> call TSSetIFunction ( ts_mhd, res_mhd, residual_mag, <br> @ PETSC_NULL_OBJECT, ierpetsc ) <br> <br> call TSSetSolution( ts_mhd, Bmagnetic_pet, ierpetsc )<br>
<br> call TSGetSNES (ts_mhd, snes_mhd, ierpetsc )<br> <br> call MatCreateSNESMF ( snes_mhd, J_mf, ierpetsc ) <br><br> call TSSetMaxSNESFailures ( ts_mhd,-1,ierpetsc )<br> <br> call SNESSetJacobian ( snes_mhd, J_mf, M_mhd,<br>
@ PETSC_NULL_FUNCTION, PETSC_NULL_OBJECT, ierpetsc )<br> <br> call TSSetFromOptions ( ts_mhd, ierpetsc )</div>
<div> </div>
<div> call TSSolve ( ts_mhd, PETSC_NULL_OBJECT, ierpetsc) </div>
<div> </div>
<div> and I run with the following options:</div>
<div> </div>
<div> -ts_dt 1.0e-2<br> -ts_type beuler<br> -ts_final_time 1.0<br> -ts_view</div>
<div> </div>
<div> But, when my code reaches TSSolve it gives an error:</div>
<div> </div>
<div> ERROR: [0 mhdsol] Segmentation fault - (Invalid memory reference)<br><br></div>
<div> Any ideas or suggestions on what to do?</div></blockquote><div><br></div><div>Run with valgrind.</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></div>
<div> Regards,</div>
<div> </div>
<div> Kostas</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>