Skip to content

Commit

Permalink
Support PETSc versions older than 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ckhroulev committed Dec 7, 2021
1 parent bc953b6 commit e3bc030
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stressbalance/blatter/util/grid_hierarchy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ PetscErrorCode setup_level(DM dm, int mg_levels) {
DM da;
Vec parameters;
int dof = 1;

#if PETSC_VERSION_LE(3,10,0)
ierr = DMDAGetReducedDMDA(dm, dof, &da); CHKERRQ(ierr);
#else
ierr = DMDACreateCompatibleDMDA(dm, dof, &da); CHKERRQ(ierr);
#endif

ierr = DMSetUp(da); CHKERRQ(ierr);

Expand Down

0 comments on commit e3bc030

Please sign in to comment.