#!/bin/bash -e

time=432000

for num in 5; do
#    for type in '' _nonOrthog; do
    for type in _new; do
        case=${num}${type}

        for subCase in $case/save/*; do
            echo post processing case $subCase
            sumFields -case $subCase $time Udiff $time Uf 0 Uf -scale0 1 -scale1 -1
            sumFields -case $subCase $time hDiff $time h 0 h -scale0 1 -scale1 -1
            plotPatchData -case $subCase -time $time hUdiff
            gv $subCase/$time/hUdiff.eps &
        done
    done
done

