Massively Parallel Trotter-Suzuki Solver  1.6.2
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Potential Class Reference

This class defines the external potential that is used for Hamiltonian class. More...

#include <trottersuzuki.h>

Inheritance diagram for Potential:
HarmonicPotential

Public Member Functions

 Potential (Lattice *grid, char *filename)
 
 Potential (Lattice *grid, double *external_pot=0)
 
 Potential (Lattice *grid, double(*potential_function)(double x, double y))
 
 Potential (Lattice *grid, double(*potential_function)(double x, double y, double t), int t=0)
 
virtual double get_value (int x)
 Get the value at the coordinate x in a 1D model.
 
virtual double get_value (int x, int y)
 Get the value at the coordinate (x,y) in a 2D model.
 
bool update (double t)
 Update the potential matrix at time t.
 

Public Attributes

Lattice * grid
 Object that defines the lattice structure.
 
double * matrix
 Matrix storing the potential.
 
bool updated_potential_matrix
 

Protected Attributes

double current_evolution_time
 Amount of time evolved since the beginning of the evolution.
 
double(* static_potential )(double x, double y)
 Function of the static external potential.
 
double(* evolving_potential )(double x, double y, double t)
 Function of the time-dependent external potential.
 
bool self_init
 Whether the external potential matrix has been initialized from the Potential constructor or not.
 
bool is_static
 Whether the external potential is static or time-dependent.
 

Detailed Description

This class defines the external potential that is used for Hamiltonian class.

Constructor & Destructor Documentation

Potential::Potential ( Lattice *  grid,
char *  filename 
)

Construct the external potential.

Parameters
[in]gridLattice object.
[in]filenameName of the file that stores the external potential matrix.
Potential::Potential ( Lattice *  grid,
double *  external_pot = 0 
)

Construct the external potential.

Parameters
[in]gridLattice object.
[in]external_potPointer to the external potential matrix.
Potential::Potential ( Lattice *  grid,
double(*)(double x, double y)  potential_function 
)

Construct the external potential.

Parameters
[in]gridLattice object.
[in]potential_functionPointer to the static external potential function.
Potential::Potential ( Lattice *  grid,
double(*)(double x, double y, double t)  potential_function,
int  t = 0 
)

Construct the 2D time-evolving external potential.

Parameters
[in]gridLattice object.
[in]potential_functionPointer to the time-dependent external potential function.

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