Closed jakelove closed 3 years ago
Hi @JakeLove . Having the option to define a (time) signal based on a data file could be very useful for many mumax3 users.
I think the code is nicely written but I do have some small suggestions on the coding style:
Some other remarks:
I implemented a similar feature some time ago myself (actually specifically for our joined project). You can find the code here. We can use either this implementation or we can use your implementation (after taking the above comments into account). Let me know which implementation you prefer and why.
Added the capability to load time series data from external files so that material/region properties can be arbitrarily set to different values throughout the simulation. Currently to vary a property such as the external field you could write something like:
B_ext = A*sin(t)
Which is nice if you want B_ext to be an analytical expression, however this wasn't sufficient for my case where I need material properties to vary based on datasets from another source.
The functionality I have added allows you to load a multicolumned file into mumax3, then use each column as a
ScalarFunction
of (typically)t
.Example input file is given below showing all the exposed functions and an example usage.
First time using GoLang so let me know if anything should be more 'Go-esque'.