48 static Tensor2<double, 3, 3>
Omega;
49 static Tensor4<double, 3, 3, 3, 3>
Is;
65 template <
typename T1,
typename T2>
68 std::vector<double> gaps;
71 auto t_normal = roller.getNormal(t_coords, t_disp);
72 double dist = roller.getGap(t_coords);
76 auto it = std::min_element(gaps.begin(), gaps.end());
77 auto nb = distance(gaps.begin(), it);
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");
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;
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",
"",
182 const char *body_list[] = {
"plane",
"sphere",
"cylinder",
"cone",
183 "torus",
"roller",
"stl",
"nurbs"};
191 PetscBool flg = PETSC_FALSE;
193 string param =
"-body" + to_string(ii);
201 param =
"-coords" + to_string(ii);
203 ¢er_coords(0), &nb_coord, &rflg);
204 param =
"-move" + to_string(ii);
244 char pos_data_file[255];
245 PetscBool ctg_flag = PETSC_FALSE;
246 param =
"-position_data" + to_string(ii);
247 CHKERR PetscOptionsString(param.c_str(),
"",
"",
"", pos_data_file, 255,
259 "provide at least one body data for contact (-body1 "
260 "sphere -radius r and opional -move x,y) ");
264 ierr = PetscOptionsEnd();
292extern std::map<int, BlockParamData>
mat_blocks;
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#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.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
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)
MoFEMErrorCode scaleParameters()
MoFEMErrorCode getOptionsFromCommandLine()
static Tensor4< double, 3, 3, 3, 3 > Is
virtual MoFEMErrorCode scaleParameters()=0
static vector< double > gravity
static double spring_stiffness
static int closest_roller_id
static Tensor1< double, 3 > omega
static Tensor2< double, 3, 3 > Omega
static RigidBodyData * closest_roller
int getClosestRollerID(Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_disp)
static boost::ptr_vector< RigidBodyData > rollerDataVec
DataFromMove(size_t c, VectorDouble val, Range ents_bc)
VectorDouble scaledValues
DataFromMove(VectorDouble val, Range ents_bc)
LoadScale(double &my_scale)
MoFEMErrorCode scaleNf(const FEMethod *fe, VectorDouble &nf)
Class used to scale loads, f.e. in arc-length control.