cmt-dtu-energy / MagTense

MagTense - a micromagnetism and magnetostatic framework
http://www.MagTense.org
GNU General Public License v3.0
28 stars 12 forks source link

Make file-saver slightly more robust #14

Open kasparn opened 4 years ago

kasparn commented 4 years ago

When saving N-tensor as a binary .dat file we should also include metadata such that reloading the file is only successfully done when a meaningful file is provided. Else, the code should simply ignore the file provided and move on.

Items that should be included in the metadata: Most of what is given in the problem struct. It would be very need if we could translate such as struct into an xml file and use this. Alternatively, we could agree on certain reserved fields in the .dat file.

Any suggestions?

rasmusbj commented 4 years ago

I agree that xml sounds like an excellent idea. It should be easy to write from Matlab, when the problem is first set up, and it would also be a nice way to provide input to the stand-alone version at one point. Maybe I can have something together after the holidays...