From 3b830476045844663c6d276376036e5ece524e22 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 14 Feb 2018 15:35:10 +0100 Subject: [PATCH] fix oriented connections in ASMs3D --- src/ASM/ASMs3D.C | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ASM/ASMs3D.C b/src/ASM/ASMs3D.C index 4245f75ed..8a27746c9 100644 --- a/src/ASM/ASMs3D.C +++ b/src/ASM/ASMs3D.C @@ -685,6 +685,9 @@ bool ASMs3D::connectBasis (int face, ASMs3D& neighbor, int nface, int norient, return false; } + if (norient > 3) + std::swap(n1,n2); + const double xtol = 1.0e-4; int node = 1; for (int j = 0; j < n2; j++) @@ -699,13 +702,13 @@ bool ASMs3D::connectBasis (int face, ASMs3D& neighbor, int nface, int norient, case 3: k = n1-i-1; l = n2-j-1; break; case 4: k = j ; l = i ; break; case 5: k = j ; l = n2-i-1; break; - case 6: k = n1-j-1; l = i ; break; - case 7: k = n1-j-1; l = n2-i-1; break; + case 6: k = m1-j-1; l = i ; break; + case 7: k = m1-j-1; l = m2-i-1; break; } for (int t = 0; t < thick; t++) { - int slave = slaveNodes[(l*n1+k)*thick+t]; + int slave = slaveNodes[(l*m1+k)*thick+t]; int node2 = masterNodes[(node-1)*thick+t]; if (!coordCheck) ASMbase::collapseNodes(neighbor,node2,*this,slave);