ALPS MPS Codes
Reference documentation.
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
framework
dmrg
models
coded
factory_u1.hpp
Go to the documentation of this file.
1
/*****************************************************************************
2
*
3
* ALPS MPS DMRG Project
4
*
5
* Copyright (C) 2013 Institute for Theoretical Physics, ETH Zurich
6
* 2011-2011 by Michele Dolfi <dolfim@phys.ethz.ch>
7
*
8
* This software is part of the ALPS Applications, published under the ALPS
9
* Application License; you can use, redistribute it and/or modify it under
10
* the terms of the license, either version 1 or (at your option) any later
11
* version.
12
*
13
* You should have received a copy of the ALPS Application License along with
14
* the ALPS Applications; see the file LICENSE.txt. If not, the license is also
15
* available from http://alps.comp-phys.org/.
16
*
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
* FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20
* SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21
* FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
* DEALINGS IN THE SOFTWARE.
24
*
25
*****************************************************************************/
26
27
#include "
dmrg/models/coded/models_u1.hpp
"
28
//#include "dmrg/models/coded/models_bela.hpp"
29
30
template
<
class
Matrix>
31
struct
coded_model_factory
<Matrix,
U1
> {
32
static
boost::shared_ptr<model_impl<Matrix, U1> >
parse
33
(
Lattice
const
& lattice,
BaseParameters
& parms)
34
{
35
typedef
boost::shared_ptr<model_impl<Matrix, U1> > impl_ptr;
36
if
(parms[
"MODEL"
] == std::string(
"heisenberg"
))
37
return
impl_ptr(
new
Heisenberg<Matrix>
(lattice, parms[
"Jxy"
], parms[
"Jz"
]) );
38
else
if
(parms[
"MODEL"
] == std::string(
"HCB"
))
39
return
impl_ptr(
new
HCB<Matrix>
(lattice) );
40
else
if
(parms[
"MODEL"
] == std::string(
"boson Hubbard"
))
41
return
impl_ptr(
new
BoseHubbard<Matrix>
(lattice, parms) );
42
// else if (parms["MODEL"] == std::string("fermion Hubbard"))
43
// return impl_ptr( new FermiHubbardU1<Matrix>(lattice, parms) );
44
else
if
(parms[
"MODEL"
] == std::string(
"FreeFermions"
))
45
return
impl_ptr(
new
FreeFermions<Matrix>
(lattice, parms[
"t"
]) );
46
// else if (parms["MODEL"] == std::string("bela_chiral"))
47
// return impl_ptr( new Chiral<Matrix>(lattice, parms) );
48
else
{
49
throw
std::runtime_error(
"Don't know this model!"
);
50
return
impl_ptr();
51
}
52
}
53
};
FreeFermions
Definition:
models_u1.hpp:492
Heisenberg
Definition:
models_u1.hpp:39
U1
Definition:
u1.h:39
coded_model_factory
Definition:
factory.h:35
BoseHubbard
Definition:
models_u1.hpp:296
BaseParameters
Definition:
BaseParameters.h:65
HCB
Definition:
models_u1.hpp:170
Lattice
pimpl resolved Lattice
Definition:
lattice.h:84
coded_model_factory::parse
static boost::shared_ptr< model_impl< Matrix, SymmGroup > > parse(Lattice const &, BaseParameters &)
models_u1.hpp
Generated on Thu Aug 21 2014 11:18:54 for ALPS MPS Codes by
1.8.7