Commits

Lisandro Dalcin committed 073d86a

Rename IGAAxis{Set|Get}Order() to IGAAxis{Set|Get}Degree()

Comments (0)

Files changed (15)

demo/CahnHilliard2D.c

   IGAAxis axis0;
   ierr = IGAGetAxis(iga,0,&axis0);CHKERRQ(ierr);
   ierr = IGAAxisSetPeriodic(axis0,PETSC_TRUE);CHKERRQ(ierr);
-  ierr = IGAAxisSetOrder(axis0,p);CHKERRQ(ierr);
+  ierr = IGAAxisSetDegree(axis0,p);CHKERRQ(ierr);
   ierr = IGAAxisInitUniform(axis0,N,0.0,1.0,C);CHKERRQ(ierr);
   IGAAxis axis1;
   ierr = IGAGetAxis(iga,1,&axis1);CHKERRQ(ierr);

demo/InputOutput.c

     IGAAxis axis;
     ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
     ierr = IGAAxisSetPeriodic(axis,b[i]);CHKERRQ(ierr);
-    ierr = IGAAxisSetOrder(axis,p[i]);CHKERRQ(ierr);
+    ierr = IGAAxisSetDegree(axis,p[i]);CHKERRQ(ierr);
     ierr = IGAAxisInitUniform(axis,N[i],0.0,1.0,C[i]);CHKERRQ(ierr);
   }
   ierr = IGASetFromOptions(iga);CHKERRQ(ierr);
   IGAAxis axis;
   ierr = IGAGetAxis(iga,0,&axis);CHKERRQ(ierr);
   ierr = IGAAxisSetPeriodic(axis,t);CHKERRQ(ierr);
-  ierr = IGAAxisSetOrder(axis,p);CHKERRQ(ierr);
+  ierr = IGAAxisSetDegree(axis,p);CHKERRQ(ierr);
   ierr = IGAAxisInitUniform(axis,N,-1.0,1.0,C);CHKERRQ(ierr);
 
   ierr = IGASetFromOptions(iga);CHKERRQ(ierr);
   for (i=0; i<2; i++) {
     IGAAxis axis;
     ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
-  ierr = IGAAxisSetOrder(axis,p[i]);CHKERRQ(ierr);
+  ierr = IGAAxisSetDegree(axis,p[i]);CHKERRQ(ierr);
   ierr = IGAAxisInitUniform(axis,N[i],-1.0,1.0,C[i]);CHKERRQ(ierr);
   }
   ierr = IGASetFromOptions(iga);CHKERRQ(ierr);
     IGAAxis axis;
     ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
     ierr = IGAAxisSetPeriodic(axis,t[i]);CHKERRQ(ierr);
-    ierr = IGAAxisSetOrder(axis,p[i]);CHKERRQ(ierr);
+    ierr = IGAAxisSetDegree(axis,p[i]);CHKERRQ(ierr);
     ierr = IGAAxisInitUniform(axis,N[i],0.0,1.0,C[i]);CHKERRQ(ierr);
     for (j=0; j<2; j++) {
       IGABoundary bnd;

demo/NavierStokesVMS.c

 
   IGAAxis axis0;
   ierr = IGAGetAxis(iga,0,&axis0);CHKERRQ(ierr);
-  ierr = IGAAxisSetOrder(axis0,p[0]);CHKERRQ(ierr);
+  ierr = IGAAxisSetDegree(axis0,p[0]);CHKERRQ(ierr);
   ierr = IGAAxisSetPeriodic(axis0,PETSC_TRUE);CHKERRQ(ierr);
   //ierr = IGAAxisInitUniform(axis0,N,-0.5*Lx,0.5*Lx);CHKERRQ(ierr);
   ierr = IGAAxisInitUniform(axis0,N[0],0.0,Lx,C[0]);CHKERRQ(ierr);
   IGAAxis axis1;
   ierr = IGAGetAxis(iga,1,&axis1);CHKERRQ(ierr);
-  ierr = IGAAxisSetOrder(axis1,p[1]);CHKERRQ(ierr);
+  ierr = IGAAxisSetDegree(axis1,p[1]);CHKERRQ(ierr);
   //ierr = IGAAxisInitUniform(axis1,N,-0.5*Ly,0.5*Ly);CHKERRQ(ierr);
   ierr = IGAAxisInitUniform(axis1,N[1],0.0,Ly,C[1]);CHKERRQ(ierr);
   IGAAxis axis2;
   ierr = IGAGetAxis(iga,2,&axis2);CHKERRQ(ierr);
-  ierr = IGAAxisSetOrder(axis2,p[2]);CHKERRQ(ierr);
+  ierr = IGAAxisSetDegree(axis2,p[2]);CHKERRQ(ierr);
   ierr = IGAAxisSetPeriodic(axis2,PETSC_TRUE);CHKERRQ(ierr);
   //ierr = IGAAxisInitUniform(axis2,N,-0.5*Lz,0.5*Lz);CHKERRQ(ierr);
   ierr = IGAAxisInitUniform(axis2,N[2],0.0,Lz,C[2]);CHKERRQ(ierr);

demo/PatternFormation.c

     IGAAxis axis;
     ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
     ierr = IGAAxisSetPeriodic(axis,PETSC_TRUE);CHKERRQ(ierr);
-    ierr = IGAAxisSetOrder(axis,p[i]);CHKERRQ(ierr);
+    ierr = IGAAxisSetDegree(axis,p[i]);CHKERRQ(ierr);
     ierr = IGAAxisInitUniform(axis,N[i],-1.0,+1.0,C[i]);CHKERRQ(ierr);
   }
   ierr = IGASetFromOptions(iga);CHKERRQ(ierr);
     IGAAxis axis;
     ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
     ierr = IGAAxisSetPeriodic(axis,t[i]);CHKERRQ(ierr);
