2323//
2424// Build with: make
2525// Run with:
26- // ./main -pc_type svd -problem darcy2d -dm_plex_dim 2 -dm_plex_box_faces 4,4
27- // ./main -pc_type svd -problem darcy3d -dm_plex_dim 3 -dm_plex_box_faces 4,4,4
28- // ./main -pc_type svd -problem darcy3d -dm_plex_filename /path to the mesh file
26+ // ./main -pc_type svd -problem darcy2d -dm_plex_dim 2 -dm_plex_box_faces 4,4
27+ // ./main -pc_type svd -problem darcy3d -dm_plex_dim 3 -dm_plex_box_faces 4,4,4
28+ // ./main -pc_type svd -problem darcy3d -dm_plex_filename /path to the mesh file
29+ // ./main -pc_type svd -problem darcy2d -dm_plex_dim 2 -dm_plex_box_faces 4,4 -bc_pressure 1
30+ // ./main -pc_type svd -problem darcy2d -dm_plex_dim 2 -dm_plex_box_faces 4,4 -bc_pressure 1,2,3,4
2931const char help [] = "Solve H(div)-mixed problem using PETSc and libCEED\n" ;
3032
3133#include "main.h"
@@ -62,7 +64,8 @@ int main(int argc, char **argv) {
6264
6365 // -- Process general command line options
6466 MPI_Comm comm = PETSC_COMM_WORLD ;
65- PetscCall ( ProcessCommandLineOptions (comm , app_ctx ) );
67+ app_ctx -> comm = comm ;
68+ PetscCall ( ProcessCommandLineOptions (app_ctx ) );
6669
6770 // ---------------------------------------------------------------------------
6871 // Choose the problem from the list of registered problems
@@ -107,7 +110,7 @@ int main(int argc, char **argv) {
107110
108111
109112 // ---------------------------------------------------------------------------
110- // Create local RHS vector
113+ // Create local Force vector
111114 // ---------------------------------------------------------------------------
112115 Vec F_loc ;
113116 PetscInt F_loc_size ;
@@ -147,9 +150,10 @@ int main(int argc, char **argv) {
147150 SNES snes ;
148151 KSP ksp ;
149152 Vec U ;
153+ op_apply_ctx -> comm = comm ;
150154 PetscCall ( SNESCreate (comm , & snes ) );
151155 PetscCall ( SNESGetKSP (snes , & ksp ) );
152- PetscCall ( SetupCommonCtx (comm , dm , ceed , ceed_data , op_apply_ctx ) );
156+ PetscCall ( SetupCommonCtx (dm , ceed , ceed_data , op_apply_ctx ) );
153157 PetscCall ( PDESolver (ceed_data , vec_type , snes , ksp , F , & U , op_apply_ctx ) );
154158 //VecView(U, PETSC_VIEWER_STDOUT_WORLD);
155159
@@ -163,7 +167,7 @@ int main(int argc, char **argv) {
163167 // ---------------------------------------------------------------------------
164168 // Print output results
165169 // ---------------------------------------------------------------------------
166- PetscCall ( PrintOutput (comm , ceed , mem_type_backend ,
170+ PetscCall ( PrintOutput (ceed , mem_type_backend ,
167171 snes , ksp , U , l2_error_u , l2_error_p , app_ctx ) );
168172
169173 // ---------------------------------------------------------------------------
0 commit comments