<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Just so I can have this sent to the full users list. I actually did end up using gr_markInRectangle. Here is what I wrote in Grid_markRefineDerefine:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);">
<br class="ContentPasted0">
</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">
specs_foil(1) = 0 !lower x</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">
specs_foil(2) = 500.0e-4 !upper x</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">
specs_foil(3) = 1000.0e-4 !lower y</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">
specs_foil(4) = 1200.0e-4 !upper y</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">
specs_foil(5) = 0 !z does not matter to me</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">
specs_foil(6) = 0 </div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">
specs_foil(7) = 0 !for overlap</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);">
<br class="ContentPasted0">
</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">
call Grid_markRefineSpecialized(RECTANGLE,7,specs_foil,11)</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);">
<br class="ContentPasted0">
</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0 elementToProof">
Of course, you also need to declare specs, so do not forget to add this in the top of the file:</div>
<div style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);">
<br class="ContentPasted0">
</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">real, dimension(1:7) :: specs_foil </span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0">Also, do not forget to add Grid_markRefineSpecialized.F90 to your simulation folder (for me this is LaserSlab) before running setup. </span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-size: 12pt; margin: 0px; color: black; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Best,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thomas Kaldawi</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
P.S.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Benjamin, I think you can simply add an if statement around the Grid_markRefineSpecialized to turn off the refinement past a specified n-step or time-step. You can get these values from one of the Driver files I forget which one though. </div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Benjamin Musick <musick_bj@tamu.edu><br>
<b>Sent:</b> Tuesday, June 6, 2023 2:56 PM<br>
<b>To:</b> Kaldawi, Thomas <Tkal@lle.rochester.edu><br>
<b>Cc:</b> Lewis,Sean <scl63@drexel.edu>; flash-users@flash.rochester.edu <flash-users@flash.rochester.edu><br>
<b>Subject:</b> Re: [FLASH-USERS] [EXT] Re: Extra Refinement for Area</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>Hello Thomas and Sean,</div>
<div><br>
</div>
<div>For Paramesh, I have not had much success using Grid_markRefineSpecialized but have obtained reasonably good results by calling gr_markInRectangle in Grid_markRefineDerefine.</div>
<div><br>
</div>
<div>Once you refine those blocks, they will stay at that level. Logic needs to be added to gr_markInRectangle to derefine the area if at a later time in the simulation you desire a coarser mesh there.</div>
<div><br>
</div>
<div>Block count and max/min level of refinement may still need to be adjusted to get good behavior.<br>
</div>
<div><br>
</div>
<div>Hope that helps you out.</div>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Jun 6, 2023 at 12:23 PM Kaldawi, Thomas <<a href="mailto:Tkal@lle.rochester.edu">Tkal@lle.rochester.edu</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-7192681908250704891">
<div style="display:none; font-size:1px; color:rgb(255,255,255); line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
I think I am starting to get it to work. For me, I needed to copy and paste some parts of the simulation_initBlock into the Grid_markRefineDerefine so I could loop through the x and y coordinates for each block. You may also need to set the
</div>
<div style="display:none; font-size:1px; color:rgb(255,255,255); line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
ZjQcmQRYFpfptBannerStart</div>
<u></u>
<div dir="ltr" id="x_m_-7192681908250704891pfptBannerdeicmia" style="display:block; text-align:left; margin:16px 0px; padding:8px 16px; border-radius:4px; min-width:200px; background-color:rgb(208,216,220); border-top:4px solid rgb(144,164,174)">
<div id="x_m_-7192681908250704891pfptBannerdeicmia" style="float:left; display:block; margin:0px 0px 1px; max-width:600px">
<div id="x_m_-7192681908250704891pfptBannerdeicmia" style="display:block; background-color:rgb(208,216,220); color:rgb(0,0,0); font-family:"Arial",sans-serif; font-weight:bold; font-size:14px; line-height:18px">
This Message Is From an External Sender </div>
<div id="x_m_-7192681908250704891pfptBannerdeicmia" style="display:block; background-color:rgb(208,216,220); color:rgb(0,0,0); font-weight:normal; font-family:"Arial",sans-serif; font-size:12px; line-height:18px; margin-top:2px">
This message came from outside your organization. </div>
</div>
<div style="clear:both; display:block; line-height:0; font-size:0.01px; height:0px">
</div>
</div>
<u></u>
<div style="display:none; font-size:1px; color:rgb(255,255,255); line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
ZjQcmQRYFpfptBannerEnd</div>
<div dir="auto">I think I am starting to get it to work. For me, I needed to copy and paste some parts of the simulation_initBlock into the Grid_markRefineDerefine so I could loop through the x and y coordinates for each block.
<div><br>
</div>
<div>You may also need to set the region wider than needed if you do not have enough blocks. This is the problem I was having, because I would give it a rectangular region, but because I did not have enough blocks in the y direction it would not recognize that
region as part of the foil. </div>
<div><br>
</div>
<div>Thank you for the help! <br>
<div dir="ltr"><br>
<blockquote type="cite">On Jun 6, 2023, at 12:54, Lewis,Sean <<a href="mailto:scl63@drexel.edu" target="_blank">scl63@drexel.edu</a>> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<p class="x_MsoNormal">Hi Thomas,<u></u><u></u></p>
<p class="x_MsoNormal"><u></u> <u></u></p>
<p class="x_MsoNormal">I am attempting something very similar (though for an astrophysical simulation). Assuming your setup uses Paramesh, there’s a set of routines meant for defining a specific region to be refined: /source/Grid/GridMain/paramesh/{Grid_markRefineSpecialized.F90,gr_markInRectangle.F90}.
Grid_markRefineSpecialized can be called by Grid_markRefineDerefine() and given a specific rectangular (or spherical/elliptical) region to mark all blocks within for refinement.<u></u><u></u></p>
<p class="x_MsoNormal"><u></u> <u></u></p>
<p class="x_MsoNormal">I personally have not gotten this behavior to work however, the grid seems to just ignore the refinement region, but it might be a place for you to start. I’m still running tests on this, but if anyone else has used this routine and thinks
it may be good for Thomas please chime in. I’ll let you know if I make any progress with this.<u></u><u></u></p>
<p class="x_MsoNormal"><u></u> <u></u></p>
<p class="x_MsoNormal">-Sean<u></u><u></u></p>
<p class="x_MsoNormal"><u></u> <u></u></p>
<div>
<p class="x_MsoNormal"><b><span style="font-family:"Times New Roman",serif; color:black">Sean C. Lewis<u></u><u></u></span></b></p>
<p class="x_MsoNormal"><span style="font-size:10pt; font-family:"Times New Roman",serif">Doctoral Candidate<u></u><u></u></span></p>
<p class="x_MsoNormal"><span style="font-size:10pt; font-family:"Times New Roman",serif">Department of Physics<u></u><u></u></span></p>
</div>
<p class="x_MsoNormal"><span style="font-size:10pt; font-family:"Times New Roman",serif">Drexel University</span><u></u><u></u></p>
<p class="x_MsoNormal"><u></u> <u></u></p>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor; border-style:solid none none; border-width:1pt medium medium; padding:3pt 0in 0in">
<p class="x_MsoNormal"><b><span style="font-size:12pt; color:black">From: </span>
</b><span style="font-size:12pt; color:black">flash-users <<a href="mailto:flash-users-bounces@flash.rochester.edu" target="_blank">flash-users-bounces@flash.rochester.edu</a>> on behalf of "Kaldawi, Thomas" <<a href="mailto:Tkal@lle.rochester.edu" target="_blank">Tkal@lle.rochester.edu</a>><br>
<b>Date: </b>Tuesday, June 6, 2023 at 10:28 AM<br>
<b>To: </b>"<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a>" <<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a>><br>
<b>Subject: </b>[FLASH-USERS] Extra Refinement for Area<u></u><u></u></span></p>
</div>
<div>
<p class="x_MsoNormal"><u></u> <u></u></p>
</div>
<table width="100%" cellpadding="0" border="0" style="width:100%">
<tbody>
<tr>
<td style="border-color:currentcolor currentcolor currentcolor goldenrod; border-style:none none none solid; border-width:medium medium medium 3pt; background:cornsilk; padding:0in 3pt">
<p><b><span style="font-family:"Arial",sans-serif; font-variant:small-caps">External.<u></u><u></u></span></b></p>
</td>
</tr>
</tbody>
</table>
<div>
<div>
<p class="x_MsoNormal"><span><span style="font-size:12pt; color:black">Hello, </span>
</span><span style="font-size:12pt; color:black"><u></u><u></u></span></p>
</div>
<div>
<div>
<p class="x_MsoNormal"><span style="font-size:12pt; color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12pt; color:black">I am trying to add refinement to a specific area of the LaserSlab simulation. In the Pdf I sent, I have the entire simulation, which is just a target, support, and two very thin foils at the bottom
connected to the support. As you can see, I have refined the edges of the target and the support; however, the foils are too thin to be recognized. If I increase the total blocks in the y direction to ~70, the two foils can easily be distinguished, but I do
not want this much refinement in the rest of the simulation. Is there a way to simply add blocks/refine only a certain area in the simulation?
<u></u><u></u></span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12pt; color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12pt; color:black">For clarification, the foils are two different sizes, one is half a micron, and the other is around 30 nanometers; thus, I need a fairly high level of refinement for that area. Also, the foils
are supposed to connect from the yellow/green support to the left wall. However, they cut off before reaching the left side of the window. So, the red foil is indeed supposed to appear between those sections, but for some reason it just cuts off even more
than the second foil.<u></u><u></u></span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12pt; color:black"><u></u> <u></u></span></p>
</div>
<p class="x_MsoNormal"><span><span style="font-size:12pt; color:black">Thanks!</span></span><span style="font-size:12pt; color:black"><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://urldefense.com/v3/__https://flash.rochester.edu/mailman/listinfo/flash-users__;!!KwNVnqRv!ARsrGmalBuUizNMY533OJUdZ4_bDE34_GVKV9Bvy58XBzT_RKtSd4LnLQhtpo6gZ_1G164e5g5GSsmhimH_Cqw$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__https://flash.rochester.edu/mailman/listinfo/flash-users__;!!KwNVnqRv!ARsrGmalBuUizNMY533OJUdZ4_bDE34_GVKV9Bvy58XBzT_RKtSd4LnLQhtpo6gZ_1G164e5g5GSsmhimH_Cqw$</a>
<br>
</div>
</blockquote>
</div>
<br clear="all">
<br>
<span class="x_gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">Thanks,
<div>Ben</div>
</div>
</div>
</div>
</body>
</html>