#include <lattice.hpp>
Definition at line 41 of file lattice.hpp.
ChainLattice::ChainLattice |
( |
BaseParameters & |
parms, |
|
|
bool |
pbc_ = false |
|
) |
| |
|
inline |
ChainLattice::ChainLattice |
( |
int |
L_, |
|
|
bool |
pbc_ = false , |
|
|
double |
a_ = 1. |
|
) |
| |
|
inline |
std::vector<pos_t> ChainLattice::all |
( |
pos_t |
i | ) |
const |
|
inlinevirtual |
std::vector<pos_t> ChainLattice::forward |
( |
pos_t |
i | ) |
const |
|
inlinevirtual |
template<class T >
T lattice_impl::get_prop |
( |
std::string |
property, |
|
|
pos_t |
site |
|
) |
| const |
|
inlineinherited |
Definition at line 49 of file lattice.h.
52 return boost::any_cast<T>(
get_prop_(property, std::vector<pos_t>(1, site)));
virtual boost::any get_prop_(std::string const &, std::vector< pos_t > const &) const =0
template<class T >
T lattice_impl::get_prop |
( |
std::string |
property, |
|
|
pos_t |
bond1, |
|
|
pos_t |
bond2 |
|
) |
| const |
|
inlineinherited |
Definition at line 55 of file lattice.h.
58 std::vector<pos_t> v(2);
59 v[0] = bond1; v[1] = bond2;
60 return boost::any_cast<T>(
get_prop_(property, v));
virtual boost::any get_prop_(std::string const &, std::vector< pos_t > const &) const =0
template<class T >
T lattice_impl::get_prop |
( |
std::string |
property, |
|
|
std::vector< pos_t > const & |
positions |
|
) |
| const |
|
inlineinherited |
Definition at line 63 of file lattice.h.
66 return boost::any_cast<T>(
get_prop_(property, positions));
virtual boost::any get_prop_(std::string const &, std::vector< pos_t > const &) const =0
boost::any ChainLattice::get_prop_ |
( |
std::string const & |
property, |
|
|
std::vector< pos_t > const & |
pos |
|
) |
| const |
|
inlinevirtual |
Implements lattice_impl.
Definition at line 81 of file lattice.hpp.
83 if (property ==
"label" && pos.size() == 1)
84 return boost::any( site_label(pos[0]) );
85 else if (property ==
"label" && pos.size() == 2)
86 return boost::any( bond_label(pos[0], pos[1]) );
87 else if (property ==
"type" && pos.size() == 1)
88 return boost::any( 0 );
89 else if (property ==
"type" && pos.size() == 2)
90 return boost::any( 0 );
91 else if (property ==
"x" && pos.size() == 1)
92 return boost::any( a * pos[0] );
93 else if (property ==
"at_open_boundary" && pos.size() == 1)
94 return boost::any( (!pbc) && (pos[0]==0 || pos[0]==L-1) );
95 else if (property ==
"at_open_left_boundary" && pos.size() == 1)
96 return boost::any( (!pbc) && pos[0]==0 );
97 else if (property ==
"at_open_right_boundary" && pos.size() == 1)
98 return boost::any( (!pbc) && pos[0]==L-1 );
99 else if (property ==
"wraps_pbc" && pos.size() == 2)
100 return boost::any( (pos[0] < pos[1]) );
102 std::ostringstream ss;
103 ss <<
"No property '" <<
property <<
"' with " << pos.size() <<
" points implemented.";
104 throw std::runtime_error(ss.str());
int ChainLattice::maximum_vertex_type |
( |
| ) |
const |
|
inlinevirtual |
pos_t ChainLattice::size |
( |
| ) |
const |
|
inlinevirtual |
The documentation for this class was generated from the following file: