Skip to content

Commit

Permalink
Merge pull request CEED#1423 from CEED/jrwrigh/fluids_high_order_geom
Browse files Browse the repository at this point in the history
fluids: Support higher-order geometry
  • Loading branch information
jrwrigh authored Dec 11, 2023
2 parents c63b5f5 + a0b9cdb commit 6d506a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions examples/fluids/src/dm_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@ PetscErrorCode CreateBasisFromPlex(Ceed ceed, DM dm, DMLabel domain_label, CeedI
@param[in] setup_faces Flag to setup face geometry
@param[in] setup_coords Flag to setup coordinate spaces
@param[in] degree Polynomial orders of field
@param[in] coord_order Polynomial order of coordinate basis, or `RATEL_DECIDE` for default
@param[in] q_extra Additional quadrature order, or `RATEL_DECIDE` for default
@param[in] coord_order Polynomial order of coordinate basis, or `PETSC_DECIDE` for default
@param[in] q_extra Additional quadrature order
@param[in] num_fields Number of fields in solution vector
@param[in] field_sizes Array of number of components for each field
@param[out] dm `DM` to setup
Expand Down Expand Up @@ -453,8 +453,7 @@ PetscErrorCode DMSetupByOrderBegin_FEM(PetscBool setup_faces, PetscBool setup_co
PetscCall(PetscDualSpaceGetOrder(fe_coord_dual_space, &fe_coord_order));

// Create FE for coordinates
PetscCheck(fe_coord_order == 1 || coord_order == 1, comm, PETSC_ERR_USER_INPUT,
"Only linear mesh geometry supported. Recieved %" PetscInt_FMT " order", fe_coord_order);
if (coord_order != PETSC_DECIDE) fe_coord_order = coord_order;
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));
Expand Down Expand Up @@ -502,8 +501,8 @@ PetscErrorCode DMSetupByOrderEnd_FEM(PetscBool setup_coords, DM dm) {
@param[in] setup_faces Flag to setup face geometry
@param[in] setup_coords Flag to setup coordinate spaces
@param[in] degree Polynomial orders of field
@param[in] coord_order Polynomial order of coordinate basis, or `RATEL_DECIDE` for default
@param[in] q_extra Additional quadrature order, or `RATEL_DECIDE` for default
@param[in] coord_order Polynomial order of coordinate basis, or `PETSC_DECIDE` for default
@param[in] q_extra Additional quadrature order
@param[in] num_fields Number of fields in solution vector
@param[in] field_sizes Array of number of components for each field
@param[out] dm `DM` to setup
Expand Down
2 changes: 1 addition & 1 deletion examples/fluids/src/setupdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ PetscErrorCode SetUpDM(DM dm, ProblemData *problem, PetscInt degree, PetscInt q_
PetscInt num_comp_q = 5;
PetscFunctionBeginUser;

PetscCall(DMSetupByOrderBegin_FEM(PETSC_TRUE, PETSC_TRUE, degree, 1, q_extra, 1, &num_comp_q, dm));
PetscCall(DMSetupByOrderBegin_FEM(PETSC_TRUE, PETSC_TRUE, degree, PETSC_DECIDE, q_extra, 1, &num_comp_q, dm));

{ // Add strong boundary conditions to DM
DMLabel label;
Expand Down

0 comments on commit 6d506a3

Please sign in to comment.