User Tools

Site Tools


docs:utils:l2dist

L2Dist

compute the L2 Distance between two fields

options

  -sx       --shiftx                   shift by Lx/2
  -sz       --shiftz                   shift by Lz/2
  <flowfield>      (trailing arg 2)    input field #1
  <flowfield>      (trailing arg 1)    input field #2

usage

L2Dist u.ff v.ff

returns


 \text{L2Norm(u-v)} = \|{\bf u} - {\bf v}\|  = \left(\frac{1}{L_x L_y L_z} \int_{\Omega} \|{\bf u} - {\bf v}|^2\,\, d{\bf x} \right)^{1/2}

Note: the -sx and -sz options apply shifts by Lx/2 and Lz/2 to one of the fields prior to computation of the norm. This is helpful for my research but might not be of interest to others.

docs/utils/l2dist.txt · Last modified: 2010/02/02 07:55 (external edit)