>From [http://www.xdmf.org/index.php/XDMF_Model_and_Format] regarding the Xdmf
>Function DataItem: "The function description can be arbitrarily complex and
>contain SIN, COS, TAN, ACOS..."
However, I noticed that operations as simple as multiplication by a constant
are tricky: In Paraview 3.8.1,
Function=" 2.3 * $0 "
will apparently multiply the DataItem referenced by $0 by the _integer_ part of
the constant factor (2.0 in this case)! This is especially nasty if you plan to
multiply by something between 0 and 1, which will consequently reduce all
values of $0 to zero. The same seems to apply to *division* by a non-integer
constant.
A multiplication by, say, 1.5 can be achieved using something like
Function=" $0 * (3/2) " or Function=" ($0 / 2)*3" .
Note also that things like
Function=" (1.2+0.1) * $0 "
will segfault (at least on my machine).
The XMDF file quoted below may serve to illustrate this issue.
If this problem can be confirmed, I propose to at least add a corresponding
comment to the XDMF wiki.
Cheers, Jens.
------------------ BEGIN test_function2.xmf ----------------------------
<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf Version="2.0">
<Domain>
<Grid Name="ftest2_grid" 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=" 2.3 * $0 ">
<DataItem Name="arr_4x4" Dimensions="2 2" Format="XML">
1.0 2.0 3.0 4.0
</DataItem>
</DataItem>
</Attribute>
</Grid>
</Domain>
</Xdmf>
-------------------- END test_function2.xmf ----------------------------
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview