109 CHKERR PetscOptionsInsertString(
110 NULL,
"-mat_mumps_icntl_14 1200 -mat_mumps_icntl_24 1 "
111 "-mat_mumps_icntl_13 1 -mat_mumps_icntl_20 0");
113 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"",
"none");
116 CHKERR PetscOptionsGetRealArray(NULL, NULL,
"-gravity",
gravity.data(),
117 &nb_ent_grav, PETSC_NULL);
122 CHKERR PetscOptionsScalar(
"-poisson",
"Poisson ratio",
"",
poisson,
127 PetscBool with_contact = PETSC_FALSE;
128 CHKERR PetscOptionsBool(
"-with_contact",
"run calculations with contact",
129 "", with_contact, &with_contact, PETSC_NULL);
131 double rot_vec[3] = {0, 0, 1};
133 PetscBool is_rotating;
135 CHKERR PetscOptionsGetRealArray(NULL, NULL,
"-rot_omega", rot_vec, &nb_ent,
137 if (nb_ent < 3 && is_rotating) {
139 "provide an appropriate number of entries for omega vector (3)");
144 Omega(
i,
k) = levi_civita<double>(
i,
j,
k) * t1_omega(
j);
149 "poisson ratio value not supported");
151 CHKERR PetscOptionsScalar(
"-sigmaY",
"SigmaY - limit stress",
"",
sigmaY,
153 CHKERR PetscOptionsScalar(
"-H",
"Hardening modulus",
"",
H, &
H, PETSC_NULL);
154 CHKERR PetscOptionsScalar(
"-cn_pl",
155 "cn_pl parameter for active set constrains",
"",
157 CHKERR PetscOptionsScalar(
"-scale_constraint",
"constraint scale",
"",
159 CHKERR PetscOptionsScalar(
"-C1_k",
"1st Backstress",
"",
C1_k, &
C1_k,
163 CHKERR PetscOptionsScalar(
"-b_iso",
"Isotropic exponent",
"",
b_iso, &
b_iso,
165 CHKERR PetscOptionsScalar(
"-visH",
"viscous hardening",
"",
visH, &
visH,
168 CHKERR PetscOptionsScalar(
"-spring",
169 "Springs stiffness on the boundary (contact)",
"",
172 CHKERR PetscOptionsScalar(
"-cn_cont",
173 "cn_cont parameter for active set constrains",
"",
175 CHKERR PetscOptionsScalar(
176 "-rollers_stop",
"Time at which rollers will stop moving",
"",
179 constexpr int MAX_NB_OF_ROLLERS = 10;
182 const char *body_list[] = {
"plane",
"sphere",
"cylinder",
"cone",
183 "torus",
"roller",
"stl",
"nurbs"};
184 for (
int ii = 0; ii < MAX_NB_OF_ROLLERS; ++ii) {
188 VectorDouble center_coords({0, 0, 0});
189 VectorDouble disp({0, 0, 0});
191 PetscBool flg = PETSC_FALSE;
193 string param =
"-body" + to_string(ii);
198 CHKERR PetscOptionsGetEList(PETSC_NULL, NULL, param.c_str(), body_list,
201 param =
"-coords" + to_string(ii);
202 CHKERR PetscOptionsGetRealArray(NULL, NULL, param.c_str(),
203 ¢er_coords(0), &nb_coord, &rflg);
204 param =
"-move" + to_string(ii);
205 CHKERR PetscOptionsGetRealArray(NULL, NULL, param.c_str(), &disp(0),
208 switch (body_type_id) {
241 CHKERR rol.getBodyOptions();
243 char pos_data_file[255];
244 PetscBool ctg_flag = PETSC_FALSE;
245 param =
"-position_data" + to_string(ii);
246 CHKERR PetscOptionsString(param.c_str(),
"",
"",
"", pos_data_file, 255,
249 rol.methodOpForRollerPosition =
250 boost::make_shared<TimeAccelerogram>(
string(param));
251 rol.originCoords.clear();
252 rol.rollerDisp.clear();
255 param =
"-direction_data" + to_string(ii);
256 CHKERR PetscOptionsString(param.c_str(),
"",
"",
"", pos_data_file, 255,
259 rol.methodOpForRollerDirection =
260 boost::make_shared<TimeAccelerogram>(
string(param));
261 rol.BodyDirectionScaled = VectorDouble({0, 0, 0});
269 "provide at least one body data for contact (-body1 "
270 "sphere -radius r and opional -move x,y) ");
274 ierr = PetscOptionsEnd();