Diffing

This page describes how to difference two data sets. For ease of reference, assume that the first data set comes from file "f1" and has variable "Density", defined on mesh "ucd_mesh". Assume the second data set comes from the file "f2" and has the variable "den" defined on mesh "mesh1". (It is fine if the variable names are the same.)

The differences need to be placed on a mesh. The meshes can either be the mesh from f1 or the mesh from f2. There is no mechanism for constructing a combined mesh from f1 and f2. In this example, we will put the differences on the mesh that is contained in file f1.

  1. Open file "f1"
  2. Go to Controls->Expressions
  3. Click on "New"
  4. Name the variable "den_diff"
  5. Define the variable as "Density - conn_cmfe(<f2:den>, ucd_mesh)"
    • Another option is pos_cmfe. conn_cmfe and pos_cmfe are described here.
  6. Click apply.
  7. Make a Pseudocolor plot of den_diff.
  8. Draw.
  9. Go to Controls->Query
  10. Select "Weighted Variable Sum". This will integrate the differences (meaning using volume weighting in 3D or area-weighting in 2D)
  11. That's the answer.