Path Integral Quantum Monte Carlo
|
The space-time trajectories. More...
#include <path.h>
Public Member Functions | |
Path (const Container *, LookupTable &, int, const Array< dVec, 1 > &, int numberBroken=0) | |
Constructor. More... | |
~Path () | |
Destructor. More... | |
int | getNumParticles () const |
Get the size of the worldline array. | |
int | getTrueNumParticles () const |
The number of active particles. | |
const dVec & | operator() (int slice, int ptcl) const |
Operator Overloading to skip having to specifically grab .beads | |
dVec & | operator() (int slice, int ptcl) |
Operator Overloading to skip having to specifically grab .beads | |
const dVec & | operator() (const beadLocator &beadIndex) const |
Operator Overloading to skip having to specifically grab .beads | |
dVec & | operator() (const beadLocator &beadIndex) |
Operator Overloading to skip having to specifically grab .beads | |
dVec | getVelocity (const beadLocator &) const |
Return the velocity between two time slices of a given particle as a ndim-vector. | |
dVec | getSeparation (const beadLocator &, const beadLocator &) const |
Return the separation vector between two particles in the same timeslice. | |
template<class Tstream > | |
void | printLinks (Tstream &) |
Output bead-link info, used for debugging. | |
void | outputConfig (int) const |
Output the world-line configurations in a generic format. More... | |
beadLocator & | next (int slice, int ptcl) |
Move one link forward in imaginary time. | |
const beadLocator & | next (int slice, int ptcl) const |
Move one link forward in imaginary time. | |
beadLocator & | next (const beadLocator &beadIndex) |
Move one link forward in imaginary time. | |
const beadLocator & | next (const beadLocator &beadIndex) const |
Move one link forward in imaginary time. | |
beadLocator & | prev (int slice, int ptcl) |
Move one link backward in imaginary time. | |
const beadLocator & | prev (int slice, int ptcl) const |
Move one link backward in imaginary time. | |
beadLocator & | prev (const beadLocator &beadIndex) |
Move one link backward in imaginary time. | |
const beadLocator & | prev (const beadLocator &beadIndex) const |
Move one link backward in imaginary time. | |
beadLocator | next (int, int, int) const |
Move an integer number of links forward in imaginary time. | |
beadLocator | next (const beadLocator &, int) const |
Move an integer number of links forward in imaginary time. | |
beadLocator | prev (int, int, int) const |
Move an integer number of links backward in imaginary time. | |
beadLocator | prev (const beadLocator &, int) const |
Move an integer number of links backward in imaginary time. | |
beadLocator | addBead (const int, const dVec &) |
Add a bead to the worldline configuration at a given slice. More... | |
beadLocator | addNextBead (const beadLocator &, const dVec &) |
Add a bead at the next time slice. More... | |
beadLocator | addPrevBead (const beadLocator &, const dVec &) |
Add a bead at the previous time slice. More... | |
void | delBead (const beadLocator &) |
Remove a bead from the world-line configuration. More... | |
beadLocator | delBeadGetNext (const beadLocator &) |
Delete a bead and move forwards. More... | |
beadLocator | delBeadGetPrev (const beadLocator &) |
Delete a bead and move backwards. More... | |
void | breakLink (const beadLocator &) |
Break the link to right of bead. More... | |
void | makeLink (const beadLocator &, const beadLocator &) |
Make a link between beads. | |
void | removeCenterLink (const beadLocator &) |
Break the link to right of bead t center slice AND update lists. More... | |
void | addCenterLink (const beadLocator &, const beadLocator &) |
Make a link between beads at center slice AND update lists. More... | |
bool | isBroken (const beadLocator &) const |
Checks to see if worldline is broken. More... | |
double | breakFactor (const beadLocator &, const beadLocator &) const |
Returns factor for broken worldines. More... | |
bool | inSubregionA (const beadLocator &) const |
Checks to see if bead is in subregion A/B at break slice + 1. More... | |
bool | inSubregionB (const beadLocator &) const |
Check if bead is in subregion B. | |
bool | checkSubregionLinks () const |
Check if only subregion worldlines are broken, for debugging. More... | |
void | updateBead (const beadLocator &, const dVec &) |
Update the position of a bead in the worldine configuration. More... | |
void | printWormConfig (Array< beadLocator, 1 > &) |
Used when debugging worm configurations. More... | |
void | leftPack () |
Initialize any loaded state by left packing the array. More... | |
void | resetBrokenClosedVecs () |
Reset broken/closed worldline vectors. More... | |
Data Fields | |
const int | numTimeSlices |
A local constant copy of the number of time slices. | |
int | breakSlice |
The location of the break in the path (0=>no break) | |
vector< int > | brokenWorldlinesL |
A list of particles with broken worldlines on left of break. | |
vector< int > | brokenWorldlinesR |
A list of particles with broken worldlines on right of break. | |
vector< int > | closedWorldlines |
A list of particles with closed worldlines on left of break. | |
const Container * | boxPtr |
A constant reference to the container class. | |
Worm | worm |
Details on the worm. | |
LookupTable & | lookup |
A reference to the nearest neighbor lookup table. | |
Array< int, 1 > | numBeadsAtSlice |
The number of active beads at a given time slice. | |
Friends | |
class | PathIntegralMonteCarlo |
The space-time trajectories.
Holds the actual particle wordlines, consisting of a fixed number of time slices for each particle with periodic boundary conditions in imaginary time.
Path::Path | ( | const Container * | _boxPtr, |
LookupTable & | _lookup, | ||
int | _numTimeSlices, | ||
const Array< dVec, 1 > & | initialPos, | ||
int | numberBroken = 0 |
||
) |
Constructor.
We initialize the all the data structures in path given a random initial configuration (classical) depending on the type of potential.
_boxPtr | The pointer to the simulation cell |
_lookup | The nearest neighbor lookup table |
_numTimeSlices | The number of imaginary time slices |
initialPos | The initial configuration of particles |
Definition at line 28 of file path.cpp.
Path::~Path | ( | ) |
Destructor.
Kill all blitz arrays
beadLocator Path::addBead | ( | const int | slice, |
const dVec & | pos | ||
) |
Add a bead to the worldline configuration at a given slice.
We add a single bead to our configuration by searching for a free position at the end of the wordline array. If no such position exists, all data structures are resized to accomidate the new bead;
slice | The time slice where the new bead will be added. |
pos | The new spatial position of the bead |
Definition at line 250 of file path.cpp.
void Path::addCenterLink | ( | const beadLocator & | beadIndexL, |
const beadLocator & | beadIndexR | ||
) |
Make a link between beads at center slice AND update lists.
Make a link between beads AND update lists.
Definition at line 441 of file path.cpp.
beadLocator Path::addNextBead | ( | const beadLocator & | prevIndex, |
const dVec & | pos | ||
) |
Add a bead at the next time slice.
We add a single bead to our configuration at one advanced time slice from the supplied bead.
Definition at line 194 of file path.cpp.
beadLocator Path::addPrevBead | ( | const beadLocator & | nextIndex, |
const dVec & | pos | ||
) |
double Path::breakFactor | ( | const beadLocator & | beadIndex1, |
const beadLocator & | beadIndex2 | ||
) | const |
Returns factor for broken worldines.
Return a constatnt factor for worldine breaks.
void Path::breakLink | ( | const beadLocator & | beadIndexL | ) |
bool Path::checkSubregionLinks | ( | ) | const |
Check if only subregion worldlines are broken, for debugging.
Check if bead is in subregion B.
Definition at line 545 of file path.cpp.
void Path::delBead | ( | const beadLocator & | beadIndex | ) |
Remove a bead from the world-line configuration.
We delete a single bead from our configuration and update the emptyWorldLine array. At the same point, we must update the nearest neighbor lookup table.
Definition at line 344 of file path.cpp.
beadLocator Path::delBeadGetNext | ( | const beadLocator & | beadIndex | ) |
Delete a bead and move forwards.
Delete a single bead and return the index of the next bead in imaginary time.
Definition at line 326 of file path.cpp.
beadLocator Path::delBeadGetPrev | ( | const beadLocator & | beadIndex | ) |
bool Path::inSubregionA | ( | const beadLocator & | beadIndex | ) | const |
bool Path::isBroken | ( | const beadLocator & | beadIndex | ) | const |
void Path::leftPack | ( | ) |
void Path::outputConfig | ( | int | configNumber | ) | const |
Output the world-line configurations in a generic format.
Output the worldline configuration to disk using a format suitable for plotting.
Definition at line 576 of file path.cpp.
void Path::printWormConfig | ( | Array< beadLocator, 1 > & | wormBeads | ) |
void Path::removeCenterLink | ( | const beadLocator & | beadIndexL | ) |
Break the link to right of bead t center slice AND update lists.
Break a link to right of bead AND update lists.
Definition at line 423 of file path.cpp.
void Path::resetBrokenClosedVecs | ( | ) |
void Path::updateBead | ( | const beadLocator & | beadIndex, |
const dVec & | pos | ||
) |
Update the position of a bead in the worldine configuration.
Given a beadIndex and spatial position, we assign the new bead location and update its position in the lookup table.
Definition at line 182 of file path.cpp.