26 inline double operator()(
double r,
double rinv)
const {
return rinv; }
27 inline double Vk(
double k)
const {
return 1. / (k * k); }
28 inline double dVk_dk(
double k)
const {
return -2 *
norm / (k * k * k); }
31 inline double df(
double r)
const {
return -1. / (r * r); }
56 std::cout <<
"handler.MaxKshell is " << handler.
MaxKshell << std::endl;
57 CHECK( (std::is_same<OHMMS_PRECISION, OHMMS_PRECISION_FULL>::value ?
66 for (
int ir = 1; ir < nr; ir++)
73 CHECK(vsr == Approx(0.0));
101 std::cout <<
"handler.MaxKshell is " << handler.
MaxKshell << std::endl;
102 CHECK( (std::is_same<OHMMS_PRECISION, OHMMS_PRECISION_FULL>::value ?
111 mRealType vsrm, vsrp, dvsr, vlrm, vlrp, dvlr;
113 std::vector<mRealType> rlist = {0.1, 0.5, 1.0, 2.0, 2.5};
114 for (
auto it = rlist.begin(); it != rlist.end(); ++it)
126 dvsr = (vsrp - vsrm) / (2 * dr);
128 CHECK(handler.
srDf(r, rinv) == Approx(dvsr));
130 dvlr = (vlrp - vlrm) / (2 * dr);
133 CHECK(dvsr + dvlr == Approx(fref.
df(r)));
a class that defines a supercell in D-dimensional Euclean space.
const auto & getLRBox() const
double df(double r) const
void reset()
Evaluate the reciprocal vectors, volume and metric tensor.
helper functions for EinsplineSetBuilder
mRealType LR_kc
Maximum k cutoff.
DECLARE_COULOMB_TYPES int MaxKshell
Maxkimum Kshell for the given Kc.
TEST_CASE("complex_helper", "[type_traits]")
EwaldHandler3D::mRealType mRealType
double dVk_dk(double k) const
Declaration of CrystalLattice<T,D>
double Vk(double k) const
void reset(ParticleSet &ref)
void initBreakup(ParticleSet &ref) override
TinyVector< SingleParticlePos, D > Rv
Real-space unit vectors.
mRealType lrDf(mRealType r) const override
Specialized paritlce class for atomistic simulations.
mRealType srDf(mRealType r, mRealType rinv) const override
evaluate the first derivative of the short range part at r
Scalar_t Volume
Physical properties of a supercell.
TinyVector< int, D > BoxBConds
The boundary condition in each direction.
mRealType LR_rc
Maximum r cutoff.
void diagonal(const T &rhs)
mRealType evaluateLR(mRealType r) const override
evaluate the contribution from the long-range part for for spline
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
void createSK()
create Structure Factor with PBCs
mRealType evaluate(mRealType r, mRealType rinv) const override
Define a LRHandler with two template parameters.
void reset(ParticleSet &ref, double rs)
Tensor_t R
Real-space unit vectors. R(i,j) i=vector and j=x,y,z.
double operator()(double r, double rinv) const