-    ierr = IGAAxisSetOrder(axis,p[i]);CHKERRQ(ierr);
+    ierr = IGAAxisSetDegree(axis,p[i]);CHKERRQ(ierr);
     ierr = IGAAxisInitUniform(axis,N[i],0.0,1.0,C[i]);CHKERRQ(ierr);
     for (j=0; j<2; j++) {
       IGABoundary bnd;
 
   IGAAxis axis;
   ierr = IGAGetAxis(iga,0,&axis);CHKERRQ(ierr);
-  ierr = IGAAxisSetOrder(axis,p);CHKERRQ(ierr);
+  ierr = IGAAxisSetDegree(axis,p);CHKERRQ(ierr);
   ierr = IGAAxisInitUniform(axis,N,-1.0,+1.0,C);CHKERRQ(ierr);
 
   IGABoundary left;
   for (i=0; i<2; i++) {
     IGAAxis axis;
     ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
-    ierr = IGAAxisSetOrder(axis,p[i]);CHKERRQ(ierr);
+    ierr = IGAAxisSetDegree(axis,p[i]);CHKERRQ(ierr);
     ierr = IGAAxisInitUniform(axis,N[i],-1.0,+1.0,C[i]);CHKERRQ(ierr);
   }
   IGABoundary bnd;
   for (i=0; i<3; i++) {
     IGAAxis axis;
     ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
-    ierr = IGAAxisSetOrder(axis,p[i]);CHKERRQ(ierr);
+    ierr = IGAAxisSetDegree(axis,p[i]);CHKERRQ(ierr);
     ierr = IGAAxisInitUniform(axis,N[i],-1.0,+1.0,C[i]);CHKERRQ(ierr);
   }
 
 extern PetscErrorCode IGAAxisDuplicate(IGAAxis base,IGAAxis *axis);
 extern PetscErrorCode IGAAxisSetPeriodic(IGAAxis axis,PetscBool periodic);
 extern PetscErrorCode IGAAxisGetPeriodic(IGAAxis axis,PetscBool *periodic);
-extern PetscErrorCode IGAAxisSetOrder(IGAAxis axis,PetscInt p);
-extern PetscErrorCode IGAAxisGetOrder(IGAAxis axis,PetscInt *p);
+extern PetscErrorCode IGAAxisSetDegree(IGAAxis axis,PetscInt p);
+extern PetscErrorCode IGAAxisGetDegree(IGAAxis axis,PetscInt *p);
 extern PetscErrorCode IGAAxisSetKnots(IGAAxis axis,PetscInt m,PetscReal U[]);
 extern PetscErrorCode IGAAxisGetKnots(IGAAxis axis,PetscInt *m,PetscReal *U[]);
 extern PetscErrorCode IGAAxisInitBreaks(IGAAxis axis,PetscInt r,PetscReal u[],PetscInt C);
 }
 
 #undef  __FUNCT__
-#define __FUNCT__ "IGAAxisSetOrder"
-PetscErrorCode IGAAxisSetOrder(IGAAxis axis,PetscInt p)
+#define __FUNCT__ "IGAAxisSetDegree"
+PetscErrorCode IGAAxisSetDegree(IGAAxis axis,PetscInt p)
 {
   PetscFunctionBegin;
   PetscValidPointer(axis,1);
   if (p < 1)
     SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,
-             "Polynomial order must be greather than zero, got %D",p);
+             "Polynomial degree must be greather than zero, got %D",p);
   axis->p = p;
   PetscFunctionReturn(0);
 }
 
 #undef  __FUNCT__
