Path Integral Quantum Monte Carlo
 All Classes Files Functions Variables Typedefs Enumerations Defines
Public Member Functions | Public Attributes | Friends
Worm Class Reference

Contains information on the worm. More...

#include <worm.h>

List of all members.

Public Member Functions

 Worm (int)
 Constructor.
 ~Worm ()
 Destructor.
int beadOn (int, int) const
 Safely get a bead (int indexed)
int beadOn (const beadLocator &) const
 Safely get a bead (beadLocator indexed)
beadState getState (const beadLocator &) const
 Get the state of the supplied bead?
double factor (const beadState, const beadLocator &) const
 Compute the value of the potential action trajectory factor.
void delBead (int, int)
 Safely delete a bead (int indexed)
void addBead (int, int)
 Safely add a bead (int indexed)
void delBead (const beadLocator &)
 Safely delete a bead (beadLocator indexed)
void addBead (const beadLocator &)
 Safely add a bead (beadLocator indexed)
void reset ()
 Reset the worm to a null state.
void update (Path &, const beadLocator &, const beadLocator &)
 We update all worm properties for a new head and tail.
bool foundBead (const Path &, const beadLocator &)
 Test to see if a supplied bead is located on a worm.
bool tooCostly ()
 Return true if the worm is too costly.
bool tooCostly (const dVec &_sep, int _gap)
 Return true if the worm is too costly.
const Array< unsigned int, 2 > & getBeads () const
 Return the bead list.
int getNumBeadsOn () const
 Return the number of active beads.
void incNumBeadsOn ()
 Increment the number of active beads.
void decNumBeadsOn ()
 Decrement the number of active beads.
void resetNumBeadsOn ()
 Reset the number of active beads.

Public Attributes

beadLocator head
 The coordinates of the worm head.
beadLocator tail
 The coordinates of the worm tail.
beadLocator special1
 Special bead, used in move updates.
beadLocator special2
 Special bead, used in move updates.
double maxWormCost
 The maximum 'cost' of inserting a worm.
dVec sep
 The spatial separation between head and tail.
int length
 The length of the worm.
int gap
 numTimeSlices - length
bool isConfigDiagonal
 Stores the diagonality of the configuration.

Friends

class Path
class PathIntegralMonteCarlo

Detailed Description

Contains information on the worm.

In a grand-canonical or worm simulation, one world line may lose its periodicity in imaginary time. This class holds all parameters and methods used to describe worm configurations.

Definition at line 25 of file worm.h.


Constructor & Destructor Documentation

Worm::Worm ( int  numParticles)

Constructor.

Initialize the worm object.

Parameters:
numParticlesThe number of particles

Definition at line 22 of file worm.cpp.


Member Function Documentation

void Worm::decNumBeadsOn ( ) [inline]

Decrement the number of active beads.

Definition at line 91 of file worm.h.

const Array<unsigned int, 2>& Worm::getBeads ( ) const [inline]

Return the bead list.

Definition at line 83 of file worm.h.

int Worm::getNumBeadsOn ( ) const [inline]

Return the number of active beads.

Definition at line 87 of file worm.h.

void Worm::incNumBeadsOn ( ) [inline]

Increment the number of active beads.

Definition at line 89 of file worm.h.

void Worm::resetNumBeadsOn ( ) [inline]

Reset the number of active beads.

Definition at line 93 of file worm.h.

void Worm::update ( Path path,
const beadLocator newHead,
const beadLocator newTail 
)

We update all worm properties for a new head and tail.

Given new head and tail positions, we assign them and compute the gap, length and separation, while turning off all special flags.

Definition at line 69 of file worm.cpp.


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