105 {
107
108
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");
112
113 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"",
"none");
114
115 int nb_ent_grav = 3;
117 &nb_ent_grav, PETSC_NULL);
118
121
122 CHKERR PetscOptionsScalar(
"-poisson",
"Poisson ratio",
"",
poisson,
125 PETSC_NULL);
126
127 PetscBool with_contact = PETSC_FALSE;
128 CHKERR PetscOptionsBool(
"-with_contact",
"run calculations with contact",
129 "", with_contact, &with_contact, PETSC_NULL);
130
131 double rot_vec[3] = {0, 0, 1};
132 int nb_ent = 3;
133 PetscBool is_rotating;
134
136 &is_rotating);
137 if (nb_ent < 3 && is_rotating) {
139 "provide an appropriate number of entries for omega vector (3)");
140 }
141 {
144 Omega(
i,
k) = levi_civita<double>(
i,
j,
k) * t1_omega(
j);
145 }
146
149 "poisson ratio value not supported");
150
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,
160 PETSC_NULL);
162 PETSC_NULL);
163 CHKERR PetscOptionsScalar(
"-b_iso",
"Isotropic exponent",
"",
b_iso, &
b_iso,
164 PETSC_NULL);
165 CHKERR PetscOptionsScalar(
"-visH",
"viscous hardening",
"",
visH, &
visH,
166 PETSC_NULL);
167
168 CHKERR PetscOptionsScalar(
"-spring",
169 "Springs stiffness on the boundary (contact)", "",
171
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", "",
178
180
181
182 const char *body_list[] = {"plane", "sphere", "cylinder", "cone",
183 "torus", "roller", "stl", "nurbs"};
185 int nb_coord = 3;
186 int nb_disp = 3;
187 int nb_dirs = 3;
190
191 PetscBool flg = PETSC_FALSE;
192 PetscBool rflg;
193 string param = "-body" + to_string(ii);
194
195
196
200
201 param = "-coords" + to_string(ii);
203 ¢er_coords(0), &nb_coord, &rflg);
204 param = "-move" + to_string(ii);
206 &nb_disp, &rflg);
207 if (flg) {
208 switch (body_type_id) {
211 break;
214 break;
218 break;
221 break;
224 break;
227 break;
230 break;
232
233 break;
234 default:
235
236
237
238 break;
239 }
241 CHKERR rol.getBodyOptions();
242
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,
247 &ctg_flag);
248 if (ctg_flag) {
249 rol.methodOpForRollerPosition =
250 boost::make_shared<TimeAccelerogram>(string(param));
251 rol.originCoords.clear();
252 rol.rollerDisp.clear();
253 }
254
255 param = "-direction_data" + to_string(ii);
256 CHKERR PetscOptionsString(param.c_str(),
"",
"",
"", pos_data_file, 255,
257 &ctg_flag);
258 if (ctg_flag) {
259 rol.methodOpForRollerDirection =
260 boost::make_shared<TimeAccelerogram>(string(param));
262 }
263
264 }
265 }
266
269 "provide at least one body data for contact (-body1 "
270 "sphere -radius r and opional -move x,y) ");
271 }
272
273
274 ierr = PetscOptionsEnd();
276
278 }
static PetscErrorCode ierr
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
UBlasVector< double > VectorDouble
PetscErrorCode PetscOptionsGetRealArray(PetscOptions *, const char pre[], const char name[], PetscReal dval[], PetscInt *nmax, PetscBool *set)
PetscErrorCode PetscOptionsGetEList(PetscOptions *, const char pre[], const char name[], const char *const *list, PetscInt next, PetscInt *value, PetscBool *set)
static vector< double > gravity
static double spring_stiffness
static Tensor1< double, 3 > omega
static Tensor2< double, 3, 3 > Omega
static boost::ptr_vector< RigidBodyData > rollerDataVec