spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

Split Solvers and Optimizers / LLG and energy minimisation? #478

Open GPMueller opened 5 years ago

GPMueller commented 5 years ago

While the velocity projection (VP) solver technically solves an equation of motion, the nonlinear conjugate gradients method is only good for minimisations. Both can only minimise the energy

It might be better to split a Method_Optimizer from the Method_Solver, and distinguish LLG and Energy Minimisation as separate methods, at least in the GUI. It would remain to be seen whether this makes sense for the code structure, but it might make the LLG code less confusing in terms of the different forces.

Question: How to still be able to use the solvers for energy minimisation in this model?

GPMueller commented 5 years ago

This would definitely be a good idea, as I can see now. The API would grow a little, but it would make a lot of code unnecessary, such as the split Calculate_Force and Calculate_Force_Virtual methods.

Note that these changes would also propagate into the GUI, making it less confusing (LLG+VP does not simulate LLG...).