One run of a MP-DMRG algorithm, parallelised if requested. More...
#include <dmrg_parallel.h>
Public Member Functions | |
State | assembleState () |
Helper function for saveState(). More... | |
void | closeLog () |
Helper to close our logfiles. More... | |
bool | converged () |
Returns true if the current stage is complete. More... | |
std::vector< Operator > const & | get_Hs () const |
Gives the vector of all Hamiltonians. More... | |
State const & | get_psi () const |
Gives state if no real space parallelisation is used. More... | |
SRDef | getLastEnergy () const |
Returns the last Energy. More... | |
Index | getSweepsPerStage () const |
Returns the number of sweeps. More... | |
void | initArg (int argc_, char **argv_) |
Use to set command line argument variables. More... | |
void | initLog () |
Helper to initialise our logfiles. More... | |
template<typename Archive > | |
void | load (Archive &ar, const unsigned int in_version) |
Boost serialisation (loading) More... | |
template<typename... Args> | |
void | logTrace (int level, Args &&... data) |
Log some tracing information. More... | |
PDMRG & | operator= (PDMRG &&other) |
Move assignment operator. More... | |
PDMRG & | operator= (PDMRG const &)=delete |
Copy assignment operator deleted. More... | |
PDMRG ()=default | |
Default ctor for serialisation. More... | |
PDMRG (PDMRG &&other) | |
Move ctor. More... | |
PDMRG (PDMRG const &)=delete | |
Copy ctor deleted. More... | |
PDMRG (State &&psi_, std::vector< Operator > &&op_, DMRGConfig &&conf_, std::vector< State > &&ortho_, std::vector< std::pair< Lattice, std::string > > &&exps_, std::vector< Index > &&rbounds_) | |
Standard ctor, constructs and assigns the worker objects and prepares the calculation. More... | |
State | run () |
Run a calculation. More... | |
template<typename Archive > | |
void | save (Archive &ar, const unsigned int) const |
Boost serialization (saving) More... | |
void | saveState (State const &s) |
Saves the state, potentially slow. More... | |
template<typename TypePtr , typename TypeVal > | |
void | setConfig (TypePtr ptr, TypeVal value) |
Use to set configuration for all workers. More... | |
Public Attributes | |
int | argc |
command line argument storage More... | |
char ** | argv |
command line argument storage More... | |
DMRGConfig | conf |
local cache for configuration More... | |
std::vector< Tensor< 2 > > | connections |
vector of connectors between consecutive segments, already inverted More... | |
Index | numWorkers |
number of workers, constant throughout the calculation More... | |
std::ofstream | traceLog |
trace output log More... | |
std::vector< Worker > | workers |
vector of worker objects More... | |
Static Public Attributes | |
static std::string const | uuid = "1C0D6326-F6EE-49BB-A3D4-CD265CBAC695" |
UUID. More... | |
static constexpr unsigned int | version = 2 |
Bump this if the above changes. More... | |
One run of a MP-DMRG algorithm, parallelised if requested.
It can be saved to disk and restarted later.