Skip to content

Commit d8d1641

Browse files
authored
Merge pull request #1549 from CEED/jrwrigh/fix_stg_explicit
fluids: Enable Ceed-based strong BCs for explicit methods
2 parents a4ce970 + 5d5213b commit d8d1641

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

examples/fluids/src/setuplibceed.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ PetscErrorCode SetupLibceed(Ceed ceed, CeedData ceed_data, DM dm, User user, App
414414
NULL));
415415
PetscCall(OperatorApplyContextCreate(dm, dm, ceed, op_rhs, user->q_ceed, user->g_ceed, user->Q_loc, NULL, &user->op_rhs_ctx));
416416
PetscCallCeed(ceed, CeedOperatorDestroy(&op_rhs));
417+
PetscCheck(app_ctx->sgs_model_type == SGS_MODEL_NONE, user->comm, PETSC_ERR_SUP, "SGS modeling not implemented for explicit timestepping");
417418
} else { // IFunction
418419
CeedOperator op_ijacobian = NULL;
419420

@@ -425,10 +426,10 @@ PetscErrorCode SetupLibceed(Ceed ceed, CeedData ceed_data, DM dm, User user, App
425426
PetscCallCeed(ceed, CeedOperatorGetContextFieldLabel(op_ijacobian, "ijacobian time shift", &user->phys->ijacobian_time_shift_label));
426427
PetscCallCeed(ceed, CeedOperatorDestroy(&op_ijacobian));
427428
}
428-
if (problem->use_strong_bc_ceed) PetscCall(SetupStrongBC_Ceed(ceed, ceed_data, dm, user, problem, bc));
429429
if (app_ctx->sgs_model_type == SGS_MODEL_DATA_DRIVEN) PetscCall(SgsDDSetup(ceed, user, ceed_data, problem));
430430
}
431431

432+
if (problem->use_strong_bc_ceed) PetscCall(SetupStrongBC_Ceed(ceed, ceed_data, dm, user, problem, bc));
432433
if (app_ctx->turb_spanstats_enable) PetscCall(TurbulenceStatisticsSetup(ceed, user, ceed_data, problem));
433434
if (app_ctx->diff_filter_monitor && !user->diff_filter) PetscCall(DifferentialFilterSetup(ceed, user, ceed_data, problem));
434435
if (app_ctx->sgs_train_enable) PetscCall(SGS_DD_TrainingSetup(ceed, user, ceed_data, problem));

examples/fluids/src/strong_boundary_conditions.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,13 @@ PetscErrorCode SetupStrongSTG_Ceed(Ceed ceed, CeedData ceed_data, DM dm, Problem
2121
CeedQFunction qf_setup, qf_strongbc, qf_stgdata;
2222
CeedOperator op_setup, op_strong_bc_sub, op_stgdata;
2323
DMLabel domain_label;
24-
PetscInt dm_field = 0;
24+
PetscInt dm_field = 0, height = 1;
2525

2626
PetscFunctionBeginUser;
2727
PetscCall(DMGetLabel(dm, "Face Sets", &domain_label));
2828

2929
// Basis
30-
CeedInt height = 1;
3130
PetscCallCeed(ceed, CeedBasisCreateProjection(ceed_data->basis_x_sur, ceed_data->basis_q_sur, &basis_x_to_q_sur));
32-
// --- Get number of quadrature points for the boundaries
33-
CeedInt num_qpts_sur;
34-
PetscCallCeed(ceed, CeedBasisGetNumQuadraturePoints(ceed_data->basis_q_sur, &num_qpts_sur));
3531

3632
// Setup QFunction
3733
PetscCallCeed(ceed, CeedQFunctionCreateInterior(ceed, 1, SetupStrongBC, SetupStrongBC_loc, &qf_setup));

0 commit comments

Comments
 (0)