<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I created a new module with the new variable FPOS.</blockquote><div><br></div><div>Hm, can you explain more what you mean by this?<br><br><b>First things first:</b> have you declared the use of the variable in your <i>Config</i> file in your <i>Simulation/SimulationMain</i> directory? That could look something like:</div><div><br>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(193,101,28)">D</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"> [COMMENT ABOUT THE VARIABLE, THIS ISN'T NECESSARY BUT THE NEXT LINE IS]</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(193,101,28);background-color:rgba(0,0,0,0.9)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">VARIABLE</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(47,255,18)"> FPOS</span></p></div></div><div><br></div><div>somewhere in your file.<br></div><div><br></div><div><b>Second: </b>Is<font face="monospace"> pos1 </font><font face="arial, sans-serif">the value you'd like </font><font face="monospace">FPOS_VAR</font><font face="arial, sans-serif"> to have initially? I'm assuming so based on what you wrote. There could be something problematic with how you are calculating </font><font face="monospace">pos1</font><font face="arial, sans-serif">. Analytically, what do you expect that value to do in a limiting case? </font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><b>Third (probably most likely): </b>You might want to update the value of </font><font face="monospace">FPOS_VAR</font><font face="arial, sans-serif"> in the <i>Simulation_adjustEvolution.F90</i> routine. Copy it into your problem module in the <i>Simulation/SimulationMain</i> directory. You could try adding that into the routine and seeing if you assign it some value for the next time step, whether or not the NaN goes away. You can set up this routine similarly to how you do the <i>Simulation_initBlock.F90</i> routine (i.e. loop through the block list, get the cell coordinates, deltas and block pointers, etc etc). If you want </font><font face="monospace">pos1</font><font face="arial, sans-serif">, you might want to add it into your <i>Simulation_data</i> routine, and then </font><font face="monospace">USE</font><font face="arial, sans-serif"> that routine in <i>Simulation_adjustEvolution</i> so that you can gain access to it as an internal runtime parameter, if you will.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Here is an example of a variable I've declared in a <i>Config</i> file (</font><font face="monospace">POYX_VAR</font><font face="arial, sans-serif">) and initialized in <i>Simulation_initBlock</i> for a different problem, and then updated in<i> Simulation_adjustEvolution</i> as exampled here:</font></div><div><font face="arial, sans-serif"><br></font>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(105,103,149)">#ifdef</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"> POYX_VAR</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">              </span>blkPtr(POYX_VAR,i,j,k) = [SOME FINITE DIFFERENCING]</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(105,103,149)">#if</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"> NDIM >= 2</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">              </span>blkPtr(POYX_VAR,i,j,k) = [SOME MORE FINITE DIFFERENCING]</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;color:rgb(105,103,149)">#if</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"> NDIM == 3</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">              </span>blkPtr(POYX_VAR,i,j,k) = [EVEN MORE FINITE DIFFERENCING]</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(105,103,149);background-color:rgba(0,0,0,0.9)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">#endif</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(105,103,149);background-color:rgba(0,0,0,0.9)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">#endif</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(105,103,149);background-color:rgba(0,0,0,0.9)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">#endif</span></p></div><div><br></div><div>I'm using compilation <font face="monospace">#ifdef</font> commands in case I want to use this routine for another problem, but I have not set a <font face="monospace">VARIABLE POYX </font>in a <i>Config</i> file (similarly depending on how many dimensions I want to run this with). You don't necessarily need to do that.</div><div><br></div><div>I hope this helps somewhat.</div><div><br></div><div>Best,<br>Marissa</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 16, 2021 at 8:29 AM Antoine Gintrand <<a href="mailto:antoine.gintrand@gmail.com">antoine.gintrand@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear flash users,<div><br></div><div>I created a new module with the new variable FPOS.</div><div><br></div><div>In the laser slab simulation initBlock, </div><div><br></div><div>I initialize the value of this variable by doing :</div><div><br></div><div>call Grid_putPointData(blockId, CENTER, FPOS_VAR, EXTERIOR, axis, pos1)</div><div><br></div><div>where pos1 = 0.1e-4</div><div><br></div><div>I verify with the visualisation software Visit that the value is 0.1e-4 everywhere for this variable at time = 0.</div><div><br></div><div>The problem is when I want to modify this variable in my new module I use </div><div>solnData(FPOS_VAR, i, j, k) and when I print it I see the value NaN.</div><div><br></div><div>It seems that solnData(FPOS_VAR,i,j,k) is not filed with any value.</div><div>But if I print for example the value of ion temperature initialized in the same way </div><div>in the initBlock simulation file, solnData(TION_VAR,i,j,k) it gives me the right value.</div><div><br></div><div>If anybody has an idea of this issue with solnData(FPOS_VAR,i,j,k) = NaN ??</div><div>It would help me a lot.</div><div><br></div><div>Thank you for your help,</div><div><br></div><div>Antoine</div><div><br></div><div><br><div><br></div><div><br></div></div></div>
</blockquote></div></div>