<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">If you would like output information for each time step, you can use the routine <font face="Courier New" class="">Simulation_adjustEvolution.F90</font>.<div class=""><br class=""></div><div class="">If you open any old <span style="font-family: "Courier New";" class="">Simulation_adjustEvolution.F90 </span>from an object directory you will find that it is effectively empty. The routine takes in the number of blocks as an integer, the block list, current cycle number, time step, and current simulation time. From that you can tell that the purpose of this routine is to acquire or change block information for each time step, hence its name. </div><div class=""><br class=""></div><div class="">Assuming your routine is empty, you may want to do the following:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">1. Loop through the number of blocks.</div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">2. Call <font face="Courier New" class="">Grid_getBlkIndexLimits</font>, <font face="Courier New" class="">Grid_getCellCoords</font>, <font face="Courier New" class="">Grid_getBlkPtr</font>, and <font face="Courier New" class="">Grid_getDeltas</font>. Some of these are crucial (<span style="font-family: "Courier New";" class="">Grid_getBlkIndexLimits, </span><span style="font-family: "Courier New";" class="">Grid_getBlkPtr</span>) if you want to a access the blkPtr, or, as Ryan said, the UNK. The other routines are helpful if you would like to a access the coordinates and their differences, in the case that you may want to preform an integration. If you want to get the coordinates make sure you allocate, initialize the arrays, and then deallocate after the step (3) series of loops.</div><div class="">3. Then you will want to loop over all three block limits for each i, j,k direction. </div></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">4. After this third step you can then assign your UNK to variables and preform calculations that may be grid based, or require special calculations.</div></blockquote></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">5. Don’t forget to close the four essential loops, and deallocate allocated arrays, etc. </div></blockquote><div class=""><br class=""></div><div class="">You can find examples of what I have just described in various parts of the code. I tried to provide the “shape” of the code, which can be helpful, in the formatting. If you want to create new UNK variables make sure you follow the appropriate procedure to do so… edit the configuration file, initialize it, etc. You can then access it in whatever routine.</div><div class=""><br class=""></div><div class="">Around this whole operation you could then preform the standard methods of file I/O or whatever you please, or within it. Whether it is a .<i class="">dat</i> file or a .<i class="">txt</i> file, whatever you want.</div><div class=""><br class=""></div><div class="">If you’re looking to access <i class="">all</i> block to cell information for each UNK though I would really recommend just sticking to HDF5, using VisIt, IDL, or python’s associated libraries…. Honestly the idea of any other format gives me nightmares for post processing purposes… and ASCII file for each output dump would probably eat your storage alive. </div><div class=""><br class=""></div><div class="">I know that Flash also has chombo capabilities but I am pretty certain that part of the code is not maintained well.</div><div class=""><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><font face="monospace" size="1" color="#000000" class="">%———————————————————%</font><div class=""><font face="monospace" size="1" color="#000000" class="">Marissa B. P. Adams</font></div><div class=""><font face="monospace" size="1" color="#000000" class="">(she/her/hers)</font></div><div class=""><font face="monospace" size="1" color="#000000" class="">Phd Candidate, University of Rochester</font></div><div class=""><b style="font-family: monospace; font-size: x-small;" class="">E-mail:</b><span style="font-family: monospace; font-size: x-small;" class=""> <a href="mailto:madams@pas.rochester.edu" target="_blank" class="">madams@pas.rochester.edu</a></span><br class=""></div><div class=""><font face="monospace" size="1" color="#000000" class=""><b class="">Website:</b> <a href="http://www.pas.rochester.edu/~madams" target="_blank" class="">https://www.pas.rochester.edu/~madams</a></font></div><div class=""><font face="monospace" color="#000000" size="1" class=""><b class="">Twitter:</b> <a href="https://twitter.com/mbpadams" target="_blank" class="">https://twitter.com/mbpadams</a></font></div><div class=""><font color="#000000" face="monospace" size="1" class=""><b class="">Current Location:</b></font></div><div class=""><font face="monospace" size="1" class="">My 400 sq. ft studio apartment</font></div><div class=""><font color="#000000" face="monospace" size="1" class=""><strike class="">371 Bausch and Lomb Hall</strike></font></div><div class=""><font color="#000000" face="monospace" size="1" class=""><strike class="">University of Rochester</strike></font></div><div class=""><font color="#000000" face="monospace" size="1" class=""><strike class="">Rochester, NY 14627</strike></font></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On May 17, 2020, at 18:43, Ryan Farber <<a href="mailto:rjfarber@umich.edu" class="">rjfarber@umich.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Petr,<div class=""><br class=""></div><div class="">While I have not modified the dat file before, note that it should be easy to write to stdout.</div><div class="">For example, if you're debugging and want to know the minimum and maximum density before your code crashes you can do</div><div class="">==========</div><div class="">!! some flash file</div><div class="">use physicaldata, ONLY : unk</div><div class="">use Driver_data, ONLY : dr_globalMe ! or you can use pt_globalMe if you're in a Particle file and want to stay modular for example</div><div class=""><br class=""></div><div class="">if (dr_globalMe == MASTER_PE) then</div><div class=""> write(*,*) "max dens: ", maxval(unk(DENS_VAR,:,:,:,:)) ! unk has indices to variables, i, j, k, blocks</div><div class=""> write(*,*) "min dens: ", minval(unk(DENS_VAR,:,:,:,:))</div><div class="">endif</div><div class="">=========</div><div class="">Note that it's probably safer (especially for getting the minimum values, I don't remember if the above will just yield zero) to loop over list of blocks to find the maximum, minimum. Or do an MPI_ALLREDUCE. Many options :)</div><div class=""><br class=""></div><div class="">Best,<br clear="all" class=""><div class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="">--------<div class="">Ryan</div></div></div></div></div></div></div><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 17, 2020 at 2:04 AM petrk <<a href="mailto:petrk@physics.muni.cz" class="">petrk@physics.muni.cz</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif" class=""><p class="">Hello users,</p><p class="">Is there any possibility to write output data (for example for some particular quantities - density, pressure, etc.) explicitly to the ordinary .dat file and not to hdf?</p><p class="">Thanks a lot,</p><p class="">Petr</p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px" class=""></blockquote><p class=""><br class=""></p>
</div>
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>