/*
	Test demag field for thin film with elongated size and cells.
	Kernel should be approximately 0, 0, -1 
*/

	SetGridSize(1024, 125, 1)
	SetCellSize(0.5e-9, 2e-9, 1e-9)

	Msat = 1 / mu0

	m = uniform(1, 0, 0)
	expect("kxx", B_demag.average()[0], 0, 1e-2) // not perfectly 0, finite film
	expect("kxy", B_demag.average()[1], 0, 1e-9)
	expect("kxz", B_demag.average()[2], 0, 1e-9)

	m = uniform(0, 1, 0)
	expect("kyx", B_demag.average()[0], 0, 1e-9)
	expect("kyy", B_demag.average()[1], 0, 1e-2) // not perfectly 0, finite film
	expect("kyz", B_demag.average()[2], 0, 1e-9)

	m = uniform(0, 0, 1)
	expect("kzx", B_demag.average()[0], 0, 1e-9)
	expect("kzy", B_demag.average()[1], 0, 1e-9)
	expect("kzz", B_demag.average()[2],-1, 2e-2) // not perfectly -1, finite film

