Example #1
0
func TestPeerMBody4h(t *testing.T) {
	peer, _ := NewPeer(EPP8_d)
	mbody := problems.NewMBody(4)
	instance := mbody.Initialize()

	config := Config{
		Fcn:               mbody.Fcn,
		AbsoluteTolerance: 1.e-5,
		RelativeTolerance: 1.e-5,
	}
	var t0, te float64 = 0.0, 0.1

	stat, err := peer.Integrate(t0, te, instance, &config)

	if err != nil {
		t.Fatalf("Integration failed - %s", err.Error())
	}

	if testing.Verbose() {
		t.Logf("MBody4H: %d steps, %d rejected, %d evaluations", stat.StepCount, stat.RejectedCount, stat.EvaluationCount)
		t.Logf("MBody: result[0..10] = %f", instance[:10])
	}
}