Skip to content

Commit

Permalink
Merge pull request CEED#1554 from CEED/jrwrigh/petsc_fix_localization
Browse files Browse the repository at this point in the history
fluids: Update topological periodicity localization
  • Loading branch information
jeremylt authored Apr 8, 2024
2 parents b7c0d45 + 2127b05 commit f5b3f54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions examples/fluids/src/dm_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ PetscErrorCode DMSetupByOrderBegin_FEM(PetscBool setup_faces, PetscBool setup_co
PetscCall(PetscFECreateLagrange(comm, dim, num_comp_coord, is_simplex, fe_coord_order, q_order, &fe_coord_new));
if (setup_faces) PetscCall(PetscFEGetHeightSubspace(fe_coord_new, 1, &fe_coord_face_new));
PetscCall(DMSetCoordinateDisc(dm, fe_coord_new, PETSC_TRUE));
PetscCall(DMLocalizeCoordinates(dm)); // Update CellCoordinateDM with projected coordinates
PetscCall(PetscFEDestroy(&fe_coord_new));
}
PetscFunctionReturn(PETSC_SUCCESS);
Expand Down Expand Up @@ -486,10 +485,9 @@ PetscErrorCode DMSetupByOrderEnd_FEM(PetscBool setup_coords, DM dm) {

PetscCall(DMGetCoordinateDM(dm, &dm_coord));
PetscCall(DMPlexSetClosurePermutationTensor(dm_coord, PETSC_DETERMINE, NULL));
PetscCall(DMGetCellCoordinateDM(dm, &dm_coord));
if (dm_coord) PetscCall(DMPlexSetClosurePermutationTensor(dm_coord, PETSC_DETERMINE, NULL));
}
}
PetscCall(DMLocalizeCoordinates(dm)); // Must localize after tensor closure setting
PetscFunctionReturn(PETSC_SUCCESS);
}

Expand Down
1 change: 1 addition & 0 deletions examples/fluids/src/setupdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ PetscErrorCode CreateDM(MPI_Comm comm, ProblemData *problem, MatType mat_type, V
// Set Tensor elements
PetscCall(PetscOptionsSetValue(NULL, "-dm_plex_simplex", "0"));
PetscCall(PetscOptionsSetValue(NULL, "-dm_sparse_localize", "0"));
PetscCall(PetscOptionsSetValue(NULL, "-dm_localize", "0")); // Localization done in DMSetupByOrderEnd_FEM
PetscCall(PetscOptionsSetValue(NULL, "-dm_blocking_type", "field_node"));

// Set CL options
Expand Down

0 comments on commit f5b3f54

Please sign in to comment.