3-dimensional functions¶
3d basis functions \(f(r)\), where \(r\) is the magnitude of a 3d vector.
func3d objects¶
All func3d objects have the following interface, and the input arrays rvec and r are the same for all functions
- __init__()¶
Initialize the parameters of the function in the dictionary self.parameters
- value(rvec, r)¶
Evaluate the function f(r).
- Parameters:
rvec – (nconfig,…,3)
r – (nconfig,…)
- Returns:
function value \(f(r)\)
- Return type:
(nconfig,...)array
- gradient(rvec, r)¶
Evaluate the gradient \(\nabla f(r)\)
- Returns:
function gradient \((\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z})\)
- Return type:
(nconfig, ..., 3)array
- gradient_value(rvec, r)¶
Evaluate the gradient and value together \(\nabla f(r), f(r)\)
- Returns:
function gradient and value
- Return type:
tuple of
(nconfig, ...), (nconfig, ..., 3)arrays
- laplacian(rvec, r)¶
Evaluate the laplacian \(\nabla^2 f(r)\)
- Returns:
laplacian as \((\frac{\partial^2 f}{\partial x^2}, \frac{\partial^2 f}{\partial y^2}, \frac{\partial^2 f}{\partial z^2})\)
- Return type:
(nconfig, ..., 3)array
- gradient_laplacian(rvec, r)¶
Evaluate the gradient an laplacian together \(\nabla f(r), \nabla^2f(r)\)
- Returns:
gradient and laplacian
- Return type:
two
(nconfig, ..., 3)arrays
- pgradient(rvec, r)¶
Evaluate the gradient with respect to parameter(s)
- Returns:
parameter gradient {‘pname’: \(\frac{\partial f}{\partial p}\)}
- Return type:
dictionary, values are
(nconfig, ...)arrays