Replies: 2 comments 1 reply
-
Nothing jumps out to me as wrong in your code. I don't see any issue with how you are accessing data. But also it shouldn't matter what data you access or what |
Beta Was this translation helpful? Give feedback.
-
I would have blamed Paraview interpolation since the extrema is located in the region of gradient, but you mention testing yt. Have you tried using the AMReX native visualization Amrvis ? It also give you easy access to the actual data table (locally on a user-selected region). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm implementing a custom derived variable in$( Y_{H2} )$ . The function uses a $\tanh$ -based function $0.5 + \frac{\tanh(K (Y_{H2} - 0.5 Y_{H2,\text{max}}))}{2}$ to map $Y_{H2}$ / $Y_{H2,\text{max}}$ to approximately [0, 1] (with clipping to $$[10^{-8}, 1 - 10^{-8}] $$ ). However, I occasionally observe values slightly outside [0, 1] in the output when visualizing the solution with paraview or yt, which to my undertanding shouldn’t happen due to the clamping.
pelelmex_derpseudo
to compute a progress variable based on the H2 mass fractionCode
Below is my implementation inside of
PeleLMeX_DeriveFunc.cpp
:Expected Behavior: The derived variable$[10^{-8}, 1 - 10^{-8}]$ .
pseudo
should be inObserved Issue: Some cells at some timesteps have values slightly below 0 or above 1 (e.g., -0.86), see image.
Could this be due to GPU-specific issues such as issues with
std::tanh()
, or incorrect index access (e.g.,DENSITY
orH2_ID
)?Is the entry for that derived variable in
derfab
being modified elsewhere?Thank you for your help!
PS: I am using MPI and CUDA for compiling.
Beta Was this translation helpful? Give feedback.
All reactions