Skip to content

Commit

Permalink
ConservationCalculation.m: Fix a couple of serious bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Oct 1, 2010
1 parent 0e5608f commit 8af3cd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/CodeGen/ConservationCalculation.m
Expand Up @@ -85,7 +85,7 @@

(* Return the list of conserved variables in a calculation *)
consVars[calc_] :=
(Map[First, lookup[calc, Equations]] /. {flux[v_, rest___] :> v})
Union[(Map[First, lookup[calc, Equations]] /. {flux[v_, rest___] :> v})]

(* Return the list of variables to reconstruct in a calculation *)
primitiveVars[calc_] :=
Expand Down Expand Up @@ -129,7 +129,7 @@
Module[{},
{
leftSymbol[fluxSymbol[q]] -> replaceVars[frhs, vars, leftSymbol],
rightSymbol[fluxSymbol[q]] -> replaceVars[frhs, vars, rightSymbol],
rightSymbol[fluxSymbol[q]] -> replaceVars[frhs, vars, Function[v,ShiftMinus[rightSymbol[v],j]]],
fluxSymbol[q] ->
1/2(leftSymbol[fluxSymbol[q]] + rightSymbol[fluxSymbol[q]] +
hlleAlpha(ShiftMinus[rightSymbol[q],j] - leftSymbol[q]))
Expand Down

0 comments on commit 8af3cd5

Please sign in to comment.