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

set TIMEDRIVER 0

Specify Oxs_MultiAtlas:ErFe2Atlas {

    atlas { Oxs_BoxAtlas {
       xrange { 0e-9  1.0e-9 }
       yrange { 0e-9  1.0e-9 }
       zrange { 0e-9  4.0e-8 }
       name ErFe2
       }
  }
  
}

Specify Oxs_RectangularMesh:mesh {
  cellsize { 1.0e-09 1.0e-09 1.0e-09 }
  atlas :ErFe2Atlas
}

Specify  Oxs_Exchange6Ngbr:ErFeDyFe {
  atlas :ErFe2Atlas 
  A {
    ErFe2  ErFe2 1.46e-11
  }
}

Specify Oxs_CubicAnisotropy8:cubic {
  K1 { Oxs_AtlasScalarField {
    atlas :ErFe2Atlas
    values {
        ErFe2 -8608726
    }
  }}
  K2 { Oxs_AtlasScalarField {
    atlas :ErFe2Atlas
    values {
        ErFe2 -27488264
    }
  }}
  K3 { Oxs_AtlasScalarField {
    atlas :ErFe2Atlas
    values {
        ErFe2 2200538
    }
  }}
  axis1 { Oxs_UniformVectorField {
    norm 1
    vector {0 -0.7071 0.7071}
  } }
  axis2 { Oxs_UniformVectorField {
    norm 1
    vector {0 0.7071 0.7071}
  } }
}


Specify Oxs_UZeeman " 
  multiplier [expr 0.001/$mu0] 
  Hrange {
    { 5 5 20000 5 5 -20000 250  }
  }
 " 

Specify Oxs_EulerEvolve {
  alpha 0.5
  start_dm 0.01
}

Specify Oxs_TimeDriver {
  basename ErFe2
  evolver Oxs_EulerEvolve
  stopping_dm_dt 1
  mesh :mesh
  stage_iteration_limit 0
  total_iteration_limit 0
  Ms { Oxs_AtlasScalarField {
    atlas :ErFe2Atlas
    values {
        ErFe2 876626
    }
 } }
  m0 { Oxs_AtlasVectorField {
    atlas :ErFe2Atlas
    norm 1  
    values { 
        ErFe2 { 0 0 1}
    }
 } }
}

Destination archive mmArchive

Schedule    DataTable archive                     Stage 1
Schedule    Oxs_TimeDriver::Magnetization archive Stage 1

