About Me

Not Specified
Not Specified


Recent Forum Posts

Gas wrangle and include functions Jan. 5, 2023, 5:48 a.m.

Revisiting this question.

The problem persists if more than one field is being used/manipulated. It seems that the DOP Data parameter only allows one field at a time but if the function refers to say @temperature as well as @density it won't work. Using multiple inputs doesn't solve it either.

What's the trick here and why do I have to jump through so many hoops to access and modify fields in external VEX functions? I don't see the logic behind it especially since it does work in a SOP context.

Gas wrangle and include functions Jan. 3, 2023, 1:04 p.m.

I tried to simplify it. So consider the following function:
float test(vector pos){
return 2.0*volumesample(0,'density',pos);

In a SOP wrangle, on a density field, the following code will work as expected:

#include <test.vfl>

//@density *= 2.0; // this will work in a gasfieldwrangle and volume wrangle
@density = test(v@P); // this won't work in a gasfieldrwangle but will work in a volume wrangle

But in a dop gasfield wrangle it won't.

I'm wondering if it has to do with solver-space. Maybe v@P won't work the same way? Or this new stencil field thing causes problems?

It might have to do with the Input Data settings but not completely sure yet.

Edit: nvm, it's the input settings. They have to be on DOP data and refer to themselves.

Gas wrangle and include functions Jan. 3, 2023, 9:51 a.m.

I'm having an issue with using my own vex #include functions in gas wrangles.

When I test the functions in a normal volume wrangle in sopland they work as expected but when using them in a gas wrangle in dops it's as if the functions aren't used or evaluated. If I use them in a sop solver inside dops they do work again. The functions take standard arguments such as v@P, @density or float/vector and don't refer to anything external to the dopnet. Does anybody have an idea what might be going on?