1. Lisandro Dalcin
  2. PetIGA

Commits

Lisandro Dalcin  committed f10cb57

Remove unused and unfinished routines

  • Participants
  • Parent commits c63419d
  • Branches default

Comments (0)

Files changed (4)

File include/petiga.h

View file
 PETSC_EXTERN PetscErrorCode DMIGASetIGA(DM dm,IGA iga);
 PETSC_EXTERN PetscErrorCode DMIGAGetIGA(DM dm,IGA *iga);
 
-
-PETSC_EXTERN PetscErrorCode IGAGetMeshInformation(IGA iga,PetscReal *hmin,PetscReal *hmax,PetscReal *havg,PetscReal *hstd);
-
 /* ---------------------------------------------------------------- */
 
 struct _n_IGAElement {
 PETSC_EXTERN PetscErrorCode IGAElementAssembleVec(IGAElement element,const PetscScalar F[],Vec vec);
 PETSC_EXTERN PetscErrorCode IGAElementAssembleMat(IGAElement element,const PetscScalar K[],Mat mat);
 
-PETSC_EXTERN PetscErrorCode IGAElementCharacteristicSize(IGAElement element,PetscReal *h);
-
 /* ---------------------------------------------------------------- */
 
 struct _n_IGAPoint {

File src/petiga.c

View file
   if (IEJacCtx)   iga->userops->IEJacCtx   = IEJacCtx;
   PetscFunctionReturn(0);
 }
-
-
-#undef  __FUNCT__
-#define __FUNCT__ "IGAGetMeshInformation"
-/*@
-   IGAGetMeshInformation - Returns information concerning the mesh being used.
-
-   Logically Collective on IGA
-
-   Input Parameter:
-+  iga - the IGA context
-
-   Output Parameters:
-+  hmin - minimum measure of h among all elements
-.  hmax - maximum measure of h among all elements
-.  havg - average measure of h among all elements
--  hsdt - standard deviation measure of h among all elements
-
-   Level: normal
-
-   Notes:
-   This routine takes statistics on the output of
-   IGAElementCharacteristicSize for all elements in all partitions of
-   the mesh.
-
-.keywords: IGA, mesh information
-@*/
-PetscErrorCode IGAGetMeshInformation(IGA iga,PetscReal *hmin,PetscReal *hmax,PetscReal *havg,PetscReal *hstd)
-{
-  PetscFunctionBegin;
-  PetscReal      h,local_hmin,local_hmax,local_hsum,local_hsum2;
-  PetscInt       i,nel;
-  IGAElement     element;
-  MPI_Comm       comm;
-  PetscErrorCode ierr;
-  PetscFunctionBegin;
-  PetscValidHeaderSpecific(iga,IGA_CLASSID,1);
-  IGACheckSetUp(iga,1);
-
-  local_hmin  = PETSC_MAX_REAL;
-  local_hmax  = 0;
-  local_hsum  = 0;
-  local_hsum2 = 0;
-  ierr = IGABeginElement(iga,&element);CHKERRQ(ierr);
-  while (IGANextElement(iga,element)) {
-    ierr = IGAElementCharacteristicSize(element,&h);CHKERRQ(ierr);
-    local_hmin  = PetscMin(local_hmin,h);
-    local_hmax  = PetscMax(local_hmax,h);
-    local_hsum  += h;
-    local_hsum2 += h*h;
-  }
-  ierr = IGAEndElement(iga,&element);CHKERRQ(ierr);
-
-  ierr = IGAGetComm(iga,&comm);CHKERRQ(ierr);
-  ierr = MPI_Allreduce(&local_hmin, hmin,1,MPIU_REAL,MPIU_MIN,comm);CHKERRQ(ierr);
-  ierr = MPI_Allreduce(&local_hmax, hmax,1,MPIU_REAL,MPIU_MAX,comm);CHKERRQ(ierr);
-  ierr = MPI_Allreduce(&local_hsum, havg,1,MPIU_REAL,MPIU_SUM,comm);CHKERRQ(ierr);
-  ierr = MPI_Allreduce(&local_hsum2,hstd,1,MPIU_REAL,MPIU_SUM,comm);CHKERRQ(ierr);
-
-  nel = 1;
-  for(i=0;i<iga->dim;i++) nel *= iga->elem_sizes[i];
-  *havg /= nel;
-  *hstd = *hstd/nel - (*havg)*(*havg);
-
-  PetscFunctionReturn(0);
-}

File src/petigaelem.c

View file
 }
 
 /* -------------------------------------------------------------------------- */
