Catalyst2 not de-interlacing arrays correctly?
Hello,
There seems to be an issue in Catalyst2 with interlaced arrays. I get a checkerboard patterns when rendering de-interlaced arrays coming form Catalyst.
I have modified the Examples/Catalyst2/CxxFullExample to show the problem:
In this example, I added an array filled with a 1,2,3 repeating pattern and of size 3 times the cell count:
OneTwoThree = [1, 2, 3, 1, 2, 3, ..., ]
In the adapter, I created 3 cell-centered fields 'one', 'two' and 'three' with Conduit by passing the OneTwoThree array, an offset of 0, 1*, or 2* sizeof(double)
and a stride of 3*sizeof(double)
. Printing the Conduit node shows that the de-interlace has been register correctly at that point:
{
"catalyst":
{
"state":
{
"timestep": 0,
"time": 0.0
},
"channels":
{
"grid":
{
"type": "mesh",
"data":
{
[...]
},
"fields":
{
[...]
"one":
{
"association": "element",
"topology": "mesh",
"volume_dependent": "false",
"values": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
},
"two":
{
"association": "element",
"topology": "mesh",
"volume_dependent": "false",
"values": [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
},
"three":
{
"association": "element",
"topology": "mesh",
"volume_dependent": "false",
"values": [3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0]
}
}
}
}
}
}
}
However, printing those fields in the python pipeline shows they are not correct there:
( 2.273s) [pvbatch ] ParaViewCatalyst.cxx:175 INFO| { catalyst_execute
[...]
( 3.028s) [pvbatch ] v2_internals.py:118 INFO| . . calling 'catalyst_pipeline.catalyst_execute'
-----------------------------------
executing (cycle=0, time=0.0)
bounds: (0.0, 1.0, 0.0, 4.0, 0.0, 16.0)
velocity-magnitude-range: (0.0, 0.0)
pressure-range: (1.0, 1.0)
one-range: (1.0, 3.0)
two-range: (1.0, 3.0)
three-range: (1.0, 3.0)
one:
1.0
2.0
3.0
1.0
2.0
3.0
1.0
two:
1.0
2.0
3.0
1.0
2.0
3.0
1.0
three:
1.0
2.0
3.0
1.0
2.0
3.0
1.0
[...]
( 3.053s) [pvbatch ] ParaViewCatalyst.cxx:199 INFO| . } 0.779 s: co-processing for timestep=0, time=0.000000
( 3.053s) [pvbatch ] ParaViewCatalyst.cxx:175 INFO| } 0.780 s: catalyst_execute
( 3.053s) [pvbatch ] ParaViewCatalyst.cxx:255 INFO| { catalyst_finalize
( 3.053s) [pvbatch ] v2_internals.py:106 INFO| . called do_catalyst_finalize <module 'catalyst_pipeline' from 'catalyst_pipeline.py'>
( 3.106s) [pvbatch ] ParaViewCatalyst.cxx:255 INFO| } 0.053 s: catalyst_finalize
You will also find in this example that the problem is present for vertex feilds as well. I have not checked if it was for the coordinates.
Let me know if you need anything else.
Best, Alex