1. petsc
  2. PETSc
  3. petsc

Commits

Matt Knepley  committed afdbcbd Merge

Merge branch 'knepley/fix-hash-scaling' into knepley/pylith

* knepley/fix-hash-scaling:
DMLabel: Split Malloc3 into Malloc2 and Malloc

  • Participants
  • Parent commits d5aeb73, 0803928
  • Branches knepley/pylith, next-apr-2016 1
    1. sarich/feature-tao-pounders-off-diagonal-terms

Comments (0)

Files changed (1)

File src/dm/impls/plex/plexlabel.c

View file
  • Ignore whitespace
   (*labelnew)->numStrata  = label->numStrata;
   (*labelnew)->arrayValid = PETSC_TRUE;
   if (label->numStrata) {
-    ierr = PetscMalloc3(label->numStrata,PetscInt,&(*labelnew)->stratumValues,label->numStrata+1,PetscInt,&(*labelnew)->stratumOffsets,label->numStrata,PetscInt,&(*labelnew)->stratumSizes);CHKERRQ(ierr);
+    ierr = PetscMalloc(label->numStrata * sizeof(PetscInt), &(*labelnew)->stratumValues);CHKERRQ(ierr);
+    ierr = PetscMalloc2(label->numStrata,PetscInt,&(*labelnew)->stratumSizes,label->numStrata+1,PetscInt,&(*labelnew)->stratumOffsets);CHKERRQ(ierr);
     ierr = PetscMalloc(label->stratumOffsets[label->numStrata] * sizeof(PetscInt), &(*labelnew)->points);CHKERRQ(ierr);
     /* Could eliminate unused space here */
     for (v = 0; v < label->numStrata; ++v) {