Lines Matching +full:petsc4py +full:- +full:pip
11 To visualize the solution, configure with petsc4py, pip install pyvista, and use
13 -potential_view pyvista -view_pyvista_warp 1.
17 -snes_convergence_estimate -convest_num_refine 2 -convest_monitor -convest_error_view pyvista
21 -snes_vi_monitor_residual pyvista -snes_vi_monitor_active pyvista
25 -snes_vi_monitor -snes_converged_reason -convest_monitor
57 const PetscReal r_0 = par->r_0; in obstacle_ball()
59 const PetscReal psi_0 = PetscSqrtReal(1. - PetscSqr(r_0)); in obstacle_ball()
60 const PetscReal dpsi_0 = -r_0 / psi_0; in obstacle_ball()
64 if (r < r_0) u[0] = PetscSqrtReal(1.0 - PetscSqr(r)); in obstacle_ball()
65 else u[0] = psi_0 + dpsi_0 * (r - r_0); in obstacle_ball()
72 const PetscReal r_free = par->r_free; in exactSol_ball()
73 const PetscReal A = par->A; in exactSol_ball()
74 const PetscReal B = par->B; in exactSol_ball()
80 else u[0] = -A * PetscLogReal(r) + B; in exactSol_ball()
98 options->obsType = OBSTACLE_BALL; in ProcessOptions()
102 …tscCall(PetscOptionsEList("-obs_type", "Type of obstacle", "ex34.c", obstacleTypes, NUM_OBSTACLE_T… in ProcessOptions()
103 options->obsType = (ObstacleType)obs; in ProcessOptions()
115 PetscCall(PetscBagGetData(ctx->bag, &p)); in SetupParameters()
116 PetscCall(PetscBagSetName(ctx->bag, "par", "Obstacle Parameters")); in SetupParameters()
117 bag = ctx->bag; in SetupParameters()
118 PetscCall(PetscBagRegisterReal(bag, &p->r_0, 0.9, "r_0", "Ball radius, m")); in SetupParameters()
119 …PetscCall(PetscBagRegisterReal(bag, &p->r_free, 0.697965148223374, "r_free", "Ball free boundary r… in SetupParameters()
120 …PetscCall(PetscBagRegisterReal(bag, &p->A, 0.680259411891719, "A", "Logarithmic coefficient in exa… in SetupParameters()
121 …PetscCall(PetscBagRegisterReal(bag, &p->B, 0.471519893402112, "B", "Constant coefficient in exact … in SetupParameters()
128 PetscCall(PetscOptionsCreateViewer(comm, NULL, NULL, "-param_view", &viewer, &format, &flg)); in SetupParameters()
147 PetscCall(DMViewFromOptions(*dm, NULL, "-dm_view")); in CreateMesh()
166 PetscCall(PetscBagGetData(user->bag, ¶m)); in SetupPrimalProblem()
167 switch (user->obsType) { in SetupPrimalProblem()
175 …alid obstacle type: %s (%d)", obstacleTypes[PetscMin(user->obsType, NUM_OBSTACLE_TYPES)], user->ob… in SetupPrimalProblem()
177 PetscCall(PetscBagGetData(user->bag, &ctx)); in SetupPrimalProblem()
185 constants[0] = param->r_0; // Ball radius in SetupPrimalProblem()
186 constants[1] = param->r_free; // Radius of the free boundary for the ball obstacle in SetupPrimalProblem()
187 constants[2] = param->A; // Logarithmic coefficient in exact ball solution in SetupPrimalProblem()
188 constants[3] = param->B; // Constant coefficient in exact ball solution in SetupPrimalProblem()
209 PetscCall(PetscFECreateByCell(PETSC_COMM_SELF, dim, 1, ct, name ? prefix : NULL, -1, &fe)); in SetupFE()
228 AppCtx user; /* User-defined work context */ in main()
250 PetscCall(VecViewFromOptions(u, NULL, "-potential_view")); in main()
263 args: -dm_plex_box_lower -2.,-2. -dm_plex_box_upper 2.,2. -dm_plex_box_faces 20,20 \
264 -potential_petscspace_degree 1 \
265 -snes_type vinewtonrsls -snes_vi_zero_tolerance 1.0e-12 \
266 -ksp_type preonly -pc_type lu
272 args: -dmsnes_check
278 args: -snes_convergence_estimate -convest_num_refine 2
284 args: -r_0 0.4
290 args: -dm_plex_simplex 0 -snes_convergence_estimate -convest_num_refine 2