Path Integral Quantum Monte Carlo
|
Pre-tabulated potential for complicated functions. More...
#include <potential.h>
Public Member Functions | |
TabulatedPotential () | |
Constructor. | |
virtual | ~TabulatedPotential () |
Destructor. | |
Protected Member Functions | |
void | initLookupTable (const double, const double) |
Given a discretization factor and the system size, create and fill the lookup tables for the potential and its derivative. | |
virtual double | newtonGregory (const Array< double, 1 > &, const TinyVector< double, 2 > &, const double) |
Use the Newton-Gregory forward difference method to do a 2-point lookup on the potential table. More... | |
virtual double | direct (const Array< double, 1 > &, const TinyVector< double, 2 > &, const double) |
Use a direct lookup for the potential table. More... | |
virtual double | valueV (const double)=0 |
The functional value of V. | |
virtual double | valuedVdr (const double)=0 |
The functional value of dV/dr. | |
virtual double | valued2Vdr2 (const double)=0 |
The functional value of d2V/dr2. | |
Protected Attributes | |
Array< double, 1 > | lookupV |
A potential lookup table. | |
Array< double, 1 > | lookupdVdr |
A lookup table for dVint/dr. | |
Array< double, 1 > | lookupd2Vdr2 |
A lookup table for d2Vint/dr2. | |
double | dr |
The discretization for the lookup table. | |
int | tableLength |
The number of elements in the lookup table. | |
TinyVector< double, 2 > | extV |
Extremal value of V. | |
TinyVector< double, 2 > | extdVdr |
Extremal value of dV/dr. | |
TinyVector< double, 2 > | extd2Vdr2 |
Extremal value of d2V/dr2. | |
Pre-tabulated potential for complicated functions.
In order to speed up the evaluation of complicated potentials, we use a 2-point Newton-Gregory spline fit to perform the actual interpolation.
Definition at line 80 of file potential.h.
|
protectedvirtual |
Use a direct lookup for the potential table.
This is faster thant Newton-Gregory and may give similar results for a fine enough mesh.
Definition at line 255 of file potential.cpp.
|
protectedvirtual |
Use the Newton-Gregory forward difference method to do a 2-point lookup on the potential table.
Definition at line 226 of file potential.cpp.