Skip to content

Commit

Permalink
petsc - update for interface change
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylt committed Sep 17, 2024
1 parent 368ba54 commit 7cf9519
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/fluids/navierstokes.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include "./include/petsc_ops.h"
#include "qfunctions/newtonian_types.h"

#if PETSC_VERSION_LT(3, 21, 0)
#error "PETSc v3.21 or later is required"
#if PETSC_VERSION_LT(3, 22, 0)
#error "PETSc v3.22 or later is required"
#endif

// -----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions examples/petsc/include/petscversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
/// Petsc version check
#pragma once

#if PETSC_VERSION_LT(3, 21, 0)
#error "PETSc v3.21 or later is required"
#if PETSC_VERSION_LT(3, 22, 0)
#error "PETSc v3.22 or later is required"
#endif
2 changes: 1 addition & 1 deletion examples/petsc/multigrid.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int main(int argc, char **argv) {
if (read_mesh) {
PetscCall(DMPlexCreateFromFile(PETSC_COMM_WORLD, filename, NULL, PETSC_TRUE, &dm_orig));
} else {
PetscCall(DMPlexCreateBoxMesh(PETSC_COMM_WORLD, dim, simplex, mesh_elem, NULL, NULL, NULL, PETSC_TRUE, &dm_orig));
PetscCall(DMPlexCreateBoxMesh(PETSC_COMM_WORLD, dim, simplex, mesh_elem, NULL, NULL, NULL, PETSC_TRUE, 0, PETSC_FALSE, &dm_orig));
}

VecType vec_type;
Expand Down
2 changes: 1 addition & 1 deletion examples/petsc/src/petscutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ PetscErrorCode CreateDistributedDM(RunParams rp, DM *dm) {
}
}

PetscCall(DMPlexCreateBoxMesh(PETSC_COMM_WORLD, rp->dim, rp->simplex, rp->mesh_elem, NULL, NULL, NULL, PETSC_TRUE, dm));
PetscCall(DMPlexCreateBoxMesh(PETSC_COMM_WORLD, rp->dim, rp->simplex, rp->mesh_elem, NULL, NULL, NULL, PETSC_TRUE, 0, PETSC_FALSE, dm));
}

PetscCall(DMSetFromOptions(*dm));
Expand Down
4 changes: 2 additions & 2 deletions examples/solids/elasticity.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
#include "include/utils.h"
#include "problems/problems.h"

#if PETSC_VERSION_LT(3, 21, 0)
#error "PETSc v3.21 or later is required"
#if PETSC_VERSION_LT(3, 22, 0)
#error "PETSc v3.22 or later is required"
#endif
2 changes: 1 addition & 1 deletion examples/solids/src/setup-dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ PetscErrorCode CreateDistributedDM(MPI_Comm comm, AppCtx app_ctx, DM *dm) {
PetscInt dim = 3, faces[3] = {3, 3, 3};
PetscCall(PetscOptionsGetIntArray(NULL, NULL, "-dm_plex_box_faces", faces, &dim, NULL));
if (!dim) dim = 3;
PetscCall(DMPlexCreateBoxMesh(comm, dim, PETSC_FALSE, faces, NULL, NULL, NULL, interpolate, dm));
PetscCall(DMPlexCreateBoxMesh(comm, dim, PETSC_FALSE, faces, NULL, NULL, NULL, interpolate, 0, PETSC_FALSE, dm));
} else {
PetscCall(DMPlexCreateFromFile(comm, filename, NULL, interpolate, dm));
}
Expand Down

0 comments on commit 7cf9519

Please sign in to comment.