Dear Kourosh,
I've just checked in simple examples for Ising and Heisenberg models with multiple bond types at
example/parapack/ising example/parapack/heisenberg
[revision 6649]. It seems to me that the following code fragment returns the bond type correctly:
neighbor_bond_iterator itr, itr_end; for (boost::tie(itr, itr_end) = neighbor_bonds(s); itr != itr_end; ++itr) { … coupling_[bond_type(*itr)] ... }
Best, Synge
On 2012/12/17, at 19:07, Kourosh Sartipi kourosh.sartipi@gmail.com wrote:
Hi everyone. We wanted to change the code to do some more calculations for nearest neighbor in spinmc. So far I've tracked down the problem to the file alps/applications/mc/spins/localupdate.h. We've also added the edge type for nearest neighbour in xml file defining the unit lattice. The problem is that getting edge type for the graph always returns zero. Can you please help me find our how should we track down the problem?
Getting the edge type would be like this:
int edgeType = boost::get(alps::edge_type_t(), graph, *iter); // iter is out_edge_iterator
but the return value is always zero. (executing the exact same code for when the library parses the xml file produces the correct results. namely in file alps/src/alps/lattice/unitcell.c)
Yours, Kourosh