in crystal3, quick relative_matrix for adjacent
This commit is contained in:
parent
d68ce01b63
commit
51e1fe06b3
|
@ -584,6 +584,7 @@ struct hrmap_crystal : hrmap_standard {
|
||||||
|
|
||||||
virtual transmatrix relative_matrix(cell *h2, cell *h1, const hyperpoint& hint) override {
|
virtual transmatrix relative_matrix(cell *h2, cell *h1, const hyperpoint& hint) override {
|
||||||
if(!crystal3()) return hrmap_standard::relative_matrix(h2, h1, hint);
|
if(!crystal3()) return hrmap_standard::relative_matrix(h2, h1, hint);
|
||||||
|
for(int i=0; i<S7; i++) if(h2 == h1->move(i)) return adj(h1->master, i);
|
||||||
if(gmatrix0.count(h2) && gmatrix0.count(h1))
|
if(gmatrix0.count(h2) && gmatrix0.count(h1))
|
||||||
return inverse(gmatrix0[h1]) * gmatrix0[h2];
|
return inverse(gmatrix0[h1]) * gmatrix0[h2];
|
||||||
return xpush(999);
|
return xpush(999);
|
||||||
|
|
Loading…
Reference in New Issue