Skip to content

Commit

Permalink
export lastTorque
Browse files Browse the repository at this point in the history
  • Loading branch information
godsic committed Nov 14, 2014
1 parent 6f970c7 commit 55d2e3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (g *guistate) prepareOnUpdate() {
} else {
g.Set("busy", "Running")
// Don't re-evaluate all the time if not running
g.Set("maxtorque", fmt.Sprintf("%1.3e T", lastTorque))
g.Set("maxtorque", fmt.Sprintf("%1.3e T", LastTorque))
}

// display
Expand Down
4 changes: 2 additions & 2 deletions engine/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
MaxErr float64 = 1e-5 // maximum error/step
Headroom float64 = 0.8 // solver headroom, (Gustafsson, 1992, Control of Error and Convergence in ODE Solvers)
LastErr, PeakErr float64 // error of last step, highest error ever
lastTorque float64 // maxTorque of last time step
LastTorque float64 // maxTorque of last time step
NSteps, NUndone, NEvals int // number of good steps, undone steps
FixDt float64 // fixed time step?
stepper Stepper // generic step, can be EulerStep, HeunStep, etc
Expand Down Expand Up @@ -104,7 +104,7 @@ func setLastErr(err float64) {
}

func setMaxTorque(τ *data.Slice) {
lastTorque = cuda.MaxVecNorm(τ)
LastTorque = cuda.MaxVecNorm(τ)
}

// adapt time step: dt *= corr, but limited to sensible values.
Expand Down

0 comments on commit 55d2e3a

Please sign in to comment.