JDFTx  1.2.0
WannierMinimizerRS.h
1 /*-------------------------------------------------------------------
2 Copyright 2014 Ravishankar Sundararaman
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_WANNIER_WANNIERMINIMIZERRS_H
21 #define JDFTX_WANNIER_WANNIERMINIMIZERRS_H
22 
23 #include <wannier/WannierMinimizer.h>
24 
26 {
27 public:
28  WannierMinimizerRS(const Everything& e, const Wannier& wannier);
29 
30  void initialize(int iSpin);
31  double getOmega(bool grad);
32  double getOmegaI(bool grad);
33 
34 private:
35  VectorField r; ScalarField rSq; //r and r^2 wrapped on the Wigner-Seitz cell
36  int iSpin;
37  int nStart, nStop;
38  double getOmega(bool grad, bool invariant); //compute Omega or OmegaI depending on invariant
39 };
40 
41 #endif // JDFTX_WANNIER_WANNIERMINIMIZERRS_H
Base class for different wannier minimizers:
Definition: WannierMinimizer.h:48
double getOmega(bool grad)
Definition: WannierMinimizerRS.h:25
Definition: Everything.h:41
void initialize(int iSpin)
Prepare for minimization of spin channel iSpin.
std::shared_ptr< ScalarFieldData > ScalarField
A smart reference-counting pointer to ScalarFieldData.
Definition: ScalarField.h:41
Compute Maximally-Localized Wannier Functions.
Definition: Wannier.h:29