Commits

Lisandro Dalcin  committed 02e2789

Update after changes to DMCreateMatrix() in petsc-dev

  • Participants
  • Parent commits 4459910

Comments (0)

Files changed (1)

File src/petigadm.c

 typedef const char* MatType;
 #endif
 
+#if PETSC_VERSION_LT(3,5,0)
 #undef  __FUNCT__
 #define __FUNCT__ "DMCreateMatrix_IGA"
 static PetscErrorCode DMCreateMatrix_IGA(DM dm,MatType mtype,Mat *J)
   if (mtype) iga->mattype = (char*)save;
   PetscFunctionReturn(0);
 }
+#else
+#undef  __FUNCT__
+#define __FUNCT__ "DMCreateMatrix_IGA"
+static PetscErrorCode DMCreateMatrix_IGA(DM dm,Mat *J)
+{
+  IGA            iga = DMIGACast(dm)->iga;
+  PetscErrorCode ierr;
+  PetscFunctionBegin;
+  PetscValidHeaderSpecific(iga,IGA_CLASSID,0);
+  ierr = IGACreateMat(iga,J);CHKERRQ(ierr);
+  PetscFunctionReturn(0);
+}
+#endif
 
 #undef  __FUNCT__
 #define __FUNCT__ "DMDestroy_IGA"