DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
eshelbyTensor.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
4// authors.
5//
6// This file is part of the DFT-FE code.
7//
8// The DFT-FE code is free software; you can use it, redistribute
9// it, and/or modify it under the terms of the GNU Lesser General
10// Public License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12// The full text of the license can be found in the file LICENSE at
13// the top level of the DFT-FE distribution.
14//
15// ---------------------------------------------------------------------
16
17
18
19#ifndef eshelby_H_
20#define eshelby_H_
21#include "constants.h"
22#include "headers.h"
23
24namespace dftfe
25{
26 /**
27 * @brief The functions in this namespace contain the expressions for the various terms of the configurational force (https://link.aps.org/doi/10.1103/PhysRevB.97.165132)
28 * for both periodic (see Eq. 38) and non-periodic (see Eqs. 28-29) case.
29 *
30 * Basically, the configurational force is the Gateaux derivative
31 * of the Kohn-Sham saddle point problem with respect to perturbations of the
32 * underlying space due to generic generator (which can be affine perturbation
33 * in case of stress computation or an atom centered generator with a compact
34 * support for computing the forces). The terms in the configurational force
35 * can be grouped into two types: one type can be written as contraction of
36 * Eshelby tensors (second order tensor) with the gradient of the Generator.
37 * Another type involves contraction of first order tensors with the
38 * Generator. The functions in this class provide expressions for the left
39 * side of the contraction operation- the second order Eshelby tensors
40 * (denoted by E*) and the first order force tensors (denoted by F*). General
41 * nomenclature of the input arguments: a) phiTot- total electrostatic
42 * potential b) phiExt- sum of electrostatic potential from all nuclear
43 * charges c) rho- electron density d) gradRho- gradient of electron density
44 * e) exc- exchange correlation energy
45 * f) derExcGradRho- derivative of exc with gradient of rho
46 * g) psiBegin- begin iterator to vector eigenvectors stored as a flattened
47 * array over k points and number of eigenvectors for each k point (periodic
48 * case has complex valued eigenvectors which is why
49 * dealii::Tensor<1,2,dealii::VectorizedArray<double> is used in functions for
50 * periodic case) h) gradPsiBegin- gradient of eigenvectors i) eigenValues-
51 * Kohn sham grounstate eigenvalues stored in a vector. For periodic problems
52 * with multiple k points the outer vector should be over k points j) tVal-
53 * smearing temperature in K k) pseudoVLoc- local part of the pseudopotential
54 * l) gradPseudoVLoc- gradient of local part of pseudopotential m) ZetaDeltaV-
55 * nonlocal pseudowavefunctions times deltaV (see Eq. 11 in
56 * https://link.aps.org/doi/10.1103/PhysRevB.97.165132) n) gradZetaDeltaV-
57 * gradient of ZetaDeltaV o) projectorKetTimesPsiTimesV- nonlocal
58 * pseudopotential projector ket times eigenvectors which are precomputed. The
59 * nonlocal pseudopotential constants are also multiplied to this quantity.
60 * (see Eq. 11 in https://link.aps.org/doi/10.1103/PhysRevB.97.165132)
61 *
62 * @author Sambit Das
63 */
64 namespace eshelbyTensor
65 {
66 /// Eshelby tensor from sum of electrostatic potential from all nuclear
67 /// charges (only used for testing purpose)
68 dealii::Tensor<2, 3, dealii::VectorizedArray<double>>
70 const dealii::VectorizedArray<double> & phiExt,
71 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>> &gradPhiExt);
72
73 /// Eshelby tensor corresponding to nuclear self energy (only used for
74 /// testing purpose)
75 dealii::Tensor<2, 3, dealii::VectorizedArray<double>>
77 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>> &gradVself);
78
79 /// Eshelby tensor corresponding to nuclear self energy
80 dealii::Tensor<2, 3, double>
81 getVselfBallEshelbyTensor(const dealii::Tensor<1, 3, double> &gradVself);
82
83
84
85 /// All-electron electrostatic part of the Eshelby tensor
86 dealii::Tensor<2, 3, dealii::VectorizedArray<double>>
88 const dealii::VectorizedArray<double> & phiTot,
89 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>> &gradPhiTot,
90 const dealii::VectorizedArray<double> & rho);
91
92 /// exchange-correlation part of the ELoc Eshelby tensor
93 dealii::Tensor<2, 3, dealii::VectorizedArray<double>>
95 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>> &gradRho,
96 const dealii::VectorizedArray<double> & exc,
97 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>>
98 &derExcGradRho);
99
100
101 /// psp part of the ELoc Eshelby tensor
102 dealii::Tensor<2, 3, dealii::VectorizedArray<double>>
103 getELocPspEshelbyTensor(const dealii::VectorizedArray<double> &rho,
104 const dealii::VectorizedArray<double> &pseudoVLoc,
105 const dealii::VectorizedArray<double> &phiExt);
106
107 /// Local pseudopotential force contribution
108 dealii::Tensor<1, 3, dealii::VectorizedArray<double>>
110 const dealii::VectorizedArray<double> rho,
111 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>>
112 &gradPseudoVLoc,
113 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>> &gradPhiExt);
114
115
116 /// Nonlocal core correction pseudopotential force contribution
117 dealii::Tensor<1, 3, dealii::VectorizedArray<double>>
119 const dealii::VectorizedArray<double> & vxc,
120 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>> &gradRhoCore);
121
122 /// Nonlocal core correction pseudopotential force contribution
123 dealii::Tensor<1, 3, dealii::VectorizedArray<double>>
125 const dealii::Tensor<1, 3, dealii::VectorizedArray<double>>
126 &derExcGradRho,
127 const dealii::Tensor<2, 3, dealii::VectorizedArray<double>>
128 &hessianRhoCore);
129
130 }; // namespace eshelbyTensor
131
132} // namespace dftfe
133#endif
The functions in this namespace contain the expressions for the various terms of the configurational ...
Definition eshelbyTensor.h:65
dealii::Tensor< 2, 3, dealii::VectorizedArray< double > > getELocXcEshelbyTensor(const dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > &gradRho, const dealii::VectorizedArray< double > &exc, const dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > &derExcGradRho)
exchange-correlation part of the ELoc Eshelby tensor
dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > getFNonlinearCoreCorrection(const dealii::VectorizedArray< double > &vxc, const dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > &gradRhoCore)
Nonlocal core correction pseudopotential force contribution.
dealii::Tensor< 2, 3, dealii::VectorizedArray< double > > getVselfBallEshelbyTensor(const dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > &gradVself)
dealii::Tensor< 2, 3, dealii::VectorizedArray< double > > getEElectroEshelbyTensor(const dealii::VectorizedArray< double > &phiTot, const dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > &gradPhiTot, const dealii::VectorizedArray< double > &rho)
All-electron electrostatic part of the Eshelby tensor.
dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > getFPSPLocal(const dealii::VectorizedArray< double > rho, const dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > &gradPseudoVLoc, const dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > &gradPhiExt)
Local pseudopotential force contribution.
dealii::Tensor< 2, 3, dealii::VectorizedArray< double > > getPhiExtEshelbyTensor(const dealii::VectorizedArray< double > &phiExt, const dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > &gradPhiExt)
dealii::Tensor< 2, 3, dealii::VectorizedArray< double > > getELocPspEshelbyTensor(const dealii::VectorizedArray< double > &rho, const dealii::VectorizedArray< double > &pseudoVLoc, const dealii::VectorizedArray< double > &phiExt)
psp part of the ELoc Eshelby tensor
Definition pseudoPotentialToDftfeConverter.cc:34
@ gradRho
Definition mixingClass.h:34
@ rho
Definition mixingClass.h:33