Commits

Lisandro Dalcin committed 2968fa8

Remove unused functions

  • Participants
  • Parent commits ba282d2

Comments (0)

Files changed (4)

File demo/NavierStokesVMS.c

   PetscScalar uz_xx=der2_u[2][0][0],uz_yy=der2_u[2][1][1],uz_zz=der2_u[2][2][2];
 
   PetscReal InvGradMap[3][3];
-  IGAPointFormGradMap(pnt,NULL,&InvGradMap[0][0]);
+  IGAPointFormInvGradGeomMap(pnt,&InvGradMap[0][0]);
   PetscScalar tauM,tauC;
   Tau(InvGradMap,dt,u,nu,&tauM,&tauC);
   PetscScalar ux_s,uy_s,uz_s,p_s;
   PetscScalar uz=u[2];
 
   PetscReal InvGradMap[3][3];
-  IGAPointFormGradMap(pnt,0,&InvGradMap[0][0]);
+  IGAPointFormInvGradGeomMap(pnt,&InvGradMap[0][0]);
   PetscScalar tauM,tauC;
   Tau(InvGradMap,dt,u,nu,&tauM,&tauC);
 

File include/petiga.h

 
 PETSC_EXTERN PetscErrorCode IGAElementBuildClosure(IGAElement element);
 PETSC_EXTERN PetscErrorCode IGAElementBuildQuadrature(IGAElement element);
-PETSC_EXTERN PetscErrorCode IGAElementBuildShapeFuns(IGAElement element);
+PETSC_EXTERN PetscErrorCode IGAElementBuildShapeFuns (IGAElement element);
 PETSC_EXTERN PetscErrorCode IGAElementBuildQuadratureAtBoundary(IGAElement element,PetscInt dir,PetscInt side);
-PETSC_EXTERN PetscErrorCode IGAElementBuildShapeFunsAtBoundary(IGAElement element,PetscInt dir,PetscInt side);
+PETSC_EXTERN PetscErrorCode IGAElementBuildShapeFunsAtBoundary (IGAElement element,PetscInt dir,PetscInt side);
 
 PETSC_EXTERN PetscErrorCode IGAElementGetParent(IGAElement element,IGA *parent);
 PETSC_EXTERN PetscErrorCode IGAElementGetIndex(IGAElement element,PetscInt *index);
 PETSC_EXTERN PetscErrorCode IGAElementGetCount(IGAElement element,PetscInt *count);
-
 PETSC_EXTERN PetscErrorCode IGAElementGetSizes(IGAElement element,PetscInt *neq,PetscInt *nen,PetscInt *dof);
 PETSC_EXTERN PetscErrorCode IGAElementGetMapping(IGAElement element,PetscInt *nen,const PetscInt *mapping[]);
 
   PetscInt    nmat;
   PetscScalar *wmat[4];
 };
+
 PETSC_EXTERN PetscErrorCode IGAPointCreate(IGAPoint *point);
 PETSC_EXTERN PetscErrorCode IGAPointDestroy(IGAPoint *point);
 PETSC_EXTERN PetscErrorCode IGAPointReference(IGAPoint point);
 PETSC_EXTERN PetscErrorCode IGAPointGetShapeFuns(IGAPoint point,PetscInt der,const PetscReal *shapefuns[]);
 
 PETSC_EXTERN PetscErrorCode IGAPointInterpolate(IGAPoint point,PetscInt ider,const PetscScalar U[],PetscScalar u[]);
-PETSC_EXTERN PetscErrorCode IGAPointFormPoint    (IGAPoint p,PetscReal x[]);
-PETSC_EXTERN PetscErrorCode IGAPointFormGradMap  (IGAPoint p,PetscReal map[],PetscReal inv[]);
-PETSC_EXTERN PetscErrorCode IGAPointFormShapeFuns(IGAPoint p,PetscInt der,PetscReal N[]);
 
+PETSC_EXTERN PetscErrorCode IGAPointFormPoint(IGAPoint p,PetscReal x[]);
 PETSC_EXTERN PetscErrorCode IGAPointFormGeomMap(IGAPoint p,PetscReal x[]);
 PETSC_EXTERN PetscErrorCode IGAPointFormGradGeomMap(IGAPoint p,PetscReal F[]);
 PETSC_EXTERN PetscErrorCode IGAPointFormInvGradGeomMap(IGAPoint p,PetscReal G[]);

