ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleDFPT::XC_First_Order Class Referenceabstract

First-order exchange-correlation kernel contract (C6). More...

#include <dfpt_rho.h>

Collaboration diagram for ModuleDFPT::XC_First_Order:

Public Member Functions

virtual ~XC_First_Order ()=default
virtual void set_context (const ModuleBase::Vector3< double > &q_cart) const
virtual void apply (const std::vector< std::complex< double > > &drho_r, std::vector< std::complex< double > > &dvxc_r) const =0

Detailed Description

First-order exchange-correlation kernel contract (C6).

Production adapters live at the esolver wiring layer (C7): the complex q-shifted density amplitude drho_r is split into Re/Im parts, fed through the real-space finite-difference kernel (elecstate::PotXC_FDM, delta V_xc = V_xc[rho0 + drho] - V_xc[rho0]) and recombined - linear superposition is exact up to O(|drho|^2). module_dfpt itself never includes pot_xc_fdm.h (minimal header dependencies), mirroring the DFPT_Stern::LinearOperator injection convention.

Constructor & Destructor Documentation

◆ ~XC_First_Order()

virtual ModuleDFPT::XC_First_Order::~XC_First_Order ( )
virtualdefault

Member Function Documentation

◆ apply()

virtual void ModuleDFPT::XC_First_Order::apply ( const std::vector< std::complex< double > > & drho_r,
std::vector< std::complex< double > > & dvxc_r ) const
pure virtual

dvxc_r(r) = delta V_xc[drho_r](r), complex q-shifted amplitude on the shared real-space grid. Implementations must not resize or alias drho_r; dvxc_r is resized to drho_r.size() and fully overwritten.

◆ set_context()

virtual void ModuleDFPT::XC_First_Order::set_context ( const ModuleBase::Vector3< double > & q_cart) const
inlinevirtual

Optional per-q context before the first apply of a new phonon q (cartesian, ucell::G units). Analytic GGA kernels need the phonon q so the gradient operator acts as i(G + q) on the physical carrier; amplitude-grid implementations ignore it (their gradient of the carrier-free amplitude is only exact at q = 0). Const like apply: the kernel is held as pointer-to-const by the solver, and context injection between solves is the sanctioned state change.


The documentation for this class was generated from the following file: