# MIF 2.1
set pi [expr 4*atan(1.0)]
set mu0 [expr 4*$pi*1e-7]

#Initialize random number generators with seed=1
RandomSeed 1

Specify Oxs_BoxAtlas:atlas {
  xrange {0  4e-9}
  yrange {0  4e-9}
  zrange {0  4e-9}
}


Specify Oxs_RectangularMesh:mesh {
  cellsize {4e-9 4e-9 4e-9}
  atlas :atlas
}

# Exchange
Specify PBC_Exchange_2D {
  A   13e-12
}

# Demag
Specify PBC_Demag_2D {
 tensor_error 1e-11
 sample_repeat_nx 10
 sample_repeat_ny 0
 tensor_file_name rod_test
}


Specify Oxs_RungeKuttaEvolve:evolver {
   alpha 0.5
   method rkf54
}


# Driver
Specify Oxs_TimeDriver {
 evolver :evolver
 basename ./pbc_rod
 stopping_dm_dt 0.01
 mesh :mesh
 Ms 860e3
 m0 { Oxs_UniformVectorField {
      vector {1 1 1}
    }}
}


Destination archive mmArchive
Schedule DataTable archive Stage 1
Schedule Oxs_TimeDriver::Magnetization archive Stage 1
Schedule PBC_Demag_2D::Field archive Stage 1
