<div dir="ltr">Hi Suoqing,<div><br></div><div>I see your correction is correct! I am making this fix now and the corrected version will be available in the next release.</div><div><br></div><div>Thanks for reporting this bug!</div><div><br></div><div>Cheers,</div><div>Dongwook</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 22, 2017 at 1:31 PM, Suoqing Ji <span dir="ltr"><<a href="mailto:suoqing@physics.ucsb.edu" target="_blank">suoqing@physics.ucsb.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif">Hi Dongwook,
<div><br></div>
<div>Thanks for your info! I misread the code previously and I do agree with the cell corner vs. cell center scheme. </div>
<div><br></div>
<div>However, now I revise my concern into the following:</div>
<div><br></div>
<div>The i index goes up to (blkLimitsGC(HIGH,IAXIS)+1), thus xCoord(i) will go beyond index boundary when i=blkLimitsGC(HIGH,IAXIS)+1 (the same thing happens on zCoord(k)). Although cell center value should be used here, the boundary needs to be taken care of slightly. Say,</div>
<div><br></div>
<div>
<div>if (i <= blkLimitsGC(HIGH,IAXIS)) then</div>
<div> x1 = (cos_ang * xCoord(i) + sin_ang * zz)</div>
<div>else</div>
<div> x1 = (cos_ang * (xCoord(i-1) + dx) + sin_ang * zz)</div>
<div>endif</div>
</div>
<div><br></div>
<div>Thank you!</div>
</div><span class="">
<div name="messageSignatureSection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br>
Best wishes,
<div>—</div>
<div>Suoqing Ji</div>
<div>Ph.D Candidate</div>
<div>Department of Physics</div>
<div>University of California, Santa Barbara</div>
<div><a href="http://physics.ucsb.edu/~suoqing" target="_blank">http://physics.ucsb.edu/~<wbr>suoqing</a></div>
</div>
</span><div><div class="h5"><div name="messageReplySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br>
On May 22, 2017, 1:18 PM -0700, Dongwook Lee <<a href="mailto:dongwook@flash.uchicago.edu" target="_blank">dongwook@flash.uchicago.edu</a>>, wrote:<br>
<blockquote type="cite" style="margin:5px 5px;padding-left:10px;border-left:thin solid #1abc9c">
<div dir="ltr">Hi Souqing,
<div><br></div>
<div>I think the code lines are correct. Please first note that the filed loop is rotated about the y-axis, following the transformation rule:</div>
<div><br></div>
<div>
<div> x1 = x*cos(ang) - z*sin(ang)</div>
<div> x2 = y</div>
<div> x3 = x*sin(ang) + z*cos(ang)</div>
</div>
<div> </div>
<div>Now, you want to define vector potentials to define divergence-free face magnetic fields using the following rules:</div>
<div><br></div>
<div>
<div> Bx = dAz/dy - dAy/dz</div>
<div> By = dAx/dz - dAz/dx</div>
<div> Bz = dAy/dx - dAx/dy</div>
</div>
<div><br></div>
<div>When considering Ax in this case, you want to stagger (i.e., use coordinates at faces, rather than centers) y and z coordinates for the straightforward differencing. Since y is not rotated, you just need to stagger z-coordinate, leaving x-coordinate at cell-centers.</div>
<div><br></div>
<div>Likewise, you would need to stagger x-y for Az, for which you just need x-staggering only, keeping z-coordinates at cell-centers.</div>
<div><br></div>
<div>I double checked this with the code implementations in the ATHENA code setup, and they look the same as the FLASH implementation.</div>
<div><br></div>
<div>Hope this helps.</div>
<div><br></div>
<div>Best,</div>
<div>Dongwook</div>
<div><br></div>
<div>
<div><font color="#000000" size="2" face="arial, helvetica, sans-serif">==============================<wbr>===========</font></div>
<div><font color="#000000" size="2" face="arial, helvetica, sans-serif">Dongwook Lee, Ph.D., Assistant Professor</font></div>
<div><font color="#000000" size="2" face="arial, helvetica, sans-serif">Applied Mathematics and Statistics<br></font></div>
<div><font color="#000000" size="2" face="arial, helvetica, sans-serif">University of California, Santa Cruz</font></div>
<div><font color="#000000" size="2" face="arial, helvetica, sans-serif">Baskin Engineering, Room 353C</font></div>
<div><font color="#000000" size="2" face="arial, helvetica, sans-serif">1156 High Street, Santa Cruz, CA 95064</font></div>
<div><a href="https://users.soe.ucsc.edu/~dongwook/" target="_blank"><font color="#000000" size="2" face="arial, helvetica, sans-serif">https://users.soe.ucsc.edu/~<wbr>dongwook/</font></a></div>
<div><br></div>
</div>
<div><br></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Apr 21, 2017 at 12:57 AM, Suoqing Ji <span dir="ltr"><<a href="mailto:suoqing@physics.ucsb.edu" target="_blank">suoqing@physics.ucsb.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:5px 5px;padding-left:10px;border-left:thin solid #e67e22">
<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif">Hi,
<div><br></div>
<div>I would like to report a very minor bug in magnetoHD/FieldLoop/Simulat<wbr>ion_initBlock.F90: in line 253 and 273, the variable xCoord(i) and zCoord(k) should be replaced by xx and zz.</div>
<div><br></div>
<div>With current code, depending on platforms and ways of setup, the simulation has a certain possibility of hanging forever at initialization stage without any error output (sometimes it can run successfully). I encounter this issue when I use FieldLoop for performance tests on Stampede.</div>
<div><br></div>
<div>Thanks!</div>
</div>
<div name="messageSignatureSection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br>
Best wishes,
<div>—</div>
<div><span class="m_-9157642702805820199gmail-HOEnZb"><font color="#888888">Suoqing Ji</font></span></div>
<div><span class="m_-9157642702805820199gmail-HOEnZb"><font color="#888888">Ph.D Candidate</font></span></div>
<div><span class="m_-9157642702805820199gmail-HOEnZb"><font color="#888888">Department of Physics</font></span></div>
<div><span class="m_-9157642702805820199gmail-HOEnZb"><font color="#888888">University of California, Santa Barbara</font></span></div>
<div><span class="m_-9157642702805820199gmail-HOEnZb"><a href="http://physics.ucsb.edu/~suoqing" target="_blank"><font color="#888888">http://physics.ucsb.edu/~suoqi<wbr>ng</font></a></span></div>
</div>
</div>
</blockquote>
</div>
<br></div>
</div>
</blockquote>
</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 style="font-size:12.8px"><font color="#000000" size="2" face="arial, helvetica, sans-serif"><br>=========================================</font></div><div style="font-size:12.8px"><font color="#000000" size="2" face="arial, helvetica, sans-serif">Dongwook Lee, Ph.D., Assistant Professor</font></div><div style="font-size:12.8px"><font color="#000000" size="2" face="arial, helvetica, sans-serif">Applied Mathematics and Statistics<br></font></div><div style="font-size:12.8px"><font color="#000000" size="2" face="arial, helvetica, sans-serif">University of California, Santa Cruz</font></div><div style="font-size:12.8px"><font color="#000000" size="2" face="arial, helvetica, sans-serif">Baskin Engineering, Room 353C</font></div><div style="font-size:12.8px"><font color="#000000" size="2" face="arial, helvetica, sans-serif">1156 High Street, Santa Cruz, CA 95064</font></div><div style="font-size:12.8px"><font color="#000000" size="2" face="arial, helvetica, sans-serif"><a href="https://users.soe.ucsc.edu/~dongwook/" target="_blank">https://users.soe.ucsc.edu/~dongwook/</a></font></div><div><br></div></div></div>
</div>