mumax / 3

GPU-accelerated micromagnetic simulator
Other
450 stars 150 forks source link

How to defined a ScalarFunction? #193

Closed bluemoonwencong closed 5 years ago

bluemoonwencong commented 6 years ago

We can define a time-dependent B_ext like this:

fmax:=1e9 B_ext.Add(LoadFile("testfile.ovf"), sin(fmax*t))

But if I want to write my time ScalarFunction, how should I do?

I write this, but it is wrong :

def mytime(t): if (t<1e-9) return 1; if (t<2e-9) return 2; if (t<3e-9) return 2;

B_ext.Add(LoadFile("testfile.ovf"),mytime(t))

JeroenMulkers commented 5 years ago

Please, re-ask this question on the mailing list so that the whole mumax3 community can help you and/or learn from the given answers.

The issue tracker is for issues.

bluemoonwencong commented 5 years ago

Thanks,I have already submitted my application

Sent from YoMail