-#define __FUNCT__ "IGAAxisGetOrder"
-PetscErrorCode IGAAxisGetOrder(IGAAxis axis,PetscInt *p)
+#define __FUNCT__ "IGAAxisGetDegree"
+PetscErrorCode IGAAxisGetDegree(IGAAxis axis,PetscInt *p)
 {
   PetscFunctionBegin;
   PetscValidPointer(axis,1);
   /*
   if (axis->p < 1)
     SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,
-            "Must call IGAAxisSetOrder() first");
+            "Must call IGAAxisSetDegree() first");
   */
   if (m < 2*axis->p+1)
     SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,
 
   if (axis->p < 1)
     SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,
-            "Must call IGAAxisSetOrder() first");
+            "Must call IGAAxisSetDegree() first");
   if (nu < 2)
     SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,
              "Number of breaks must be at least two, got %D",nu);
     SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,
              "Continuity must be in range [0,%D], got %D",axis->p-1,C);
 
-  p = axis->p; /* polynomial order */
+  p = axis->p; /* polynomial degree */
   s = p - C; /* multiplicity */
   r = nu - 1; /* last break index */
   m = 2*(p+1) + (r-1)*s - 1; /* last knot index */
 
   if (axis->p < 1)
     SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,
-            "Must call IGAAxisSetOrder() first");
+            "Must call IGAAxisSetDegree() first");
   if (N < 1)
     SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,
              "Number of elements must be grather than zero, got %D",N);
     SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,
              "Continuity must be in range [0,%D], got %D",axis->p-1,C);
 
-  p = axis->p;  /* polynomial order */
+  p = axis->p;  /* polynomial degree */
   s = p - C; /* multiplicity */
   r = N ; /* last break index */
   m = 2*(p+1) + (N-1)*s - 1; /* last knot index */
   PetscValidPointer(axis,1);
   if (axis->p < 1)
     SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,
-            "Must call IGAAxisSetOrder() first");
+            "Must call IGAAxisSetDegree() first");
   if (!axis->U || axis->m < 2*axis->p+1)
     SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ORDER,
             "Must call IGAAxisSetKnots() first");
       if (s > p)
         SETERRQ4(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,
                  "Knot U[%D]=%G has multiplicity %D "
-                 "greather than polynomial order %D",
+                 "greather than polynomial degree %D",
                  i,U[i],s,p);
     }
   }
       m = buf[2]-1;
       ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
       ierr = IGAAxisSetPeriodic(axis,periodic);CHKERRQ(ierr);
-      ierr = IGAAxisSetOrder(axis,p);CHKERRQ(ierr);CHKERRQ(ierr);
+      ierr = IGAAxisSetDegree(axis,p);CHKERRQ(ierr);CHKERRQ(ierr);
       ierr = IGAAxisSetKnots(axis,m,0);CHKERRQ(ierr);CHKERRQ(ierr);
       ierr = IGAAxisGetKnots(axis,0,&U);CHKERRQ(ierr);CHKERRQ(ierr);
       ierr = PetscViewerBinaryRead(viewer,U,m+1,PETSC_REAL);CHKERRQ(ierr);
       PetscReal *U;
       ierr = IGAGetAxis(iga,i,&axis);CHKERRQ(ierr);
       ierr = IGAAxisGetPeriodic(axis,&periodic);CHKERRQ(ierr);
-      ierr = IGAAxisGetOrder(axis,&p);CHKERRQ(ierr);
+      ierr = IGAAxisGetDegree(axis,&p);CHKERRQ(ierr);
       ierr = IGAAxisGetKnots(axis,&m,&U);CHKERRQ(ierr);
       buf[0] = periodic;
       buf[1] = p;

test/Test_SNES_2D.c

 
   IGAAxis axis0;
   ierr = IGAGetAxis(iga,0,&axis0);CHKERRQ(ierr);
-  ierr = IGAAxisSetOrder(axis0,p);CHKERRQ(ierr);
+  ierr = IGAAxisSetDegree(axis0,p);CHKERRQ(ierr);
   ierr = IGAAxisInitUniform(axis0,N,-1.0,1.0,C);CHKERRQ(ierr);
   IGAAxis axis1;
   ierr = IGAGetAxis(iga,1,&axis1);CHKERRQ(ierr);