8 real_function_3d
make_dft_potential(World& world,
const XCfunctional&
xc,
const vector_real_function_3d& vf,
int ispin,
int what)
10 return multiop_values<double, xc_potential, 3>(xc_potential(
xc, ispin, what), vf);
13 double make_dft_energy(World& world,
const XCfunctional&
xc,
const vector_real_function_3d& vf,
int ispin)
15 real_function_3d vlda = multiop_values<double, xc_functional, 3>(xc_functional(
xc, ispin), vf);
19 std::pair<real_function_3d, double>
apply_xc(World& world,
const XCfunctional&
xc, real_function_3d& rho)
21 vector_real_function_3d delrho;
22 vector_real_function_3d vf;
30 Derivative<double,3>
D = free_space_derivative<double,3>(world,
axis);
31 delrho.push_back(
D(rho));
33 real_function_3d saa = delrho[0]*delrho[0]+delrho[1]*delrho[1]+delrho[2]*delrho[2];
37 reconstruct(world, vf);
39 refine_to_common_level(world,vf);
50 Derivative<double,3>
D = free_space_derivative<double,3>(world,
axis);
51 real_function_3d gradn =
D(rho);
52 real_function_3d ddel = vsigaa*gradn;
55 real_function_3d vxc2=
D(ddel).truncate();
59 return std::pair<real_function_3d, double>(vxc, exc);
Definition wst_functional.h:5
std::pair< real_function_3d, double > apply_xc(World &world, const XCfunctional &xc, real_function_3d &rho)
Definition wst_functional.h:19
double make_dft_energy(World &world, const XCfunctional &xc, const vector_real_function_3d &vf, int ispin)
Definition wst_functional.h:13
real_function_3d make_dft_potential(World &world, const XCfunctional &xc, const vector_real_function_3d &vf, int ispin, int what)
Definition wst_functional.h:8
Function< T, NDIM > & scale(const Q q, bool fence=true)
Inplace, scale the function by a constant. No communication except for optional fence.
Definition mra.h:953
Function< T, NDIM > & truncate(double tol=0.0, bool fence=true)
Truncate the function with optional fence. Compresses with fence if not compressed.
Definition mra.h:602
Main include file for MADNESS and defines Function interface.
XCfunctional xc
Definition newsolver_lda.cc:53
Definition test_ar.cc:204
std::size_t axis
Definition testpdiff.cc:59