Skip to content

Commit 9e31dfb

Browse files
Match boundary conditions of 2D FD test
1 parent 7180fce commit 9e31dfb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/adv_diff_cg_supg.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ static inline PetscErrorCode ComputeSUPGStabilization(PetscInt dim, PetscReal h,
7474
PetscFunctionReturn(PETSC_SUCCESS);
7575
}
7676

77-
// Dirichlet BC: u = 1.0 (for inflow boundaries)
77+
// Dirichlet BC: u = 0.0 (for inflow boundaries)
7878
static PetscErrorCode dirichlet_bc(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, PetscScalar *u, void *ctx)
7979
{
80-
u[0] = 1.0;
80+
u[0] = 0.0;
8181
return PETSC_SUCCESS;
8282
}
8383

@@ -404,7 +404,7 @@ int main(int argc, char **argv)
404404
PetscCall(SetupSUPG(dm));
405405

406406
PetscCall(DMCreateGlobalVector(dm, &u));
407-
PetscCall(VecSet(u, 0.0));
407+
PetscCall(VecSet(u, 1.0));
408408
PetscCall(PetscObjectSetName((PetscObject)u, "adv_diff"));
409409
PetscCall(DMPlexSetSNESLocalFEM(dm, PETSC_FALSE, &options));
410410
// Only compute the jacobian once in case we're doing a second solve
@@ -423,7 +423,7 @@ int main(int argc, char **argv)
423423
// gpu implementation and we don't want a copy occuring back to the cpu
424424
if (second_solve)
425425
{
426-
PetscCall(VecSet(u, 0.0));
426+
PetscCall(VecSet(u, 1.0));
427427
PetscCall(SNESSolve(snes, NULL, u));
428428
}
429429

0 commit comments

Comments
 (0)