ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
sccs_pw_coulomb.h
Go to the documentation of this file.
1#ifndef SCCS_PW_COULOMB_H
2#define SCCS_PW_COULOMB_H
3
4#include "sccs_coulomb.h"
5
6#include <complex>
7#include <vector>
8
9namespace ModulePW
10{
11class PW_Basis;
12}
13
14namespace ModuleSccs
15{
16// Potential in Hartree for a signed charge density in e/Bohr^3. Calls are
17// collective over the ABACUS pool used to initialize basis. G=0 is removed:
18// this is the periodic Coulomb inverse with a uniform background.
20{
21 public:
22 PeriodicCoulombOperator(const ModulePW::PW_Basis &basis, double tpiba);
23 bool has_correction() const override;
24 CoulombTransformCounts fft_counts() const override { return counts_; }
25 void apply_potential(const std::vector<double> &charge, std::vector<double> &potential) override;
26
27 private:
30 const double tpiba_;
31 // Scratch only, overwritten on each call; PW_Basis FFTs are also non-reentrant.
32 std::vector<std::complex<double>> reciprocal_work_;
33};
34} // namespace ModuleSccs
35
36#endif
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:60
Definition sccs_coulomb.h:17
bool has_correction() const override
Definition sccs_pw_coulomb.cpp:13
CoulombTransformCounts counts_
Definition sccs_pw_coulomb.h:28
PeriodicCoulombOperator(const ModulePW::PW_Basis &basis, double tpiba)
Definition sccs_pw_coulomb.cpp:8
const ModulePW::PW_Basis & basis_
Definition sccs_pw_coulomb.h:29
CoulombTransformCounts fft_counts() const override
Definition sccs_pw_coulomb.h:24
const double tpiba_
Definition sccs_pw_coulomb.h:30
void apply_potential(const std::vector< double > &charge, std::vector< double > &potential) override
Definition sccs_pw_coulomb.cpp:15
std::vector< std::complex< double > > reciprocal_work_
Definition sccs_pw_coulomb.h:32
Definition pw_op.cpp:3
Definition sccs_fixed_src.h:11
Definition sccs_coulomb.h:9