Commits

Satish Balay committed 578ff69

Sys: new_ir changed from PetscInt to PetscObjectState - so fix mallocs to use the new type

Comments (0)

Files changed (1)

src/sys/objects/state.c

   new_n = PetscObjectComposedDataMax;
   ierr  = PetscMalloc(new_n*sizeof(PetscInt),&new_ar);CHKERRQ(ierr);
   ierr  = PetscMemzero(new_ar,new_n*sizeof(PetscInt));CHKERRQ(ierr);
-  ierr  = PetscMalloc(new_n*sizeof(PetscInt),&new_ir);CHKERRQ(ierr);
-  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscInt));CHKERRQ(ierr);
+  ierr  = PetscMalloc(new_n*sizeof(PetscObjectState),&new_ir);CHKERRQ(ierr);
+  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscObjectState));CHKERRQ(ierr);
   if (n) {
     for (i=0; i<n; i++) {
       new_ar[i] = ar[i]; new_ir[i] = ir[i];
   new_n = PetscObjectComposedDataMax;
   ierr  = PetscMalloc(new_n*sizeof(PetscInt*),&new_ar);CHKERRQ(ierr);
   ierr  = PetscMemzero(new_ar,new_n*sizeof(PetscInt*));CHKERRQ(ierr);
-  ierr  = PetscMalloc(new_n*sizeof(PetscInt),&new_ir);CHKERRQ(ierr);
-  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscInt));CHKERRQ(ierr);
+  ierr  = PetscMalloc(new_n*sizeof(PetscObjectState),&new_ir);CHKERRQ(ierr);
+  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscObjectState));CHKERRQ(ierr);
   if (n) {
     for (i=0; i<n; i++) {
       new_ar[i] = ar[i]; new_ir[i] = ir[i];
   new_n = PetscObjectComposedDataMax;
   ierr  = PetscMalloc(new_n*sizeof(PetscReal),&new_ar);CHKERRQ(ierr);
   ierr  = PetscMemzero(new_ar,new_n*sizeof(PetscReal));CHKERRQ(ierr);
-  ierr  = PetscMalloc(new_n*sizeof(PetscInt),&new_ir);CHKERRQ(ierr);
-  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscInt));CHKERRQ(ierr);
+  ierr  = PetscMalloc(new_n*sizeof(PetscObjectState),&new_ir);CHKERRQ(ierr);
+  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscObjectState));CHKERRQ(ierr);
   if (n) {
     for (i=0; i<n; i++) {
       new_ar[i] = ar[i]; new_ir[i] = ir[i];
   new_n = PetscObjectComposedDataMax;
   ierr  = PetscMalloc(new_n*sizeof(PetscReal*),&new_ar);CHKERRQ(ierr);
   ierr  = PetscMemzero(new_ar,new_n*sizeof(PetscReal*));CHKERRQ(ierr);
-  ierr  = PetscMalloc(new_n*sizeof(PetscInt),&new_ir);CHKERRQ(ierr);
-  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscInt));CHKERRQ(ierr);
+  ierr  = PetscMalloc(new_n*sizeof(PetscObjectState),&new_ir);CHKERRQ(ierr);
+  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscObjectState));CHKERRQ(ierr);
   if (n) {
     for (i=0; i<n; i++) {
       new_ar[i] = ar[i]; new_ir[i] = ir[i];
   new_n = PetscObjectComposedDataMax;
   ierr  = PetscMalloc(new_n*sizeof(PetscScalar),&new_ar);CHKERRQ(ierr);
   ierr  = PetscMemzero(new_ar,new_n*sizeof(PetscScalar));CHKERRQ(ierr);
-  ierr  = PetscMalloc(new_n*sizeof(PetscInt),&new_ir);CHKERRQ(ierr);
-  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscInt));CHKERRQ(ierr);
+  ierr  = PetscMalloc(new_n*sizeof(PetscObjectState),&new_ir);CHKERRQ(ierr);
+  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscObjectState));CHKERRQ(ierr);
   if (n) {
     for (i=0; i<n; i++) {
       new_ar[i] = ar[i]; new_ir[i] = ir[i];
   new_n = PetscObjectComposedDataMax;
   ierr  = PetscMalloc(new_n*sizeof(PetscScalar*),&new_ar);CHKERRQ(ierr);
   ierr  = PetscMemzero(new_ar,new_n*sizeof(PetscScalar*));CHKERRQ(ierr);
-  ierr  = PetscMalloc(new_n*sizeof(PetscInt),&new_ir);CHKERRQ(ierr);
-  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscInt));CHKERRQ(ierr);
+  ierr  = PetscMalloc(new_n*sizeof(PetscObjectState),&new_ir);CHKERRQ(ierr);
+  ierr  = PetscMemzero(new_ir,new_n*sizeof(PetscObjectState));CHKERRQ(ierr);
   if (n) {
     for (i=0; i<n; i++) {
       new_ar[i] = ar[i]; new_ir[i] = ir[i];