v0.13.1
Loading...
Searching...
No Matches
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 lu \n"
39 "#-pc_type fieldsplit \n"
40 "-pc_fieldsplit_type schur \n"
41 " \n"
42 "-fieldsplit_ep_ksp_type preonly \n"
43 "-fieldsplit_ep_pc_type lu \n"
44 "# -fieldsplit_ep_ksp_monitor \n"
45 "-fieldsplit_ep_ksp_max_it 3 \n"
46 "-fieldsplit_ep_ksp_atol 1e-10 \n"
47 "-fieldsplit_ep_ksp_rtol 1e-10 \n"
48 "-fieldsplit_ep_pc_factor_mat_solver_type mumps \n"
49 "-fieldsplit_ep_mat_mumps_icntl_14 1200 \n"
50 "-fieldsplit_ep_mat_mumps_icntl_24 1 \n"
51 "-fieldsplit_ep_mat_mumps_icntl_20 0 \n"
52 "-fieldsplit_ep_mat_mumps_icntl_13 1 \n"
53 " \n"
54 "-fieldsplit_etau_pc_type fieldsplit \n"
55 "-fieldsplit_etau_pc_fieldsplit_type schur \n"
56 "-fieldsplit_etau_ksp_type preonly \n"
57 "-fieldsplit_etau_ksp_atol 1e-10 \n"
58 "-fieldsplit_etau_ksp_rtol 1e-10 \n"
59 "# -fieldsplit_etau_ksp_monitor \n"
60 " \n"
61 "# plastic multiplier \n"
62 "-fieldsplit_etau_fieldsplit_tau_pc_type lu \n"
63 "-fieldsplit_etau_fieldsplit_tau_ksp_type fgmres \n"
64 "-fieldsplit_etau_fieldsplit_tau_ksp_max_it 3 \n"
65 "-fieldsplit_etau_fieldsplit_tau_pc_factor_mat_solver_type mumps \n"
66 "-fieldsplit_etau_fieldsplit_tau_mat_mumps_icntl_14 1200 \n"
67 "-fieldsplit_etau_fieldsplit_tau_mat_mumps_icntl_24 1 \n"
68 "-fieldsplit_etau_fieldsplit_tau_mat_mumps_icntl_20 0 \n"
69 "-fieldsplit_etau_fieldsplit_tau_mat_mumps_icntl_13 1 \n"
70 "-fieldsplit_etau_fieldsplit_tau_ksp_atol 1e-10 \n"
71 "-fieldsplit_etau_fieldsplit_tau_ksp_rtol 1e-10 \n"
72 "# -fieldsplit_etau_fieldsplit_tau_ksp_monitor \n"
73 " \n"
74 "# boundary \n"
75 "-fieldsplit_etau_fieldsplit_elastic_pc_type lu \n"
76 "# -fieldsplit_etau_fieldsplit_elastic_pc_type fieldsplit \n"
77 "-fieldsplit_etau_fieldsplit_elastic_pc_fieldsplit_type multiplicative \n"
78 "-fieldsplit_etau_fieldsplit_elastic_ksp_type fgmres \n"
79 "-fieldsplit_etau_fieldsplit_elastic_pc_factor_mat_solver_type mumps \n"
80 "-fieldsplit_etau_fieldsplit_elastic_mat_mumps_icntl_14 1200 \n"
81 "-fieldsplit_etau_fieldsplit_elastic_mat_mumps_icntl_24 1 \n"
82 "-fieldsplit_etau_fieldsplit_elastic_mat_mumps_icntl_20 0 \n"
83 "-fieldsplit_etau_fieldsplit_elastic_mat_mumps_icntl_13 1 \n"
84 "-fieldsplit_etau_fieldsplit_elastic_ksp_atol 1e-10 \n"
85 "-fieldsplit_etau_fieldsplit_elastic_ksp_rtol 1e-10 \n"
86 "# -fieldsplit_etau_fieldsplit_elastic_ksp_monitor \n"
87 " \n"
88 " \n"
89 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_pc_type lu \n"
90 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_ksp_type fgmres \n"
91 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_ksp_atol 1e-10 \n"
92 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_ksp_rtol 1e-10 \n"
93 "# -fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_ksp_monitor \n"
94 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_pc_factor_mat_solver_"
95 "type mumps \n"
96 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_mat_mumps_icntl_14 1200 "
97 "\n"
98 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_mat_mumps_icntl_24 1 \n"
99 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_mat_mumps_icntl_20 0 \n"
100 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_0_mat_mumps_icntl_13 1 \n"
101 " \n"
102 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_1_pc_type lu \n"
103 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_1_ksp_type fgmres \n"
104 "# -fieldsplit_etau_fieldsplit_elastic_fieldsplit_1_ksp_monitor \n"
105 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_1_pc_factor_mat_solver_"
106 "type mumps \n"
107 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_1_mat_mumps_icntl_14 1200 "
108 "\n"
109 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_1_mat_mumps_icntl_24 1 \n"
110 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_1_mat_mumps_icntl_20 0 \n"
111 "-fieldsplit_etau_fieldsplit_elastic_fieldsplit_1_mat_mumps_icntl_13 1 \n";
112
113std::string param_file = "param_file.petsc";
114
115if (!static_cast<bool>(ifstream(param_file))) {
116 std::ofstream file(param_file.c_str(), std::ios::ate);
117 if (file.is_open()) {
118 file << default_options;
119 file.close();
120 }
121}
const std::string default_options
std::string param_file