File src/petigapoint.c

 { return IGAPointFormGeomMap(p,x); }
 
 #undef  __FUNCT__
-#define __FUNCT__ "IGAPointFormGradMap"
-PetscErrorCode IGAPointFormGradMap(IGAPoint p,PetscReal map[],PetscReal inv[])
-{
-  PetscErrorCode ierr;
-  PetscFunctionBegin;
-  PetscValidPointer(p,1);
-  if(map) {ierr = IGAPointFormGradGeomMap(p,map);CHKERRQ(ierr);}
-  if(inv) {ierr = IGAPointFormInvGradGeomMap(p,inv);CHKERRQ(ierr);}
-  PetscFunctionReturn(0);
-}
-
-#undef  __FUNCT__
-#define __FUNCT__ "IGAPointFormShapeFuns"
-PetscErrorCode IGAPointFormShapeFuns(IGAPoint point,PetscInt der,PetscReal N[])
-{
-  PetscInt       i,n;
-  PetscErrorCode ierr;
-  PetscFunctionBegin;
-  PetscValidPointer(point,1);
-  PetscValidRealPointer(N,3);
-  if (PetscUnlikely(der < 0 || der >= (PetscInt)(sizeof(point->shape)/sizeof(PetscReal*))))
-    SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,
-	     "Requested derivative must be in range [0,%d], got %D",
-	     (int)(sizeof(point->shape)/sizeof(PetscReal*)-1),der);
-  for (i=0,n=point->nen; i<der; i++) n *= point->dim;
-  ierr = PetscMemcpy(N,point->shape[der],n*sizeof(PetscReal));CHKERRQ(ierr);
-  PetscFunctionReturn(0);
-}
-
-#undef  __FUNCT__
 #define __FUNCT__ "IGAPointFormValue"
 PetscErrorCode IGAPointFormValue(IGAPoint p,const PetscScalar U[],PetscScalar u[])
 {

File test/Test_SNES_2D.c

   PetscScalar PETSC_UNUSED w = u0[2], w_x = u1[2][0], w_y = u1[2][1];
   PetscScalar PETSC_UNUSED r = u0[3], r_x = u1[3][0], r_y = u1[3][1];
 
-  /*const PetscReal *N0, (*N1)[2];
-  IGAPointGetShapeFuns(p,0,(const PetscReal **)&N0);
-  IGAPointGetShapeFuns(p,1,(const PetscReal **)&N1);*/
-  PetscReal N0[nen], N1[nen][2];
-  IGAPointFormShapeFuns(p,0,&N0[0]);
-  IGAPointFormShapeFuns(p,1,&N1[0][0]);
+  PetscReal *N0 = p->shape[0];
+  PetscReal (*N1)[2] = (PetscReal(*)[2])p->shape[1];
 
   PetscInt a;
   for (a=0; a<nen; a++) {
   IGAPointFormValue(p,Ue,&u0[0]);
   PetscScalar PETSC_UNUSED r = u0[3];
 
-  const PetscReal *N0, (*N1)[2];
-  IGAPointGetShapeFuns(p,0,(const PetscReal **)&N0);
-  IGAPointGetShapeFuns(p,1,(const PetscReal **)&N1);
+  PetscReal *N0 = p->shape[0];
+  PetscReal (*N1)[2] = (PetscReal(*)[2])p->shape[1];
 
   PetscInt a,b;
   for (a=0; a<nen; a++) {
   IGAPointFormValue(p,Ue,&u0[0]);
   PetscScalar r = u0[3];
 
-  PetscReal N0[nen],N2[nen][2][2];
-  IGAPointFormShapeFuns(p,0,&N0[0]);
-  IGAPointFormShapeFuns(p,2,&N2[0][0][0]);
+  PetscReal *N0 = p->shape[0];
+  PetscReal (*N2)[2][2] = (PetscReal(*)[2][2])p->shape[2];
 
   PetscInt a;
   for (a=0; a<nen; a++) {