feos-org / feos

FeOs - A Framework for Equations of State and Classical Density Functional Theory
Other
120 stars 23 forks source link

Implement Newton DFT solver #75

Closed prehner closed 1 year ago

prehner commented 1 year ago

This PR implements a quickly converging Newton DFT solver that uses a matrix-free linear solver (GMRES) to calculate the linear subsystem. The action fo the Jacobian on the Newton step is calculated efficiently using fast Fourier transforms.

In addition, a solver log is added to every DFTProfile that keeps track of the residual and the execution time of the solver. This allows a detailed analysis of the choice of solver and solver parameters for any DFT calculation.

closing #74

prehner commented 1 year ago

You are right! The notation in the theory guide should follow the code as close as possible. That is the wohle point of it.

So beta is already used of course. alpha is also commonly used when discussing line search, but alpha is used as a segment index. I went with the very explicit damping_coefficient instead of a spelled out greek letter. This is indeed a breaking change in Python but I think that is ok.