[FLASH-USERS] [EXT] solnData and Grid_putPointData

Marissa B. P. Adams madams at pas.rochester.edu
Tue Mar 16 08:55:05 EDT 2021


>
> I created a new module with the new variable FPOS.


Hm, can you explain more what you mean by this?

*First things first:* have you declared the use of the variable in your
*Config* file in your *Simulation/SimulationMain* directory? That could
look something like:

D [COMMENT ABOUT THE VARIABLE, THIS ISN'T NECESSARY BUT THE NEXT LINE IS]

VARIABLE FPOS

somewhere in your file.

*Second: *Is pos1 the value you'd like FPOS_VAR to have initially? I'm
assuming so based on what you wrote. There could be something problematic
with how you are calculating pos1. Analytically, what do you expect that
value to do in a limiting case?

*Third (probably most likely): *You might want to update the value of
FPOS_VAR in the *Simulation_adjustEvolution.F90* routine. Copy it into your
problem module in the *Simulation/SimulationMain* 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 *Simulation_initBlock.F90* routine
(i.e. loop through the block list, get the cell coordinates, deltas and
block pointers, etc etc). If you want pos1, you might want to add it into
your *Simulation_data* routine, and then USE that routine in
*Simulation_adjustEvolution* so that you can gain access to it as an
internal runtime parameter, if you will.

Here is an example of a variable I've declared in a *Config* file (POYX_VAR)
and initialized in *Simulation_initBlock* for a different problem, and then
updated in* Simulation_adjustEvolution* as exampled here:

#ifdef POYX_VAR

              blkPtr(POYX_VAR,i,j,k) = [SOME FINITE DIFFERENCING]

#if NDIM >= 2

              blkPtr(POYX_VAR,i,j,k) = [SOME MORE FINITE DIFFERENCING]

#if NDIM == 3

              blkPtr(POYX_VAR,i,j,k) = [EVEN MORE FINITE DIFFERENCING]

#endif

#endif

#endif

I'm using compilation #ifdef commands in case I want to use this routine
for another problem, but I have not set a VARIABLE POYX in a *Config* file
(similarly depending on how many dimensions I want to run this with). You
don't necessarily need to do that.

I hope this helps somewhat.

Best,
Marissa

On Tue, Mar 16, 2021 at 8:29 AM Antoine Gintrand <antoine.gintrand at gmail.com>
wrote:

> Dear flash users,
>
> I created a new module with the new variable FPOS.
>
> In the laser slab simulation initBlock,
>
> I initialize the value of this variable by doing :
>
> call Grid_putPointData(blockId, CENTER, FPOS_VAR, EXTERIOR, axis, pos1)
>
> where pos1 = 0.1e-4
>
> I verify with the visualisation software Visit that the value is 0.1e-4
> everywhere for this variable at time = 0.
>
> The problem is when I want to modify this variable in my new module I use
> solnData(FPOS_VAR, i, j, k) and when I print it I see the value NaN.
>
> It seems that solnData(FPOS_VAR,i,j,k) is not filed with any value.
> But if I print for example the value of ion temperature initialized in the
> same way
> in the initBlock simulation file, solnData(TION_VAR,i,j,k) it gives me the
> right value.
>
> If anybody has an idea of this issue with solnData(FPOS_VAR,i,j,k) = NaN ??
> It would help me a lot.
>
> Thank you for your help,
>
> Antoine
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210316/cdfb712c/attachment.htm>


More information about the flash-users mailing list