From 7cf95199bdce7094e6c708bc6d0230948407aea7 Mon Sep 17 00:00:00 2001 From: Jeremy L Thompson Date: Tue, 17 Sep 2024 12:15:05 -0600 Subject: [PATCH] petsc - update for interface change --- examples/fluids/navierstokes.h | 4 ++-- examples/petsc/include/petscversion.h | 4 ++-- examples/petsc/multigrid.c | 2 +- examples/petsc/src/petscutils.c | 2 +- examples/solids/elasticity.h | 4 ++-- examples/solids/src/setup-dm.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/fluids/navierstokes.h b/examples/fluids/navierstokes.h index c2d57c7f32..f374e46849 100644 --- a/examples/fluids/navierstokes.h +++ b/examples/fluids/navierstokes.h @@ -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 // ----------------------------------------------------------------------------- diff --git a/examples/petsc/include/petscversion.h b/examples/petsc/include/petscversion.h index 8c1d3f92be..bbb377d3cc 100644 --- a/examples/petsc/include/petscversion.h +++ b/examples/petsc/include/petscversion.h @@ -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 diff --git a/examples/petsc/multigrid.c b/examples/petsc/multigrid.c index 346e395e6e..4fd9a62166 100644 --- a/examples/petsc/multigrid.c +++ b/examples/petsc/multigrid.c @@ -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; diff --git a/examples/petsc/src/petscutils.c b/examples/petsc/src/petscutils.c index e8fdc4fac3..4ec84c547b 100644 --- a/examples/petsc/src/petscutils.c +++ b/examples/petsc/src/petscutils.c @@ -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)); diff --git a/examples/solids/elasticity.h b/examples/solids/elasticity.h index 7ac246eccc..a83789a30f 100644 --- a/examples/solids/elasticity.h +++ b/examples/solids/elasticity.h @@ -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 diff --git a/examples/solids/src/setup-dm.c b/examples/solids/src/setup-dm.c index e70b4738dc..07c7f179fe 100644 --- a/examples/solids/src/setup-dm.c +++ b/examples/solids/src/setup-dm.c @@ -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)); }