Path Integral Quantum Monte Carlo
Public Member Functions | Public Attributes | Friends | List of all members
Path Class Reference

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 dVecoperator() (int slice, int ptcl) const
 Operator Overloading to skip having to specifically grab .beads.
 
dVecoperator() (int slice, int ptcl)
 Operator Overloading to skip having to specifically grab .beads.
 
const dVecoperator() (const beadLocator &beadIndex) const
 Operator Overloading to skip having to specifically grab .beads.
 
dVecoperator() (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. More...
 
void outputConfig (int) const
 Output the world-line configurations in a generic format. More...
 
beadLocatornext (int slice, int ptcl)
 Move one link forward in imaginary time.
 
const beadLocatornext (int slice, int ptcl) const
 Move one link forward in imaginary time.
 
beadLocatornext (const beadLocator &beadIndex)
 Move one link forward in imaginary time.
 
const beadLocatornext (const beadLocator &beadIndex) const
 Move one link forward in imaginary time.
 
beadLocatorprev (int slice, int ptcl)
 Move one link backward in imaginary time.
 
const beadLocatorprev (int slice, int ptcl) const
 Move one link backward in imaginary time.
 
beadLocatorprev (const beadLocator &beadIndex)
 Move one link backward in imaginary time.
 
const beadLocatorprev (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...
 

Public Attributes

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 ContainerboxPtr
 A constant reference to the container class.
 
Worm worm
 Details on the worm.
 
LookupTablelookup
 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
 

Detailed Description

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.

Definition at line 29 of file path.h.

Constructor & Destructor Documentation

◆ Path()

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.

Parameters
_boxPtrThe pointer to the simulation cell
_lookupThe nearest neighbor lookup table
_numTimeSlicesThe number of imaginary time slices
initialPosThe initial configuration of particles

Definition at line 28 of file path.cpp.

◆ ~Path()

Path::~Path ( )

Destructor.

Kill all blitz arrays

Definition at line 117 of file path.cpp.

Member Function Documentation

◆ addBead()

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;

Parameters
sliceThe time slice where the new bead will be added.
posThe new spatial position of the bead
Returns
a beadLocator for the new bead

Definition at line 250 of file path.cpp.

◆ addCenterLink()

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.

◆ addNextBead()

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.

Returns
next(prevIndex)

Definition at line 194 of file path.cpp.

◆ addPrevBead()

beadLocator Path::addPrevBead ( const beadLocator nextIndex,
const dVec pos 
)

Add a bead at the previous time slice.

We add a single bead to our configuration at one previous time slice from the supplied bead.

Returns
prev(nextIndex)

Definition at line 221 of file path.cpp.

◆ breakFactor()

double Path::breakFactor ( const beadLocator beadIndex1,
const beadLocator beadIndex2 
) const

Returns factor for broken worldines.

Return a constatnt factor for worldine breaks.

Definition at line 502 of file path.cpp.

◆ breakLink()

void Path::breakLink ( const beadLocator beadIndexL)

Break the link to right of bead.

Break a link to right of bead.

Definition at line 406 of file path.cpp.

◆ checkSubregionLinks()

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.

◆ delBead()

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.

◆ delBeadGetNext()

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.

◆ delBeadGetPrev()

beadLocator Path::delBeadGetPrev ( const beadLocator beadIndex)

Delete a bead and move backwards.

Delete a single bead and return the index of the preivous bead in imaginary time.

Definition at line 309 of file path.cpp.

◆ inSubregionA()

bool Path::inSubregionA ( const beadLocator beadIndex) const

Checks to see if bead is in subregion A/B at break slice + 1.

Check if bead is in subregion A.

Definition at line 518 of file path.cpp.

◆ isBroken()

bool Path::isBroken ( const beadLocator beadIndex) const

Checks to see if worldline is broken.

Check to see if worldline is broken at beadIndex.

Definition at line 492 of file path.cpp.

◆ leftPack()

void Path::leftPack ( )

Initialize any loaded state by left packing the array.

Go through all data arrays, and make sure the active beads are packed at the beginning (LHS) of the array.

Definition at line 130 of file path.cpp.

◆ outputConfig()

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.

◆ printLinks()

template<class Tstream >
void Path::printLinks ( Tstream &  outStream)

Output bead-link info, used for debugging.

Definition at line 250 of file path.h.

◆ printWormConfig()

void Path::printWormConfig ( Array< beadLocator, 1 > &  wormBeads)

Used when debugging worm configurations.

We print out the current link and bead configuration to visualize a worm.

Definition at line 743 of file path.cpp.

◆ removeCenterLink()

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.

◆ resetBrokenClosedVecs()

void Path::resetBrokenClosedVecs ( )

Reset broken/closed worldline vectors.

Reset broken bead lists.

Definition at line 459 of file path.cpp.

◆ updateBead()

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.


The documentation for this class was generated from the following files: