示例#1
0
func TestPeerBruss2D(t *testing.T) {
	peer, _ := NewPeer(EPP4)
	bruss := problems.NewBruss2D(10)
	instance := bruss.Initialize()

	config := Config{
		Fcn: bruss.Fcn,
	}

	peer.Integrate(0, 1, instance, &config)
}
示例#2
0
func TestParameterValidation(t *testing.T) {
	peer, _ := NewPeer(EPP8_d)
	bruss := problems.NewBruss2D(10)
	instance := bruss.Initialize()

	c := Config{
		BlockSize: 0,
		Fcn:       bruss.Fcn,
	}

	peer.Integrate(0, 1, instance, &c)

	if c.BlockSize == 0 {
		t.Errorf("Peer didn't correct block size.")
	}
}
func setupBruss() (p *peer, in integration, y0 []float64) {
	return setupBenchmark(problems.NewBruss2D(200))
}