excgrid 0.1.0
Grid + XC-kernel + D3 library
Loading...
Searching...
No Matches
The per-point XC kernel API

Classes

struct  excgrid::XcKernelValue
class  excgrid::XcFunctional

Typedefs

using excgrid::LdaKernel = XcKernelValue (*)(double rhoA, double rhoB)
using excgrid::GgaKernel

Functions

constexpr XcKernelValue excgrid::operator+ (const XcKernelValue &a, const XcKernelValue &b) noexcept
constexpr XcKernelValueexcgrid::operator+= (XcKernelValue &a, const XcKernelValue &b) noexcept
constexpr XcKernelValue excgrid::operator* (double weight, const XcKernelValue &v) noexcept
constexpr XcKernelValue excgrid::operator* (const XcKernelValue &v, double weight) noexcept
const XcFunctionalexcgrid::FindFunctional (std::string_view name) noexcept
std::span< const std::string_view > excgrid::FunctionalNames () noexcept

Detailed Description

The frozen seam between excgrid's functionals and their consumers (docs/kernel-api.md is the governing contract; this header is its implementation). Units are Libxc's everywhere: densities in electrons/Bohr^3, sigma in Bohr^-8, energy densities in Hartree/Bohr^3, potentials in Hartree (vrho) and Hartree * Bohr^5 (vsigma).

Typedef Documentation

◆ GgaKernel

Initial value:
XcKernelValue (*)(double rhoA, double rhoB, double sigmaAa, double sigmaAb, double sigmaBb)
Definition kernel.hpp:24

GGA kernel: additionally consumes the three sigma inputs and returns the three vsigma derivatives.

◆ LdaKernel

using excgrid::LdaKernel = XcKernelValue (*)(double rhoA, double rhoB)

LDA kernel: the energy density and its spin-density derivatives.

Function Documentation

◆ FindFunctional()

const XcFunctional * excgrid::FindFunctional ( std::string_view name)
noexcept

Resolves a functional by its shipped name (docs/kernel-api.md section 4); null when unknown. Name-string resolution, never an enum - enums drift with repo releases, the consumer's schema carries the string.

Parameters
nameThe functional name.
Returns
The functional, or nullptr.

◆ FunctionalNames()

std::span< const std::string_view > excgrid::FunctionalNames ( )
noexcept

All shipped functional names, registry order.

Returns
The name span (owned by the registry).

◆ operator*() [1/2]

XcKernelValue excgrid::operator* ( const XcKernelValue & v,
double weight )
constexprnoexcept

Scalar weighting, mirrored order.

Parameters
vThe weighted value.
weightThe scalar weight.
Returns
The componentwise product.

◆ operator*() [2/2]

XcKernelValue excgrid::operator* ( double weight,
const XcKernelValue & v )
constexprnoexcept

Scalar weighting - functional composition by * (hybrid recipes).

Parameters
weightThe scalar weight.
vThe weighted value.
Returns
The componentwise product.

◆ operator+()

XcKernelValue excgrid::operator+ ( const XcKernelValue & a,
const XcKernelValue & b )
constexprnoexcept

Componentwise addition - functional composition by +.

Parameters
aThe first summand.
bThe second summand.
Returns
The componentwise sum.

◆ operator+=()

XcKernelValue & excgrid::operator+= ( XcKernelValue & a,
const XcKernelValue & b )
constexprnoexcept

Componentwise accumulation.

Parameters
aThe accumulator (updated).
bThe addend.
Returns
The updated accumulator.