[Paraview] "Function" limitation/bug?

Jens Kleimann jk at tp4.rub.de
Fri Feb 4 06:34:38 EST 2011


Could it be that the Xdmf Function DataItem cannot handle more than ten operands? The sample file quoted below will load just fine into Paraview (3.8.1 64bit Linux) as long as the formula operates on any of the first ten (i.e. $0 through $9) DataItems. However, changing

Function="10 + $9">
to
Function="10 + $10">

in line 22 will cause a segfault. The obvious workaround is to use nested Function items for formulas involving more than ten operands. I'm just wondering if this is a genuine bug, or if maybe the 11th item has to be referenced by something else than "$10"?
Comments (especially from the developers) would be much apprechiated.

Jens.

------------- BEGIN test_function.xmf sample file --------------------
<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf Version="2.0">
  
  <DataItem Name="arr01" Dimensions="2 2" Format="XML">
    1.0 2.0 3.0 4.0
  </DataItem>
  <Domain>
    <Grid Name="myGrid" GridType="Uniform">
      <Topology TopologyType="2dCoRectMesh" Dimensions="2 2"/>
      <Geometry GeometryType="Origin_DxDyDz">
        <DataItem Dimensions="2" NumberType="Float" Format="XML">
          0.0  0.0
        </DataItem>
        <DataItem Dimensions="2" NumberType="Float" Format="XML">
          1.0  1.0
        </DataItem>
      </Geometry>
      <Attribute Name="func(Data)" AttributeType="Scalar" Center="Node">
	<DataItem Dimensions="2 2" ItemType="Function"
		  Function="10 + $9">
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	  <DataItem Reference="/Xdmf/DataItem[1]" />
	</DataItem> 
      </Attribute>
    </Grid>
  </Domain>
</Xdmf>
-------------- END test_function.xmf sample file ---------------------


More information about the ParaView mailing list