Commits

Lisandro Dalcin committed 9d149e5

Cleanup unneeded code

  • Participants
  • Parent commits 8804d5e

Comments (0)

Files changed (1)

File src/petiga.c

   PetscErrorCode   ierr;
   PetscFunctionBegin;
   PetscValidHeaderSpecific(iga,IGA_CLASSID,1);
+  PetscValidLogicalCollectiveInt(iga,dof,2);
   PetscValidPointer(_dm,3);
   *_dm = PETSC_NULL;
 
   if (iga->dof < 1)
     iga->dof = 1;
 
-  for (i=0; i<3; i++) {
-    if (!iga->axis[i])  {ierr = IGAAxisCreate(&iga->axis[i]);CHKERRQ(ierr);}
-    if (!iga->rule[i])  {ierr = IGARuleCreate(&iga->rule[i]);CHKERRQ(ierr);}
-    if (!iga->basis[i]) {ierr = IGABasisCreate(&iga->basis[i]);CHKERRQ(ierr);}
-  }
-  if (!iga->iterator) {
-    ierr = IGAElementCreate(&iga->iterator);CHKERRQ(ierr);
-  }
-
   for (i=0; i<iga->dim; i++) {
     ierr = IGAAxisCheck(iga->axis[i]);CHKERRQ(ierr);
   }
   ierr = IGACreateDofDM(iga,&iga->dm_dof);CHKERRQ(ierr);
   ierr = DMSetVecType(iga->dm_dof,iga->vectype);CHKERRQ(ierr);
   ierr = DMSetMatType(iga->dm_dof,iga->mattype);CHKERRQ(ierr);
-  /*ierr = DMSetOptionsPrefix(iga->dm_dof, "dof_"); CHKERRQ(ierr);*/
-  /*ierr = DMSetFromOptions(iga->dm_dof); CHKERRQ(ierr);*/
+  /*ierr = DMSetOptionsPrefix(iga->dm_dof, "dof_");CHKERRQ(ierr);*/
+  /*ierr = DMSetFromOptions(iga->dm_dof);CHKERRQ(ierr);*/
 
   {
-    PetscInt i,dim = iga->dim;
+    PetscInt i;
+    PetscInt dim = iga->dim;
     IGAAxis  *AX = iga->axis;
     IGABasis *BD = iga->basis;
     PetscInt *proc_rank  = iga->proc_rank;