-
-EXTERN_C_BEGIN
-extern void IGA_Interpolate(PetscInt nen,PetscInt dof,PetscInt dim,PetscInt der,
-                            const PetscReal N[],const PetscScalar U[],PetscScalar u[]);
-EXTERN_C_END
-
-#define ELENGTH(a,b) sqrt((corners[a][0]-corners[b][0])*(corners[a][0]-corners[b][0])+(corners[a][1]-corners[b][1])*(corners[a][1]-corners[b][1])+(corners[a][2]-corners[b][2])*(corners[a][2]-corners[b][2]))
-
-#undef  __FUNCT__
-#define __FUNCT__ "IGAElementCharacteristicSize"
-PetscErrorCode IGAElementCharacteristicSize(IGAElement element,PetscReal *h)
-{
-  PetscInt       dir,i,m,e,nc=0;
-  PetscReal     *U;
-  PetscReal      limits[3][2],corners[8][3],g[3]={0,0,0};
-  IGAPoint       p;
-  PetscErrorCode ierr;
-  PetscFunctionBegin;
-  PetscValidPointer(element,1);
-
-  /* find parametric element breaks */
-  for(dir=0;dir<element->dim;dir++){
-    U = element->parent->axis[dir]->U;
-    m = element->parent->axis[dir]->m;
-    e = -1;
-    for(i=0;i<m-1;i++){
-      if(fabs(U[i+1]-U[i]) > 100*PETSC_MACHINE_EPSILON) e += 1;
-      if(e==element->ID[dir]) { limits[dir][0] = U[i]; limits[dir][1] = U[i+1]; break;}
-    }
-  }
-
-  /* simple subtraction if in parametric domain */
-  *h = -1;
-  if(!(element->geometry)){
-    for(dir=0;dir<element->dim;dir++) *h = PetscMax(*h,limits[dir][1]-limits[dir][0]);
-    PetscFunctionReturn(0);
-  }
-
-  /* find parametric corners */
-  switch (element->dim) {
-  case 3:
-    nc = 8;
-    corners[0][0] = limits[0][0]; corners[0][1] = limits[1][0]; corners[0][2] = limits[2][0];
-    corners[1][0] = limits[0][1]; corners[1][1] = limits[1][0]; corners[1][2] = limits[2][0];
-    corners[2][0] = limits[0][0]; corners[2][1] = limits[1][1]; corners[2][2] = limits[2][0];
-    corners[3][0] = limits[0][1]; corners[3][1] = limits[1][1]; corners[3][2] = limits[2][0];
-    corners[4][0] = limits[0][0]; corners[4][1] = limits[1][0]; corners[4][2] = limits[2][1];
-    corners[5][0] = limits[0][1]; corners[5][1] = limits[1][0]; corners[5][2] = limits[2][1];
-    corners[6][0] = limits[0][0]; corners[6][1] = limits[1][1]; corners[6][2] = limits[2][1];
-    corners[7][0] = limits[0][1]; corners[7][1] = limits[1][1]; corners[7][2] = limits[2][1];
-    break;
-  case 2:
-    nc = 4;
-    corners[0][0] = limits[0][0]; corners[0][1] = limits[1][0]; corners[0][2] = 0;
-    corners[1][0] = limits[0][1]; corners[1][1] = limits[1][0]; corners[1][2] = 0;
-    corners[2][0] = limits[0][0]; corners[2][1] = limits[1][1]; corners[2][2] = 0;
-    corners[3][0] = limits[0][1]; corners[3][1] = limits[1][1]; corners[3][2] = 0;
-    break;
-  case 1:
-    nc = 2;
-    corners[0][0] = limits[0][0]; corners[0][1] = 0; corners[0][2] = 0;
-    corners[1][0] = limits[0][1]; corners[1][1] = 0; corners[1][2] = 0;
-    break;
-  }
-
-  /* interpolate corners */
-  ierr = IGAPointCreate(&p);CHKERRQ(ierr);
-  for(i=0;i<nc;i++){
-    p->point = &(corners[i][0]);
-    ierr = IGAPointInit(p,element);CHKERRQ(ierr);
-    ierr = IGAPointEval(element->parent,p);CHKERRQ(ierr);
-    IGA_Interpolate(p->nen,p->dim,p->dim,0,p->basis[0],p->geometry,&g[0]);
-    for(e=0;e<p->dim;e++) corners[i][e] = g[e];
-  }
-  ierr = IGAPointDestroy(&p);CHKERRQ(ierr);
-
-  /* compute longest edge treating element as a quad/hex */
-  switch (element->dim) {
-  case 3:
-    *h = PetscMax(*h,ELENGTH(1,0));
-    *h = PetscMax(*h,ELENGTH(3,2));
-    *h = PetscMax(*h,ELENGTH(0,2));
-    *h = PetscMax(*h,ELENGTH(1,3));
-    *h = PetscMax(*h,ELENGTH(4,5));
-    *h = PetscMax(*h,ELENGTH(6,7));
-    *h = PetscMax(*h,ELENGTH(4,6));
-    *h = PetscMax(*h,ELENGTH(5,7));
-    *h = PetscMax(*h,ELENGTH(0,4));
-    *h = PetscMax(*h,ELENGTH(1,5));
-    *h = PetscMax(*h,ELENGTH(2,6));
-    *h = PetscMax(*h,ELENGTH(3,7));
-    break;
-  case 2:
-    *h = PetscMax(*h,ELENGTH(1,0));
-    *h = PetscMax(*h,ELENGTH(3,2));
-    *h = PetscMax(*h,ELENGTH(0,2));
-    *h = PetscMax(*h,ELENGTH(1,3));
-    break;
-  case 1:
-    *h = PetscMax(*h,ELENGTH(1,0));
-    break;
-  }
-
-  PetscFunctionReturn(0);
-}

File src/petigapoint.c

View file
 {
   PetscErrorCode ierr;
   PetscInt i,j,e,m,dim=iga->dim,*ID = element->ID;
-  PetscScalar *U;
+  PetscReal *U;
   element->nen = 1;
   for(i=0;i<dim;i++){
     element->nen *= (iga->axis[i]->p+1);