JDFTx  1.2.0
BandMinimizer.h
1 /*-------------------------------------------------------------------
2 Copyright 2013 Deniz Gunceler
3 
4 This file is part of JDFTx.
5 
6 JDFTx is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 JDFTx is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with JDFTx. If not, see <http://www.gnu.org/licenses/>.
18 -------------------------------------------------------------------*/
19 
20 #ifndef JDFTX_ELECTRONIC_BANDMINIMIZER_H
21 #define JDFTX_ELECTRONIC_BANDMINIMIZER_H
22 
23 #include <electronic/common.h>
24 #include <core/Minimize.h>
25 #include <electronic/ColumnBundle.h>
26 
27 class BandMinimizer : public Minimizable<ColumnBundle>
28 {
29 public:
30  BandMinimizer(Everything& e, int q);
31 
32  //Interface for Minimizable:
33  double compute(ColumnBundle* grad, ColumnBundle* Kgrad);
34  void step(const ColumnBundle& dir, double alpha);
35  void constrain(ColumnBundle&);
36 
37 private:
38  Everything& e;
39  ElecVars& eVars;
40  const ElecInfo& eInfo;
41  int q;
42 };
43 
44 #endif
double compute(ColumnBundle *grad, ColumnBundle *Kgrad)
Returns the objective function at the current state and store the gradient in grad and preconditioned...
BandMinimizer(Everything &e, int q)
Construct band-structure minimizer for quantum number q.
Definition: BandMinimizer.h:27
void constrain(ColumnBundle &)
Constrain search directions to the space of free directions for minimize.
Definition: Everything.h:41
Definition: ElecVars.h:30
Nonlinear minimization templates.
Definition: ElecInfo.h:49
Definition: Minimize.h:46
void step(const ColumnBundle &dir, double alpha)
Move the state in parameter space along direction dir with scale alpha.
Definition: ColumnBundle.h:30