@@ -74,10 +74,10 @@ static inline PetscErrorCode ComputeSUPGStabilization(PetscInt dim, PetscReal h,
74
74
PetscFunctionReturn (PETSC_SUCCESS );
75
75
}
76
76
77
- // Dirichlet BC: u = 1 .0 (for inflow boundaries)
77
+ // Dirichlet BC: u = 0 .0 (for inflow boundaries)
78
78
static PetscErrorCode dirichlet_bc (PetscInt dim , PetscReal time , const PetscReal x [], PetscInt Nc , PetscScalar * u , void * ctx )
79
79
{
80
- u [0 ] = 1 .0 ;
80
+ u [0 ] = 0 .0 ;
81
81
return PETSC_SUCCESS ;
82
82
}
83
83
@@ -404,7 +404,7 @@ int main(int argc, char **argv)
404
404
PetscCall (SetupSUPG (dm ));
405
405
406
406
PetscCall (DMCreateGlobalVector (dm , & u ));
407
- PetscCall (VecSet (u , 0 .0 ));
407
+ PetscCall (VecSet (u , 1 .0 ));
408
408
PetscCall (PetscObjectSetName ((PetscObject )u , "adv_diff" ));
409
409
PetscCall (DMPlexSetSNESLocalFEM (dm , PETSC_FALSE , & options ));
410
410
// Only compute the jacobian once in case we're doing a second solve
@@ -423,7 +423,7 @@ int main(int argc, char **argv)
423
423
// gpu implementation and we don't want a copy occuring back to the cpu
424
424
if (second_solve )
425
425
{
426
- PetscCall (VecSet (u , 0 .0 ));
426
+ PetscCall (VecSet (u , 1 .0 ));
427
427
PetscCall (SNESSolve (snes , NULL , u ));
428
428
}
429
429
0 commit comments