This shows you the differences between two versions of the page.
— |
docs:utils:l2dist [2010/02/02 07:55] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== L2Dist ====== | ||
+ | compute the L2 Distance between two fields | ||
+ | |||
+ | options | ||
+ | <code> | ||
+ | -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 | ||
+ | </code> | ||
+ | |||
+ | usage | ||
+ | <code> | ||
+ | L2Dist u.ff v.ff | ||
+ | </code> | ||
+ | |||
+ | returns | ||
+ | |||
+ | <latex> | ||
+ | \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} | ||
+ | </latex> | ||
+ | |||
+ | 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. |