Operating at cell level #12529
-
We're trying to combine Hi all! I would like to be able to operate at cell level, e.g. do a looping over all cells in the mesh, maybe a double one of the kind (a typical C/FORTRAN one):
Or maybe something like this:
How could I do that? Where can I start from? Any idea or example will be appreciated! Best regards! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Ernesto you can use ZonePick and do something like:
Here's documentation of the Zone Pick Function Here's a reference to VisIt scripting in general |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot Kevin for your fast response!
I have now an additional question.
>for j in range(ny):
> for i in range(nx):
> ZonePick(x=i, y=j, vars=("varName1", "varName2")) # can use coord = (i,j,0)
> pickOutput = GetPickOutputObject()
> zoneFloat = float(pickOutput['zone_id'])
> var1Value= float(pickOutput['varName1'])
> var2Value = float(pickOutput['varName2'])
This is really nice to operate between cells. But, what about saving
results in a new or different scalar-expression.
E.g. I'm working with var1Value and var2Value, and want to save results in
a different var3Value to do then a pseudocolor plot.
Best!
El vie., 2 oct. 2020 a las 13:29, Kevin Griffin via visit-users (<
[email protected]>) escribió:
… Ernesto you can use *ZonePick* and do something like:
for j in range(ny):
for i in range(nx):
ZonePick(x=i, y=j, vars=("varName1", "varName2")) # can use coord = (i,j,0)
pickOutput = GetPickOutputObject()
zoneFloat = float(pickOutput['zone_id'])
var1Value= float(pickOutput['varName1'])
var2Value = float(pickOutput['varName2'])
Here's documentation of the Zone Pick Function
<https://visit-sphinx-github-user-manual.readthedocs.io/en/develop/cli_manual/functions.html?highlight=zonepick#zonepick>
Here's a reference to VisIt scripting in general
<https://visit-sphinx-github-user-manual.readthedocs.io/en/develop/tutorials/Scripting.html>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/visit-dav/live-customer-response/issues/155#issuecomment-702831565>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOLAYZGJDJIBN66ZSYWVT6LSIX5YBANCNFSM4SB4AOSQ>
.
--
VisIt Users Wiki: http://visitusers.org/
Frequently Asked Questions for VisIt:
https://wci.llnl.gov/simulation/computer-codes/visit/FAQ.html
To Unsubscribe: send a blank email to
***@***.***
More Options: https://elist.ornl.gov/mailman/listinfo/visit-users
|
Beta Was this translation helpful? Give feedback.
-
In that case you don't need to loop through each cell as VisIt will apply the new expression across the entire dataset. You will need to do something like:
There are a number of math operators and functions you can use in expressions. Look here for more details. |
Beta Was this translation helpful? Give feedback.
In that case you don't need to loop through each cell as VisIt will apply the new expression across the entire dataset. You will need to do something like:
There are a number of math operators and functions you can use in expressions. Look here for more details.