size := 2000e-9
n_points := 1024

A := 1.8e-11
Ku := 1e6
D := 2e-3
Aex = A
Ku1 = Ku
Dind = D
Msat = 4.5e5
L := 1e-9

// x6 Repeats 

SetGridsize(n_points, n_points, 11)
SetCellsize(size/n_points, size/n_points, L)
//setgeom(circle(size))


//SetPBC(2,2,0)

// set multilayers

defregion(2001,zrange(-1*L, 0))
defregion(2002,zrange(-3*L, -2*L))
defregion(2003,zrange(-5*L, -4*L))
defregion(2004,zrange(L, 2*L))
defregion(2005,zrange(3*L, 4*L))
defregion(2006,zrange(5*L, 6*L))


defregion(2007,zrange(0, L))
defregion(2008,zrange(-2*L, -1*L))
defregion(2009,zrange(-4*L, -3*L))
defregion(2010,zrange(2*L, 3*L))
defregion(2011,zrange(4*L, 5*L))


Msat.setregion(2001, 7.5e5)
Msat.setregion(2002, 7.5e5)
Msat.setregion(2003, 7.5e5)
Msat.setregion(2004, 7.5e5)
Msat.setregion(2005, 7.5e5)
Msat.setregion(2006, 7.5e5)
Ku1.setregion(2001, Ku)
Ku1.setregion(2002, Ku)
Ku1.setregion(2003, Ku)
Ku1.setregion(2004, Ku)
Ku1.setregion(2005, Ku)
Ku1.setregion(2006, Ku)
Msat.setregion(2007, 0)
Msat.setregion(2008, 0)
Msat.setregion(2009, 0)
Msat.setregion(2010, 0)
Msat.setregion(2011, 0)

m.setregion(2001,Uniform(1, 0, 0))
m.setregion(2002,Uniform(1, 0, 0))
m.setregion(2003,Uniform(1, 0, 0))
m.setregion(2004,Uniform(1, 0, 0))
m.setregion(2005,Uniform(1, 0, 0))
m.setregion(2006,Uniform(1, 0, 0))
m.setregion(2007,Uniform(0, 0, 0))
m.setregion(2008,Uniform(0, 0, 0))
m.setregion(2009,Uniform(0, 0, 0))
m.setregion(2010,Uniform(0, 0, 0))
m.setregion(2011,Uniform(0, 0, 0))

Aex.setregion(2001, A)
Ku1.setregion(2001,Ku)
anisU.setregion(2001,vector(0,0,1))
Dind.setregion(2001, D)

Aex.setregion(2002, A)
Ku1.setregion(2002,Ku)
anisU.setregion(2002,vector(0,0,1))
Dind.setregion(2002, D)

Aex.setregion(2003, A)
Ku1.setregion(2003,Ku)
anisU.setregion(2003,vector(0,0,1))
Dind.setregion(2003, D)

Aex.setregion(2004, A)
Ku1.setregion(2004,Ku)
anisU.setregion(2004,vector(0,0,1))
Dind.setregion(2004, D)

Aex.setregion(2005, A)
Ku1.setregion(2005,Ku)
anisU.setregion(2005,vector(0,0,1))
Dind.setregion(2005, D)

Aex.setregion(2006, A)
Ku1.setregion(2006,Ku)
anisU.setregion(2006,vector(0,0,1))
Dind.setregion(2006, D)

Aex.setregion(2007, 0)
Aex.setregion(2008, 0)
Aex.setregion(2009, 0)
Aex.setregion(2010, 0)
Aex.setregion(2011, 0)

save(regions)

relax()
save(m)  
