<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div><div style="font-family: Calibri,sans-serif; font-size: 11pt;"><br>It looks like some work but I might try to looking into this in the coming weeks.<br><br>Thanks. <br><br></div></div><div dir="ltr"><hr><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">From: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:klaus@flash.uchicago.edu">Klaus Weide</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Sent: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">10/12/2015 10:17 PM</span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">To: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:nattal@uncc.edu">Attal, Nitesh</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Cc: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;"><a href="mailto:flash-users@flash.uchicago.edu">flash-users@flash.uchicago.edu</a></span><br><span style="font-family: Calibri,sans-serif; font-size: 11pt; font-weight: bold;">Subject: </span><span style="font-family: Calibri,sans-serif; font-size: 11pt;">Re: [FLASH-USERS] Periodic boundary conditions fordiffusion/conduction</span><br><br></div>On Mon, 12 Oct 2015, Attal, Nitesh wrote:<br><br>> Hello,<br>> <br>> I tried using periodic BC (in y-direction) for a 2D thermal conduction<br>> problem (Temperature gradient was imposed only in x-direction). I found<br>> that the temperature at the y-boundary drops rapidly even though there is<br>> no gradient present.<br>> I tracked down the routine (gr_hypreApplyBcToFace) responsible for applying<br>> the BC for HYPRE matrix. Here appropriate modification to the Bmatrix is<br>> made to implement Dirichlet, Vacuum and other BC.<br>> <br>> I was wondering if there could be a quick-fix to get the wraparound<br>> solution variables to modify Bmatrix, i.e. a way to access appropriate<br>> neighbors (blocks) that contain the periodic BC.<br><br>The routine gr_hypreApplyBcToFace, called from gr_hypreCreateMatrix, <br>shouldn't really have anything to do for a periodic boundary. All the work <br>of coupling neigboring cells with each other should have happened earlier <br>in gr_hypreCreateMatrix.<br><br>Maybe all it takes to get this right is making HYPRE aware of the <br>perodicity of the index space? And maybe all THAT takes is calling <br>HYPRE_SStructGridSetPeriodic with the appropriate arguments, for each <br>direction that has periodic boundaries? This is at this point a completely <br>untested hypothesis.<br><br>If someone wants to experiment with it:<br><br> * Look at comments re SetPeriodic in source files like<br> hypre-2.10.0b/src/sstruct_mv/HYPRE_sstruct_mv.h<br> hypre-2.10.0b/src/sstruct_mv/F90_HYPRE_sstruct_grid.c<br> * Better, see what the HYPRE documentation has to say about<br> HYPRE_SStructGridSetPeriodic! (I haven't checked.)<br> * Calls should probably go into<br> gr_hypreSetupGrid.F90 .<br> * Initial testing should be done with the uniform grid (UG),<br> since AMR may, and probably will, add additional complications.<br><br><br>Klaus<br></body></html>