Commits

Lisandro Dalcin committed 744a4fb

Fix nasty bug in the computation of boundary normals

  • Participants
  • Parent commits c8fe37d

Comments (0)

Files changed (1)

File src/petigaelem.c

 			     dX,gX[0],gX[1]); break;
     }
     {
-      PetscInt  dim = element->dim;
-      PetscReal *F  = element->gradX[0];
-      PetscReal dS, *n = element->normal;
+      PetscInt dim = element->dim;
+      PetscReal *F = element->gradX[0];
+      PetscReal *n = element->normal;
       for (q=0; q<nqp; q++) {
-        IGA_GetNormal(dim,dir,side,F,&dS,&n[q*dim]);
+        PetscReal dS;
+        IGA_GetNormal(dim,dir,side,&F[q*dim*dim],&dS,&n[q*dim]);
         element->detJac[q] *= dS;
       }
     }