v0.13.1
DefaultParams.hpp
Go to the documentation of this file.
1const std::string default_options =
2 "-order 2 \n"
3 " \n"
4 "-pc_type lu \n"
5 "-pc_factor_mat_solver_type mumps \n"
6 "#-ksp_monitor \n"
7 " \n"
8 "-snes_atol 1e-8 \n"
9 "-snes_rtol 1e-8 \n"
10 "-snes_max_linear_solve_fail -1 \n"
11 "-snes_linesearch_type bt \n"
12 "-snes_linesearch_max_it 3 \n"
13 "#-snes_monitor \n"
14 "-snes_max_it 25 \n"
15 " \n"
16 "-ts_max_time 2 \n"
17 "-ts_max_snes_failures 2 \n"
18 "-ts_type beuler \n"
19 "-ts_exact_final_time matchstep \n"
20 "-ts_dt 0.05 \n"
21 "-ts_error_if_step_fails false \n"
22 "-ts_monitor \n"
23 " \n"
24 "#-ts_adapt_monitor \n"
25 "#-ts_adapt_type basic \n"
26 "#-ts_adapt_basic_safety 0.8 \n"
27 "#-ts_adapt_dt_max 5.0 \n"
28 "#-ts_adapt_dt_min 0.005 \n"
29 " \n"
30 "-ts_adapt_always_accept 1 \n"
31 "-ts_theta_initial_guess_extrapolate 1 \n"
32 "-ts_theta_theta 1 \n"
33 "-ts_adapt_reject_safety 0.9 \n"
34 " \n"
35 " \n"
36 "-snes_ksp_ew 0 \n"
37 "# plastic strains \n"
38 "-pc_type fieldsplit \n"
39 "-pc_fieldsplit_type schur \n"
40 " \n"
41 "-fieldsplit_0_ksp_type preonly \n"
42 "# -fieldsplit_0_ksp_monitor \n"
43 "-fieldsplit_0_pc_type lu \n"
44 "-fieldsplit_0_pc_factor_mat_solver_type mumps \n"
45 "-fieldsplit_0_mat_mumps_icntl_14 1200 \n"
46 "-fieldsplit_0_mat_mumps_icntl_24 1 \n"
47 "-fieldsplit_0_mat_mumps_icntl_13 1 \n"
48 " \n"
49 "-fieldsplit_1_pc_type fieldsplit \n"
50 "-fieldsplit_1_pc_fieldsplit_type schur \n"
51 "-fieldsplit_1_ksp_type preonly \n"
52 "# -fieldsplit_1_ksp_monitor \n"
53 " \n"
54 "# plastic multiplier \n"
55 "-fieldsplit_1_fieldsplit_0_pc_type lu \n"
56 "-fieldsplit_1_fieldsplit_0_ksp_type preonly \n"
57 "-fieldsplit_1_fieldsplit_0_pc_factor_mat_solver_type mumps \n"
58 "-fieldsplit_1_fieldsplit_0_mat_mumps_icntl_14 1200 \n"
59 "-fieldsplit_1_fieldsplit_0_mat_mumps_icntl_24 1 \n"
60 "-fieldsplit_1_fieldsplit_0_mat_mumps_icntl_13 1 \n"
61 "-fieldsplit_0_mat_mumps_icntl_14 1200 \n"
62 "-fieldsplit_0_mat_mumps_icntl_24 1 \n"
63 "-fieldsplit_0_mat_mumps_icntl_13 1 \n"
64 "# -fieldsplit_1_fieldsplit_0_ksp_monitor \n"
65 " \n"
66 "# boundary \n"
67 "# -fieldsplit_1_fieldsplit_1_pc_type lu \n"
68 "-fieldsplit_1_fieldsplit_1_pc_type fieldsplit \n"
69 "-fieldsplit_1_fieldsplit_1_pc_fieldsplit_type multiplicative \n"
70 "-fieldsplit_1_fieldsplit_1_ksp_type fgmres \n"
71 "-fieldsplit_1_fieldsplit_1_pc_factor_mat_solver_type mumps \n"
72 "-fieldsplit_1_fieldsplit_1_mat_mumps_icntl_14 1200 \n"
73 "-fieldsplit_1_fieldsplit_1_mat_mumps_icntl_24 1 \n"
74 "-fieldsplit_1_fieldsplit_1_mat_mumps_icntl_13 1 \n"
75 "# -fieldsplit_1_fieldsplit_1_ksp_monitor \n"
76 " \n"
77 " \n"
78 "-fieldsplit_1_fieldsplit_1_fieldsplit_0_pc_type lu \n"
79 "-fieldsplit_1_fieldsplit_1_fieldsplit_0_ksp_type fgmres \n"
80 "# -fieldsplit_1_fieldsplit_1_fieldsplit_0_ksp_monitor \n"
81 "-fieldsplit_1_fieldsplit_1_fieldsplit_0_pc_factor_mat_solver_type mumps \n"
82 "-fieldsplit_1_fieldsplit_1_fieldsplit_0_mat_mumps_icntl_14 1200 \n"
83 "-fieldsplit_1_fieldsplit_1_fieldsplit_0_mat_mumps_icntl_24 1 \n"
84 "-fieldsplit_1_fieldsplit_1_fieldsplit_0_mat_mumps_icntl_13 1 \n"
85 " \n"
86 "-fieldsplit_1_fieldsplit_1_fieldsplit_1_pc_type lu \n"
87 "-fieldsplit_1_fieldsplit_1_fieldsplit_1_ksp_type fgmres \n"
88 "# -fieldsplit_1_fieldsplit_1_fieldsplit_1_ksp_monitor \n"
89 "-fieldsplit_1_fieldsplit_1_fieldsplit_1_pc_factor_mat_solver_type mumps \n"
90 "-fieldsplit_1_fieldsplit_1_fieldsplit_1_mat_mumps_icntl_14 1200 \n"
91 "-fieldsplit_1_fieldsplit_1_fieldsplit_1_mat_mumps_icntl_24 1 \n"
92 "-fieldsplit_1_fieldsplit_1_fieldsplit_1_mat_mumps_icntl_13 1 \n";
93
94std::string param_file = "param_file.petsc";
95
96if (!static_cast<bool>(ifstream(param_file))) {
97 std::ofstream file(param_file.c_str(), std::ios::ate);
98 if (file.is_open()) {
99 file << default_options;
100 file.close();
101 }
102}
const std::string default_options
std::string param_file