38 #ifndef GETFEM_CONTACT_AND_FRICTION_NODAL_H__
39 #define GETFEM_CONTACT_AND_FRICTION_NODAL_H__
45 typedef gmm::row_matrix<gmm::rsvector<scalar_type> > CONTACT_B_MATRIX;
63 (model &md,
const std::string &varname_u,
const std::string &multname_n,
64 const std::string &dataname_r, CONTACT_B_MATRIX &BN,
65 std::string dataname_gap =
"", std::string dataname_alpha =
"",
66 int aug_version=1,
bool Hughes_stabilized=
false);
87 (model &md,
const std::string &varname_u1,
const std::string &varname_u2,
88 const std::string &multname_n,
89 const std::string &dataname_r, CONTACT_B_MATRIX &BN1, CONTACT_B_MATRIX &BN2,
90 std::string dataname_gap =
"", std::string dataname_alpha =
"",
91 int aug_version=1,
bool Hughes_stabilized=
false);
122 (model &md,
const std::string &varname_u,
const std::string &multname_n,
123 const std::string &multname_t,
const std::string &dataname_r,
124 CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &BT,
125 std::string dataname_friction_coeff,
126 std::string dataname_gap=
"", std::string dataname_alpha=
"",
127 int aug_version=1,
bool Tresca_version=
false,
const std::string dataname_threshold=
"",
128 std::string dataname_gamma=
"", std::string dataname_wt=
"",
bool Hughes_stabilized=
false);
167 (
model &md,
const std::string &varname_u,
const std::string &multname_n,
168 const std::string &dataname_r, CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &DN,
169 std::string dataname_gap=
"", std::string dataname_alpha=
"",
173 (md, varname_u, multname_n, dataname_r, BN,
174 dataname_gap, dataname_alpha, aug_version,
true);
176 gmm::mat_nrows(DN), gmm::mat_ncols(DN));
209 (
model &md,
const std::string &varname_u,
const std::string &multname_n,
210 const std::string &multname_t,
const std::string &dataname_r,
211 CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &BT, CONTACT_B_MATRIX &DN,CONTACT_B_MATRIX &DT,
212 std::string dataname_friction_coeff,
213 std::string dataname_gap=
"", std::string dataname_alpha=
"",
214 int aug_version=1,
bool Tresca_version=
false,
const std::string dataname_threshold=
"") {
217 (md, varname_u, multname_n, multname_t, dataname_r, BN, BT,
218 dataname_friction_coeff, dataname_gap, dataname_alpha,
219 aug_version, Tresca_version, dataname_threshold,
"",
"",
true);
221 gmm::mat_nrows(DN), gmm::mat_ncols(DN));
225 gmm::mat_nrows(DT), gmm::mat_ncols(DT));
253 (model &md,
const mesh_im &mim,
const std::string &varname_u,
254 const std::string &multname_n,
const std::string &dataname_r,
255 size_type region,
const std::string &obstacle,
int aug_version=1);
287 (model &md,
const mesh_im &mim,
const std::string &varname_u,
288 const std::string &multname_n,
const std::string &multname_t,
289 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
290 size_type region,
const std::string &obstacle,
int aug_version=1);
321 (model &md,
const mesh_im &mim1,
const mesh_im &mim2,
322 const std::string &varname_u1,
const std::string &varname_u2,
323 std::string &multname_n,
const std::string &dataname_r,
324 const std::vector<size_type> &rg1,
const std::vector<size_type> &rg2,
325 bool slave1=
true,
bool slave2=
false,
int aug_version=1);
328 (model &md,
const mesh_im &mim1,
const mesh_im &mim2,
329 const std::string &varname_u1,
const std::string &varname_u2,
330 std::string &multname_n,
const std::string &dataname_r,
334 std::vector<size_type> vrg1(1,rg1);
335 std::vector<size_type> vrg2(1,rg2);
337 (md, mim1, mim2, varname_u1, varname_u2, multname_n, dataname_r,
338 vrg1, vrg2, slave1, slave2, aug_version);
342 (model &md,
const mesh_im &mim,
const std::string &varname_u,
343 std::string &multname_n,
const std::string &dataname_r,
344 const std::vector<size_type> &rg1,
const std::vector<size_type> &rg2,
345 bool slave1=
true,
bool slave2=
false,
int aug_version=1) {
348 (md, mim, mim, varname_u, varname_u, multname_n, dataname_r,
349 rg1, rg2, slave1, slave2, aug_version);
353 (model &md,
const mesh_im &mim,
const std::string &varname_u,
354 std::string &multname_n,
const std::string &dataname_r,
358 std::vector<size_type> vrg1(1,rg1);
359 std::vector<size_type> vrg2(1,rg2);
361 (md, mim, mim, varname_u, varname_u, multname_n, dataname_r,
362 vrg1, vrg2, slave1, slave2, aug_version);
400 (model &md,
const mesh_im &mim1,
const mesh_im &mim2,
401 const std::string &varname_u1,
const std::string &varname_u2,
402 std::string &multname_n, std::string &multname_t,
403 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
404 const std::vector<size_type> &rg1,
const std::vector<size_type> &rg2,
405 bool slave1=
true,
bool slave2=
false,
int aug_version=1);
408 (model &md,
const mesh_im &mim1,
const mesh_im &mim2,
409 const std::string &varname_u1,
const std::string &varname_u2,
410 std::string &multname_n, std::string &multname_t,
411 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
415 std::vector<size_type> vrg1(1,rg1);
416 std::vector<size_type> vrg2(1,rg2);
418 (md, mim1, mim2, varname_u1, varname_u2, multname_n, multname_t,
419 dataname_r, dataname_friction_coeff,
420 vrg1, vrg2, slave1, slave2, aug_version);
424 (model &md,
const mesh_im &mim,
const std::string &varname_u,
425 std::string &multname_n, std::string &multname_t,
426 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
427 const std::vector<size_type> &rg1,
const std::vector<size_type> &rg2,
428 bool slave1=
true,
bool slave2=
false,
int aug_version=1) {
431 (md, mim, mim, varname_u, varname_u, multname_n, multname_t,
432 dataname_r, dataname_friction_coeff,
433 rg1, rg2, slave1, slave2, aug_version);
437 (model &md,
const mesh_im &mim,
const std::string &varname_u,
438 std::string &multname_n, std::string &multname_t,
439 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
443 std::vector<size_type> vrg1(1,rg1);
444 std::vector<size_type> vrg2(1,rg2);
446 (md, mim, mim, varname_u, varname_u, multname_n, multname_t,
447 dataname_r, dataname_friction_coeff,
448 vrg1, vrg2, slave1, slave2, aug_version);
454 IS_DEPRECATED
inline size_type add_basic_contact_with_friction_brick
455 (model &md,
const std::string &varname_u,
const std::string &multname_n,
456 const std::string &multname_t,
const std::string &dataname_r,
457 CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &BT,
458 std::string dataname_friction_coeff,
459 std::string dataname_gap=
"", std::string dataname_alpha=
"",
460 int aug_version=1,
bool Tresca_version=
false,
bool Hughes_stabilized=
false)
462 (md, varname_u, multname_n, multname_t, dataname_r, BN, BT, dataname_friction_coeff,
463 dataname_gap, dataname_alpha, aug_version, Tresca_version,
"",
"",
"", Hughes_stabilized); }
465 IS_DEPRECATED
inline size_type add_Hughes_stab_with_friction_contact_brick
466 (model &md,
const std::string &varname_u,
const std::string &multname_n,
467 const std::string &multname_t,
const std::string &dataname_r,
468 CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &BT, CONTACT_B_MATRIX &DN,CONTACT_B_MATRIX &DT,
469 std::string dataname_friction_coeff, std::string dataname_gap=
"",
470 std::string dataname_alpha=
"",
int aug_version=1,
bool Tresca_version=
false)
472 (md, varname_u, multname_n, multname_t, dataname_r, BN, BT, DN, DT,
473 dataname_friction_coeff, dataname_gap, dataname_alpha, aug_version, Tresca_version,
""); }
476 IS_DEPRECATED
inline size_type add_contact_with_rigid_obstacle_brick
477 (model &md,
const mesh_im &mim,
const std::string &varname_u,
478 const std::string &multname_n,
const std::string &dataname_r,
479 size_type region,
const std::string &obstacle,
int aug_version=1)
481 (md, mim, varname_u, multname_n, dataname_r, region, obstacle, aug_version); }
483 IS_DEPRECATED
inline size_type add_contact_with_friction_with_rigid_obstacle_brick
484 (model &md,
const mesh_im &mim,
const std::string &varname_u,
485 const std::string &multname_n,
const std::string &multname_t,
486 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
487 size_type region,
const std::string &obstacle,
int aug_version=1)
489 (md, mim, varname_u, multname_n, multname_t, dataname_r,
490 dataname_friction_coeff, region, obstacle, aug_version); }
493 IS_DEPRECATED
inline size_type add_nonmatching_meshes_contact_brick
494 (model &md,
const mesh_im &mim1,
const mesh_im &mim2,
495 const std::string &varname_u1,
const std::string &varname_u2,
496 std::string &multname_n,
const std::string &dataname_r,
497 const std::vector<size_type> &rg1,
const std::vector<size_type> &rg2,
498 bool slave1=
true,
bool slave2=
false,
int aug_version=1)
500 (md, mim1, mim2, varname_u1, varname_u2, multname_n, dataname_r,
501 rg1, rg2, slave1, slave2, aug_version); }
503 IS_DEPRECATED
inline size_type add_nonmatching_meshes_contact_brick
504 (model &md,
const mesh_im &mim1,
const mesh_im &mim2,
505 const std::string &varname_u1,
const std::string &varname_u2,
506 std::string &multname_n,
const std::string &dataname_r,
510 (md, mim1, mim2, varname_u1, varname_u2, multname_n, dataname_r,
511 rg1, rg2, slave1, slave2, aug_version); }
513 IS_DEPRECATED
inline size_type add_nonmatching_meshes_contact_brick
514 (model &md,
const mesh_im &mim,
const std::string &varname_u,
515 std::string &multname_n,
const std::string &dataname_r,
516 const std::vector<size_type> &rg1,
const std::vector<size_type> &rg2,
517 bool slave1=
true,
bool slave2=
false,
int aug_version=1)
519 (md, mim, varname_u, multname_n, dataname_r,
520 rg1, rg2, slave1, slave2, aug_version); }
522 IS_DEPRECATED
inline size_type add_nonmatching_meshes_contact_brick
523 (model &md,
const mesh_im &mim,
const std::string &varname_u,
524 std::string &multname_n,
const std::string &dataname_r,
528 (md, mim, varname_u, multname_n, dataname_r,
529 rg1, rg2, slave1, slave2, aug_version); }
532 IS_DEPRECATED
inline size_type add_nonmatching_meshes_contact_with_friction_brick
533 (model &md,
const mesh_im &mim1,
const mesh_im &mim2,
534 const std::string &varname_u1,
const std::string &varname_u2,
535 std::string &multname_n, std::string &multname_t,
536 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
537 const std::vector<size_type> &rg1,
const std::vector<size_type> &rg2,
538 bool slave1=
true,
bool slave2=
false,
int aug_version=1)
540 (md, mim1, mim2, varname_u1, varname_u2, multname_n, multname_t, dataname_r,
541 dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
543 IS_DEPRECATED
inline size_type add_nonmatching_meshes_contact_with_friction_brick
544 (model &md,
const mesh_im &mim1,
const mesh_im &mim2,
545 const std::string &varname_u1,
const std::string &varname_u2,
546 std::string &multname_n, std::string &multname_t,
547 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
551 (md, mim1, mim2, varname_u1, varname_u2, multname_n, multname_t,
552 dataname_r, dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
554 IS_DEPRECATED
inline size_type add_nonmatching_meshes_contact_with_friction_brick
555 (model &md,
const mesh_im &mim,
const std::string &varname_u,
556 std::string &multname_n, std::string &multname_t,
557 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
558 const std::vector<size_type> &rg1,
const std::vector<size_type> &rg2,
559 bool slave1=
true,
bool slave2=
false,
int aug_version=1)
561 (md, mim, varname_u, multname_n, multname_t, dataname_r,
562 dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
564 IS_DEPRECATED
inline size_type add_nonmatching_meshes_contact_with_friction_brick
565 (model &md,
const mesh_im &mim,
const std::string &varname_u,
566 std::string &multname_n, std::string &multname_t,
567 const std::string &dataname_r,
const std::string &dataname_friction_coeff,
571 (md, mim, varname_u, multname_n, multname_t, dataname_r,
572 dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
`‘Model’' variables store the variables, the data and the description of a model.
Model representation in Getfem.
size_t size_type
used as the common size type in the library
GEneric Tool for Finite Element Methods.
size_type add_basic_contact_brick(model &md, const std::string &varname_u, const std::string &multname_n, const std::string &dataname_r, CONTACT_B_MATRIX &BN, std::string dataname_gap="", std::string dataname_alpha="", int aug_version=1, bool Hughes_stabilized=false)
Add a frictionless contact condition to the model.
size_type add_Hughes_stab_basic_contact_brick(model &md, const std::string &varname_u, const std::string &multname_n, const std::string &dataname_r, CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &DN, std::string dataname_gap="", std::string dataname_alpha="", int aug_version=1)
Add Hughes stabilized frictionless contact condition to the model.
size_type add_basic_contact_brick_two_deformable_bodies(model &md, const std::string &varname_u1, const std::string &varname_u2, const std::string &multname_n, const std::string &dataname_r, CONTACT_B_MATRIX &BN1, CONTACT_B_MATRIX &BN2, std::string dataname_gap="", std::string dataname_alpha="", int aug_version=1, bool Hughes_stabilized=false)
Add a frictionless contact condition to the model between two deformable bodies.
CONTACT_B_MATRIX & contact_brick_set_BN(model &md, size_type indbrick)
Can be used to change the matrix BN of a basic contact/friction brick.
void contact_brick_set_stationary(model &md, size_type indbrick)
Can be used to set the stationary option.
CONTACT_B_MATRIX & contact_brick_set_DT(model &md, size_type indbrick)
Can be used to change the matrix DT of a basic contact/friction brick.
CONTACT_B_MATRIX & contact_brick_set_DN(model &md, size_type indbrick)
Can be used to change the matrix DN of a basic contact/friction brick.
size_type add_nodal_contact_between_nonmatching_meshes_brick(model &md, const mesh_im &mim1, const mesh_im &mim2, const std::string &varname_u1, const std::string &varname_u2, std::string &multname_n, const std::string &dataname_r, const std::vector< size_type > &rg1, const std::vector< size_type > &rg2, bool slave1=true, bool slave2=false, int aug_version=1)
Add a frictionless contact condition between two faces of one or two elastic bodies.
size_type add_nodal_contact_with_rigid_obstacle_brick(model &md, const mesh_im &mim, const std::string &varname_u, const std::string &multname_n, const std::string &dataname_r, size_type region, const std::string &obstacle, int aug_version=1)
Add a frictionless contact condition with a rigid obstacle to the model.
CONTACT_B_MATRIX & contact_brick_set_BT(model &md, size_type indbrick)
Can be used to change the matrix BT of a basic contact/friction brick.