Internals

Minimization

ClassicalDFT.update!Method
update!(ρ::Array, solver::AbstractSolver, ρEL::Array)

Update the density profile ρ according to the solve method solver with given difference Δρ of right and left hand side of the DFT Euler-Lagrange equation.

See also solve.

source

Geometries

ClassicalDFT.applyboundary!Function
applyboundary!(a::Array, geom::AbstractGeometry, mask=boundarymask(geom))

Apply boundary conditions of geometry geom to a.

source
ClassicalDFT.boundarymaskMethod
boundarymask(geom::AbstractGeometry)

Return bool array which is true in regions that are controlled by the boundary conditions.

source
ClassicalDFT.ensurepadding!Method
ensurepadding!(geom::AbstractGeometry, pad::Number)

Ensure that the geometry geom has at least a padding pad at the boundaries.

source

Functionals

ClassicalDFT.Fexc_funcMethod
Fexc_func(functional::AbstractFunctional)

Return the excess free energy $F_\mathrm{exc}[\rho]$ for a given functional.

source
ClassicalDFT.c₁_funcMethod
c₁_func(functional::AbstractFunctional)

Return the direct correlation function $c_1(\vec{r}; [\rho])$ for a given functional.

source
ClassicalDFT.Ω_funcMethod
Ω_func(functional::AbstractFunctional)

Return the grand potential $\Omega[\rho]$ for a given functional.

source
ClassicalDFT.AbstractFMTFunctionalType

Abstract base class for functionals that describe hard core systems with fundamental measure theory (FMT).

The excess free energy possesses the general form

$\beta F_\mathrm{exc}[\rho] = \int \mathrm{d}\vec{r} \Phi(\{n_\alpha(\vec{r})\})$

with (scalar and vectorial) weighted densities $n_\alpha(\vec{r}) = (\omega_\alpha * \rho)(\vec{r})$ that are obtained from convolutions of the density profile $\rho(\vec{r})$ with appropriate weight functions $\{\omega_\alpha(\vec{r})\}$.

Subclasses can differ in the form of $\Phi(\{n_\alpha(\vec{r})\})$ and in the choice of $\{\omega_\alpha\}$.

source
ClassicalDFT.AbstractMeanFieldFunctionalType

Abstract base class for mean-field functionals.

The excess free energy is given by

$F_\mathrm{exc}[\rho] = \frac{1}{2} \int \mathrm{d}\vec{r} \int \mathrm{d}\vec{r}' \rho(\vec{r}) \rho(\vec{r}') \phi(\vert\vec{r} - \vec{r}'\vert)$

where $\phi(\vert\vec{r} - \vec{r}'\vert)$ is the contribution of the pair potential that is treated via the mean-field approximation.

Subclasses can differ in the form of $\phi(\vert\vec{r} - \vec{r}'\vert)$.

source

Callbacks

Types

Utils

ClassicalDFT.conv1dFunction
conv1d(f::Vector, g::Vector, dx::Number=1; fft::Bool=true, kwargs...)

Wrapper for evaluating one-dimensional convolutions in real or Fourier space (depending on the value of fft).

Elements of f and g can be scalar or SVectors. kwargs are forwarded to the low-level convolution methods.

See also conv1d_direct, conv1d_fft.

source
ClassicalDFT.conv1d_directFunction
conv1d_direct(f::AbstractVector{<:AbstractFloat}, g::AbstractVector{<:AbstractFloat}, dx::Number=1)

Evaluate a one-dimensional convolution via explicit integration in real space.

f and g are assumed to be given on a grid of discretization dx and to be periodic, so suitable padding has to be applied before calling this function.

source
ClassicalDFT.conv1d_fftFunction
conv1d_fft(f::AbstractVector{<:AbstractFloat}, g::AbstractVector{<:AbstractFloat}, dx::Number=1; convplan=plan_conv1d_fft(f))

Evaluate a one-dimensional convolution via the convolution theorem in Fourier space.

f and g are assumed to be given on a grid of discretization dx and to be periodic, so suitable padding has to be applied before calling this function. A convplan can be provided for performance to plan the real FFT and preallocate buffers.

See also plan_conv1d_fft.

source
ClassicalDFT.convradialMethod
convradial(f::Vector, g::Vector, rs::Vector; kwargs...)

Wrapper for evaluating convolutions of radial functions that were integrated out over the solid angle $\Omega$ and that are given on the radial grid rs.

Elements of f and g can be scalar (for scalar functions $a(r)$) or SVectors (for vectorial functions $\vec{a}(r) = a(r) \hat{e}_r$). When integrating out vectorial functions of the latter form over $\Omega$, two contributions arise, which are defined to be the components of the SVector. kwargs are forwarded to the one-dimensional convolution method.

See also SphericalGeometry, conv1d.

source