ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions
model.h File Reference
#include "dmrg/utils/BaseParameters.h"
#include "dmrg/models/term_descriptor.h"
#include "dmrg/models/measurement.h"
#include "dmrg/models/lattice.h"
#include "dmrg/models/op_handler.h"
#include "dmrg/mp_tensors/mps_initializers.h"
#include "dmrg/block_matrix/block_matrix.h"
#include <boost/shared_ptr.hpp>

Go to the source code of this file.

Classes

class  Measurements< Matrix, SymmGroup >
 
class  model_impl< Matrix, SymmGroup >
 
class  Model< Matrix, SymmGroup >
 

Functions

template<class Matrix , class SymmGroup >
boost::shared_ptr< model_impl
< Matrix, SymmGroup > > 
model_factory (Lattice const &lattice, BaseParameters &parms)
 

Function Documentation

template<class Matrix , class SymmGroup >
boost::shared_ptr<model_impl<Matrix, SymmGroup> > model_factory ( Lattice const &  lattice,
BaseParameters parms 
)

model factory

Definition at line 43 of file model_factory_symm.h.

44 {
45  typedef boost::shared_ptr<model_impl<Matrix, SymmGroup> > impl_ptr;
46  if (parms["model_library"] == "alps") {
47  if (parms["lattice_library"] != "alps")
48  throw std::runtime_error("ALPS models require ALPS lattice.");
49  return impl_ptr( new ALPSModel<Matrix, SymmGroup>(lattice, parms) );
50  } else if (parms["model_library"] == "coded") {
51  return coded_model_factory<Matrix, SymmGroup>::parse(lattice, parms);
52  } else {
53  throw std::runtime_error("Don't know this model_library!");
54  }
55 
56 }
static boost::shared_ptr< model_impl< Matrix, SymmGroup > > parse(Lattice const &, BaseParameters &)