with(linalg): 
if traperror(read `dot.def`) = lasterror then 
  read `dot.txt` 
else 
  fclose `dot.def`; read `dot.def` 
fi:
veloc:= (C,R) ->  diff(map(rhs,C), op(1,R));
slineint:= (F,C,R) -> int(subs(C, F) * len(veloc(C,R)), R);
Slineint:= subs(int=Int, eval(slineint));
vlineint:= (F,C,R) -> int(subs(C, evl(F)) &. veloc(C, R), R);
Vlineint:= subs(int=Int,eval(vlineint));
aelt:= (S, R1, R2) -> len(veloc(S,R1) &x veloc(S,R2));
surfint:= (f, S, R1, R2) -> int(int(subs(S,f) * aelt(S,R1,R2), R2), R1);
Surfint:= subs(int=Int,eval(surfint));
flux:= (F, S, R1, R2) -> int(int(subs(S, evl(F)) &. 
               (veloc(S,R1) &x veloc(S,R2)), R2), R1);
Flux:= subs(int=Int, eval(flux));
