Documentation ¶
Overview ¶
Contains function to control the output of the program
Index ¶
- Constants
- Variables
- func AddParticle(p *Particle)
- func Anisotropy_axis(x, y, z float64)
- func Anisotropy_random()
- func AtExit(cleanup func())
- func C1anisotropy_axis(x, y, z float64)
- func C2anisotropy_axis(x, y, z float64)
- func CalcDemag()
- func CalcDemagBrute()
- func CalcDemagParallel()
- func CalculateCenterOfMags()
- func Cleanup()
- func DemagError() float64
- func Demagevery(t float64)
- func DiffBxdx(m, R Vector) float64
- func DiffBxdy(m, R Vector) float64
- func DiffBxdz(m, R Vector) float64
- func DiffBydx(m, R Vector) float64
- func DiffBydy(m, R Vector) float64
- func DiffBydz(m, R Vector) float64
- func DiffBzdx(m, R Vector) float64
- func DiffBzdy(m, R Vector) float64
- func DiffBzdz(m, R Vector) float64
- func Fatal(msg ...interface{})
- func FatalErr(err interface{})
- func InitCPUProfile()
- func InitFMM(worldSize Vector, nLevels int)
- func InitFMM2()
- func InitMemProfile()
- func IsFar(a, b *Cell) bool
- func Log(msg ...interface{})
- func LogErr(err error, msg ...interface{})
- func M_random()
- func M_uniform(x, y, z float64)
- func Msat(x float64)
- func NoExt(file string) string
- func Output(interval float64)
- func PanicErr(err error)
- func Particle_radius(x float64)
- func PruneTree()
- func Run(time float64)
- func Save(a string)
- func Setrandomseed(a int64)
- func Setsolver(a string)
- func Tableadd(a string)
- func Tableadd_b_at_location(x, y, z float64)
- type Cell
- type Particle
- type Vector
- func (v Vector) Abs() Vector
- func (a Vector) Add(b Vector) Vector
- func (a Vector) Cross(b Vector) Vector
- func (v Vector) Div(a float64) Vector
- func (a Vector) Dot(b Vector) float64
- func (v Vector) Len() float64
- func (v Vector) Len2() float64
- func (a Vector) MAdd(s float64, b Vector) Vector
- func (v Vector) MaxNorm() float64
- func (v Vector) Mul(a float64) Vector
- func (v Vector) Mul3(a Vector) Vector
- func (a Vector) Sub(b Vector) Vector
Constants ¶
const ( X = 0 Y = 1 Z = 2 )
Variables ¶
var ( Root Cell // roots the entire FMM tree Level [][]*Cell // for each level of the FMM tree: all cells on that level. Root = level 0 Particles []*Particle // all particles, to be manipulated via Root.AddParticle FMMOrder = 0 Proximity = 1.1 )
FMM globals
var ( //These variables can be set in the input files B_ext func(t float64) (float64, float64, float64) // External applied field in T B_ext_space func(t, x, y, z float64) (float64, float64, float64) // External applied field in T Dt float64 = -1 // Timestep in s Mindt float64 = 1e-20 //smallest allowed timestep Maxdt float64 = 1 //largest allowed timestep T float64 // Time in s Alpha float64 = -1 // Gilbert damping constant Temp float64 = -1 // Temperature in K Ku1 float64 = 0 // Uniaxial anisotropy constant in J/m**3 Kc1 float64 = 0 // Cubic anisotropy constant in J/m**3 Errortolerance float64 = 1e-8 Thresholdbeta float64 = 0.3 // The threshold value for the FMM //universe node // The entire universe of the simulation FMM bool = false // Calculate demag with FMM method Demag bool = true // Calculate demag Adaptivestep bool = false Jumpnoise bool = false Brown bool = false )
var NEvals int
Functions ¶
func AddParticle ¶
func AddParticle(p *Particle)
Add a particle to the global FMM tree and Particles list
func Anisotropy_axis ¶
func Anisotropy_axis(x, y, z float64)
Gives all particles the same specified uniaxialanisotropy-axis
func C1anisotropy_axis ¶
func C1anisotropy_axis(x, y, z float64)
Gives all particles the same specified cubic1anisotropy-axis
func C2anisotropy_axis ¶
func C2anisotropy_axis(x, y, z float64)
Gives all particles the same specified cubic2anisotropy-axis, must be orthogonal to c1
func CalcDemagBrute ¶
func CalcDemagBrute()
func CalculateCenterOfMags ¶
func CalculateCenterOfMags()
func InitFMM ¶
Initializes the global FMM variables Root, Level with an FMM octree, nLevels deep (8^(nLevels-1)) base cells.
func M_uniform ¶
func M_uniform(x, y, z float64)
Gives all particles a specified magnetisation direction
func Output ¶
func Output(interval float64)
Sets the interval at which Mul the output table has to be written
func Particle_radius ¶
func Particle_radius(x float64)
Sets the radius of all entries in radii to a constant value
func Save ¶
func Save(a string)
Saves different quantities. At the moment only "geometry" and "m" are possible
func Tableadd_b_at_location ¶
func Tableadd_b_at_location(x, y, z float64)
Adds the field at a specific location to the output table
Types ¶
type Cell ¶
type Cell struct {
// contains filtered or unexported fields
}
Cell in the FMM tree
func (*Cell) CenterOfMag ¶
func (*Cell) Divide ¶
Create child cells to reach nLevels of levels and add to global level array. nLevels == 1 stops creating children (we always already have at least 1 level), but still adds the cell to the global level array.
func (*Cell) FindPartners ¶
Recursively find partner cells from a list candidates. To be called on the root cell with level[0] as candidates. Partners are selected from a cell's own level, so they have the same size (otherwise it's just anarchy!) TODO: when we have unit tests, it can be optimized not to do so many allocations
type Particle ¶
type Particle struct { M Vector // magnetization // contains filtered or unexported fields }
func NewParticle ¶
func (*Particle) BruteDemag ¶
Brute-force demag calculation for debugging.
type Vector ¶
type Vector [3]float64
3-component vector
func DiffDipole ¶
func DipoleField ¶
Field generated at position R relative to dipole m