GetFEM  5.5
getfem_contact_and_friction_nodal.h
Go to the documentation of this file.
1 /* -*- c++ -*- (enables emacs c++ mode) */
2 /*===========================================================================
3 
4  Copyright (C) 2004-2026 Yves Renard, Konstantinos Poulios.
5 
6  This file is a part of GetFEM
7 
8  GetFEM is free software; you can redistribute it and/or modify it
9  under the terms of the GNU Lesser General Public License as published
10  by the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version along with the GCC Runtime Library
12  Exception either version 3.1 or (at your option) any later version.
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  License and GCC Runtime Library Exception for more details.
17  You should have received a copy of the GNU Lesser General Public License
18  along with this program. If not, see https://www.gnu.org/licenses/.
19 
20  As a special exception, you may use this file as it is a part of a free
21  software library without restriction. Specifically, if other files
22  instantiate templates or use macros or inline functions from this file,
23  or you compile this file and link it with other files to produce an
24  executable, this file does not by itself cause the resulting executable
25  to be covered by the GNU Lesser General Public License. This exception
26  does not however invalidate any other reasons why the executable file
27  might be covered by the GNU Lesser General Public License.
28 
29 ===========================================================================*/
30 
31 /** @file getfem_contact_and_friction_nodal.h
32  @author Yves Renard <Yves.Renard@insa-lyon.fr>
33  @author Konstantinos Poulios <logari81@googlemail.com>
34  @date July 6, 2004.
35  @brief Unilateral contact and Coulomb friction condition brick.
36  */
37 #ifndef GETFEM_CONTACT_AND_FRICTION_NODAL_H__
38 #define GETFEM_CONTACT_AND_FRICTION_NODAL_H__
39 
40 #include "getfem_models.h"
41 
42 namespace getfem {
43 
44  typedef gmm::row_matrix<gmm::rsvector<scalar_type> > CONTACT_B_MATRIX;
45 
46  /** Add a frictionless contact condition to the model. If U is the vector
47  of degrees of freedom on which the unilateral constraint is applied,
48  the matrix `BN` has to be such that this condition is defined by
49  $B_N U \le gap$. The constraint is prescribed thank to a multiplier
50  `multname_n` whose dimension should be equal to the number of lines of
51  `BN`. The augmentation parameter `r` should be chosen in a range of
52  acceptabe values (see Getfem user documentation). `dataname_gap` is an
53  optional parameter representing the initial gap. It can be a single value
54  or a vector of value. `dataname_alpha` is an optional homogenization
55  parameter for the augmentation parameter
56  (see Getfem user documentation). The parameter `aug_version` indicates
57  the augmentation strategy : 1 for the non-symmetric Alart-Curnier
58  augmented Lagrangian, 2 for the symmetric one, 3 for the unsymmetric
59  method with augmented multiplier.
60  */
62  (model &md, const std::string &varname_u, const std::string &multname_n,
63  const std::string &dataname_r, CONTACT_B_MATRIX &BN,
64  std::string dataname_gap = "", std::string dataname_alpha = "",
65  int aug_version=1, bool Hughes_stabilized=false);
66 
67  /** Add a frictionless contact condition to the model between two deformable
68  bodies. If U1, U2 are the vector
69  of degrees of freedom on which the unilateral constraint is applied,
70  the matrices `BN1` and `BN2` have to be such that this condition
71  is defined by
72  $B_{N1} U_1 B_{N2} U_2 + \le gap$. The constraint is prescribed thank
73  to a multiplier
74  `multname_n` whose dimension should be equal to the number of lines of
75  `BN`. The augmentation parameter `r` should be chosen in a range of
76  acceptabe values (see Getfem user documentation). `dataname_gap` is an
77  optional parameter representing the initial gap. It can be a single value
78  or a vector of value. `dataname_alpha` is an optional homogenization
79  parameter for the augmentation parameter
80  (see Getfem user documentation). The parameter `aug_version` indicates
81  the augmentation strategy : 1 for the non-symmetric Alart-Curnier
82  augmented Lagrangian, 2 for the symmetric one, 3 for the unsymmetric
83  method with augmented multiplier.
84  */
86  (model &md, const std::string &varname_u1, const std::string &varname_u2,
87  const std::string &multname_n,
88  const std::string &dataname_r, CONTACT_B_MATRIX &BN1, CONTACT_B_MATRIX &BN2,
89  std::string dataname_gap = "", std::string dataname_alpha = "",
90  int aug_version=1, bool Hughes_stabilized=false);
91 
92 
93 
94  /** Add a contact with friction condition to the model. If U is the vector
95  of degrees of freedom on which the condition is applied,
96  the matrix `BN` has to be such that the contact condition is defined
97  by $B_N U \le gap$ and `BT` have to be such that the relative tangential
98  displacement is $B_T U$. The matrix `BT` should have as many rows as
99  `BN` multiplied by $d-1$ where $d$ is the domain dimension.
100  The contact condition is prescribed thank to a multiplier
101  `multname_n` whose dimension should be equal to the number of rows of
102  `BN` and the friction condition by a mutliplier `multname_t` whose size
103  should be the number of rows of `BT`.
104  The parameter `dataname_friction_coeff` describes the friction
105  coefficient. It could be a scalar or a vector describing the
106  coefficient on each contact condition.
107  The augmentation parameter
108  `r` should be chosen in a range of acceptabe values
109  (see Getfem user documentation). `dataname_gap` is an
110  optional parameter representing the initial gap. It can be a single value
111  or a vector of value. `dataname_alpha` is an optional homogenization
112  parameter for the augmentation parameter
113  (see Getfem user documentation). The parameter `aug_version`
114  indicates the augmentation strategy : 1 for the non-symmetric
115  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
116  3 for the unsymmetric
117  method with augmented multiplier and 4 for the unsymmetric
118  method with augmented multiplier and De Saxce projection.
119  */
121  (model &md, const std::string &varname_u, const std::string &multname_n,
122  const std::string &multname_t, const std::string &dataname_r,
123  CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &BT,
124  std::string dataname_friction_coeff,
125  std::string dataname_gap="", std::string dataname_alpha="",
126  int aug_version=1, bool Tresca_version=false, const std::string dataname_threshold="",
127  std::string dataname_gamma="", std::string dataname_wt="", bool Hughes_stabilized=false);
128 
129 
130 
131  /** Can be used to change the matrix BN of a basic contact/friction brick
132  */
133  CONTACT_B_MATRIX &contact_brick_set_BN(model &md, size_type indbrick);
134 
135  /** Can be used to set the stationary option
136  */
137  void contact_brick_set_stationary(model &md, size_type indbrick);
138 
139  /** Can be used to change the matrix DN of a basic contact/friction brick
140  */
141  CONTACT_B_MATRIX &contact_brick_set_DN(model &md, size_type indbrick);
142 
143  /** Can be used to change the matrix DT of a basic contact/friction brick
144  */
145  CONTACT_B_MATRIX &contact_brick_set_DT(model &md, size_type indbrick);
146 
147  /** Can be used to change the matrix BT of a basic contact/friction brick
148  */
149  CONTACT_B_MATRIX &contact_brick_set_BT(model &md, size_type indbrick);
150 
151 /** Add Hughes stabilized frictionless contact condition to the model. If U
152  is the vector of degrees of freedom on which the unilateral constraint is applied,
153  and Lambda the multiplier Vector of contact force.Then Hughes stabilized frictionless
154  contact condition is defined by the matrix `BN` and 'DN' have to be such that this
155  condition is defined by $B_N U - DN Lambda \le 0$. where 'DN' is the masse matrix
156  relative to stabilzed term.
157  The augmentation parameter `r` should be chosen in a range of acceptabe values.
158  `dataname_gap` is an optional parameter representing the initial gap. It can be
159  a single value or a vector of value. `dataname_alpha` is an optional homogenization
160  parameter for the augmentation parameter. The parameter `aug_version`
161  indicates the augmentation strategy : 1 for the non-symmetric
162  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
163  3 for the unsymmetric method with augmented multiplier.
164  */
166  (model &md, const std::string &varname_u, const std::string &multname_n,
167  const std::string &dataname_r, CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &DN,
168  std::string dataname_gap="", std::string dataname_alpha="",
169  int aug_version=1) {
170 
172  (md, varname_u, multname_n, dataname_r, BN,
173  dataname_gap, dataname_alpha, aug_version, true);
174  gmm::resize(contact_brick_set_DN(md, indbrick),
175  gmm::mat_nrows(DN), gmm::mat_ncols(DN));
176  gmm::copy(DN, contact_brick_set_DN(md, indbrick));
177  return indbrick;
178  }
179 
180  /** Add Hughes stabilized friction contact condition to the model (broken ?). If U is the vector
181  of degrees of freedom on which the condition is applied,
182  the matrix `BN` have to be such that the contact condition is defined
183  by $B_N U+DN Lambda \le 0$ (where 'DN' is the masse matrix
184  relative to stabilzed term) and `BT` have to be such that the relative
185  tangential displacement is $B_T U$. The matrix `BT` should have as many
186  rows as `BN` multiplied b $d-1$ where $d$ is the domain dimension.
187  The contact condition is prescribed thank to a multiplier
188  `multname_n` whose dimension should be equal to the number of rows of
189  `BN` and the friction condition by a mutliplier `multname_t` whise size
190  should be the number of rows of `BT`.
191  The parameter `dataname_friction_coeff` describe the friction
192  coefficient. It could be a scalar or a vector describing the
193  coefficient on each contact condition.
194  The augmentation parameter
195  `r` should be chosen in a range of acceptabe values
196  (see Getfem user documentation). `dataname_gap` is an
197  optional parameter representing the initial gap. It can be a single value
198  or a vector of value. `dataname_alpha` is an optional homogenization
199  parameter for the augmentation parameter
200  (see Getfem user documentation). The parameter `aug_version`
201  indicates the augmentation strategy : 1 for the non-symmetric
202  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
203  3 for the unsymmetric
204  method with augmented multiplier and 4 for the unsymmetric
205  method with augmented multiplier and De Saxce projection.
206  **/
208  (model &md, const std::string &varname_u, const std::string &multname_n,
209  const std::string &multname_t, const std::string &dataname_r,
210  CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &BT, CONTACT_B_MATRIX &DN,CONTACT_B_MATRIX &DT,
211  std::string dataname_friction_coeff,
212  std::string dataname_gap="", std::string dataname_alpha="",
213  int aug_version=1, bool Tresca_version=false, const std::string dataname_threshold="") {
214 
216  (md, varname_u, multname_n, multname_t, dataname_r, BN, BT,
217  dataname_friction_coeff, dataname_gap, dataname_alpha,
218  aug_version, Tresca_version, dataname_threshold, "", "", true);
219  gmm::resize(contact_brick_set_DN(md, indbrick),
220  gmm::mat_nrows(DN), gmm::mat_ncols(DN));
221  gmm::copy(DN, contact_brick_set_DN(md, indbrick));
222 
223  gmm::resize(contact_brick_set_DT(md, indbrick),
224  gmm::mat_nrows(DT), gmm::mat_ncols(DT));
225  gmm::copy(DT, contact_brick_set_DT(md, indbrick));
226  return indbrick;
227  }
228 
229 
230 
231  /** Add a frictionless contact condition with a rigid obstacle
232  to the model. The condition is applied on the variable `varname_u`
233  on the boundary corresponding to `region`. The rigid obstacle should
234  be described with the string `obstacle` being a signed distance to
235  the obstacle. This string should be an expression where the coordinates
236  are 'x', 'y' in 2D and 'x', 'y', 'z' in 3D. For instance, if the rigid
237  obstacle correspond to $z \le 0$, the corresponding signed distance will
238  be simply "z". `multname_n` should be a fixed size variable whose size is
239  the number of degrees of freedom on boundary `region`. It represents the
240  contact equivalent nodal forces.
241  The augmentation parameter `r` should be chosen in a
242  range of acceptabe values (close to the Young modulus of the elastic
243  body, see Getfem user documentation). The parameter `aug_version`
244  indicates the augmentation strategy : 1 for the non-symmetric
245  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
246  3 for the unsymmetric
247  method with augmented multiplier.
248  Basically, this brick computes the matrix BN
249  and the vectors gap and alpha and calls the basic contact brick.
250  */
252  (model &md, const mesh_im &mim, const std::string &varname_u,
253  const std::string &multname_n, const std::string &dataname_r,
254  size_type region, const std::string &obstacle, int aug_version=1);
255 
256 
257  /** Add a contact with friction condition with a rigid obstacle
258  to the model. The condition is applied on the variable `varname_u`
259  on the boundary corresponding to `region`. The rigid obstacle should
260  be described with the string `obstacle` being a signed distance to
261  the obstacle. This string should be an expression where the coordinates
262  are 'x', 'y' in 2D and 'x', 'y', 'z' in 3D. For instance, if the rigid
263  obstacle correspond to $z \le 0$, the corresponding signed distance will
264  be simply "z". `multname_n` should be a fixed size variable whose size is
265  the number of degrees of freedom on boundary `region`. It represents the
266  contact equivalent nodal forces.
267  `multname_t` should be a fixed size variable whose size is
268  the number of degrees of freedom on boundary `region` multiplied by
269  $d-1$ where $d$ is the domain dimension. It represents the
270  friction equivalent nodal forces.
271  The augmentation parameter `r` should be chosen in a
272  range of acceptabe values (close to the Young modulus of the elastic
273  body, see Getfem user documentation). `dataname_friction_coeff` is
274  the friction coefficient. It could be a scalar or a vector of values
275  representing the friction coefficient on each contact node.
276  The parameter `aug_version`
277  indicates the augmentation strategy : 1 for the non-symmetric
278  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
279  3 for the unsymmetric
280  method with augmented multiplier and 4 for the unsymmetric
281  method with augmented multiplier and De Saxce projection.
282  Basically, this brick computes the matrix BN
283  and the vectors gap and alpha and calls the basic contact brick.
284  */
286  (model &md, const mesh_im &mim, const std::string &varname_u,
287  const std::string &multname_n, const std::string &multname_t,
288  const std::string &dataname_r, const std::string &dataname_friction_coeff,
289  size_type region, const std::string &obstacle, int aug_version=1);
290 
291 
292  /** Add a frictionless contact condition between two faces of one or two
293  elastic bodies. The condition is applied on the variable `varname_u` or
294  the variables `varname_u1` and `varname_u2` depending if a single or
295  two distinct displacement fields are given. Vectors `rg1` and `rg2`
296  contain pairs of regions expected to come in contact with each other. In
297  case of a single region per side, `rg1` and `rg2` can be given as normal
298  integers. In the single displacement variable case the regions defined in
299  both `rg1` and `rg2` refer to the variable `varname_u`. In the case of
300  two displacement variables, `rg1` refers to `varname_u1` and `rg2` refers
301  to `varname_u2`. `multname_n` should be a fixed size variable whose size
302  is the number of degrees of freedom on those regions among the ones
303  defined in `rg1` and `rg2` which are characterized as "slaves". It
304  represents the contact equivalent nodal forces. The augmentation
305  parameter `r` should be chosen in a range of acceptabe values (close to
306  the Young modulus of the elastic body, see Getfem user documentation).
307  The optional parameters `slave1` and `slave2` declare if the regions
308  defined in `rg1` and `rg2` are correspondingly considered as "slaves".
309  By default `slave1` is true and `slave2` is false, i.e. `rg1` contains
310  the slave surfaces, while 'rg2' the master surfaces. Preferably only
311  one of `slave1` and `slave2` is set to true. The parameter `aug_version`
312  indicates the augmentation strategy : 1 for the non-symmetric
313  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
314  3 for the unsymmetric
315  method with augmented multiplier.
316  Basically, this brick computes the matrix BN and the vectors gap and
317  alpha and calls the basic contact brick.
318  */
320  (model &md, const mesh_im &mim1, const mesh_im &mim2,
321  const std::string &varname_u1, const std::string &varname_u2,
322  std::string &multname_n, const std::string &dataname_r,
323  const std::vector<size_type> &rg1, const std::vector<size_type> &rg2,
324  bool slave1=true, bool slave2=false, int aug_version=1);
325 
327  (model &md, const mesh_im &mim1, const mesh_im &mim2,
328  const std::string &varname_u1, const std::string &varname_u2,
329  std::string &multname_n, const std::string &dataname_r,
330  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
331  int aug_version=1) {
332 
333  std::vector<size_type> vrg1(1,rg1);
334  std::vector<size_type> vrg2(1,rg2);
336  (md, mim1, mim2, varname_u1, varname_u2, multname_n, dataname_r,
337  vrg1, vrg2, slave1, slave2, aug_version);
338  }
339 
341  (model &md, const mesh_im &mim, const std::string &varname_u,
342  std::string &multname_n, const std::string &dataname_r,
343  const std::vector<size_type> &rg1, const std::vector<size_type> &rg2,
344  bool slave1=true, bool slave2=false, int aug_version=1) {
345 
347  (md, mim, mim, varname_u, varname_u, multname_n, dataname_r,
348  rg1, rg2, slave1, slave2, aug_version);
349  }
350 
352  (model &md, const mesh_im &mim, const std::string &varname_u,
353  std::string &multname_n, const std::string &dataname_r,
354  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
355  int aug_version=1) {
356 
357  std::vector<size_type> vrg1(1,rg1);
358  std::vector<size_type> vrg2(1,rg2);
360  (md, mim, mim, varname_u, varname_u, multname_n, dataname_r,
361  vrg1, vrg2, slave1, slave2, aug_version);
362  }
363 
364 
365  /** Add a contact with friction condition between two faces of one or two
366  elastic bodies. The condition is applied on the variable `varname_u` or
367  the variables `varname_u1` and `varname_u2` depending if a single or
368  two distinct displacement fields are given. Vectors `rg1` and `rg2`
369  contain pairs of regions expected to come in contact with each other. In
370  case of a single region per side, `rg1` and `rg2` can be given as normal
371  integers. In the single displacement variable case the regions defined in
372  both `rg1` and `rg2` refer to the variable `varname_u`. In the case of
373  two displacement variables, `rg1` refers to `varname_u1` and `rg2` refers
374  to `varname_u2`. `multname_n` should be a fixed size variable whose size
375  is the number of degrees of freedom on those regions among the ones
376  defined in `rg1` and `rg2` which are characterized as "slaves". It
377  represents the contact equivalent nodal normal forces. `multname_t`
378  should be a fixed size variable whose size corresponds to the size of
379  `multname_n` multiplied by qdim - 1 . It represents the contact
380  equivalent nodal tangent (frictional) forces. The augmentation parameter
381  `r` should be chosen in a range of acceptabe values (close to the Young
382  modulus of the elastic body, see Getfem user documentation). The friction
383  coefficient stored in the parameter `friction_coeff` is either a single
384  value or a vector of the same size as `multname_n`. The optional
385  parameters `slave1` and `slave2` declare if the regions defined in `rg1`
386  and `rg2` are correspondingly considered as "slaves". By default `slave1`
387  is true and `slave2` is false, i.e. `rg1` contains the slave surfaces,
388  while 'rg2' the master surfaces. Preferably only one of `slave1` and
389  `slave2` is set to true. The parameter `aug_version`
390  indicates the augmentation strategy : 1 for the non-symmetric
391  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
392  3 for the unsymmetric
393  method with augmented multiplier and 4 for the unsymmetric
394  method with augmented multiplier and De Saxce projection.
395  Basically, this brick computes the matrices BN and BT as well the vectors
396  gap and alpha and calls the basic contact brick.
397  */
399  (model &md, const mesh_im &mim1, const mesh_im &mim2,
400  const std::string &varname_u1, const std::string &varname_u2,
401  std::string &multname_n, std::string &multname_t,
402  const std::string &dataname_r, const std::string &dataname_friction_coeff,
403  const std::vector<size_type> &rg1, const std::vector<size_type> &rg2,
404  bool slave1=true, bool slave2=false, int aug_version=1);
405 
407  (model &md, const mesh_im &mim1, const mesh_im &mim2,
408  const std::string &varname_u1, const std::string &varname_u2,
409  std::string &multname_n, std::string &multname_t,
410  const std::string &dataname_r, const std::string &dataname_friction_coeff,
411  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
412  int aug_version=1) {
413 
414  std::vector<size_type> vrg1(1,rg1);
415  std::vector<size_type> vrg2(1,rg2);
417  (md, mim1, mim2, varname_u1, varname_u2, multname_n, multname_t,
418  dataname_r, dataname_friction_coeff,
419  vrg1, vrg2, slave1, slave2, aug_version);
420  }
421 
423  (model &md, const mesh_im &mim, const std::string &varname_u,
424  std::string &multname_n, std::string &multname_t,
425  const std::string &dataname_r, const std::string &dataname_friction_coeff,
426  const std::vector<size_type> &rg1, const std::vector<size_type> &rg2,
427  bool slave1=true, bool slave2=false, int aug_version=1) {
428 
430  (md, mim, mim, varname_u, varname_u, multname_n, multname_t,
431  dataname_r, dataname_friction_coeff,
432  rg1, rg2, slave1, slave2, aug_version);
433  }
434 
436  (model &md, const mesh_im &mim, const std::string &varname_u,
437  std::string &multname_n, std::string &multname_t,
438  const std::string &dataname_r, const std::string &dataname_friction_coeff,
439  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
440  int aug_version=1) {
441 
442  std::vector<size_type> vrg1(1,rg1);
443  std::vector<size_type> vrg2(1,rg2);
445  (md, mim, mim, varname_u, varname_u, multname_n, multname_t,
446  dataname_r, dataname_friction_coeff,
447  vrg1, vrg2, slave1, slave2, aug_version);
448  }
449 
450 
451  // DEPRECATED FUNCTION NAMES
452 
453  IS_DEPRECATED inline size_type add_basic_contact_with_friction_brick
454  (model &md, const std::string &varname_u, const std::string &multname_n,
455  const std::string &multname_t, const std::string &dataname_r,
456  CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &BT,
457  std::string dataname_friction_coeff,
458  std::string dataname_gap="", std::string dataname_alpha="",
459  int aug_version=1, bool Tresca_version=false, bool Hughes_stabilized=false)
460  { return add_basic_contact_brick
461  (md, varname_u, multname_n, multname_t, dataname_r, BN, BT, dataname_friction_coeff,
462  dataname_gap, dataname_alpha, aug_version, Tresca_version, "", "", "", Hughes_stabilized); }
463 
464  IS_DEPRECATED inline size_type add_Hughes_stab_with_friction_contact_brick
465  (model &md, const std::string &varname_u, const std::string &multname_n,
466  const std::string &multname_t, const std::string &dataname_r,
467  CONTACT_B_MATRIX &BN, CONTACT_B_MATRIX &BT, CONTACT_B_MATRIX &DN,CONTACT_B_MATRIX &DT,
468  std::string dataname_friction_coeff, std::string dataname_gap="",
469  std::string dataname_alpha="", int aug_version=1, bool Tresca_version=false)
471  (md, varname_u, multname_n, multname_t, dataname_r, BN, BT, DN, DT,
472  dataname_friction_coeff, dataname_gap, dataname_alpha, aug_version, Tresca_version, ""); }
473 
474  // rigid obstacle
475  IS_DEPRECATED inline size_type add_contact_with_rigid_obstacle_brick
476  (model &md, const mesh_im &mim, const std::string &varname_u,
477  const std::string &multname_n, const std::string &dataname_r,
478  size_type region, const std::string &obstacle, int aug_version=1)
480  (md, mim, varname_u, multname_n, dataname_r, region, obstacle, aug_version); }
481 
482  IS_DEPRECATED inline size_type add_contact_with_friction_with_rigid_obstacle_brick
483  (model &md, const mesh_im &mim, const std::string &varname_u,
484  const std::string &multname_n, const std::string &multname_t,
485  const std::string &dataname_r, const std::string &dataname_friction_coeff,
486  size_type region, const std::string &obstacle, int aug_version=1)
488  (md, mim, varname_u, multname_n, multname_t, dataname_r,
489  dataname_friction_coeff, region, obstacle, aug_version); }
490 
491  // non-matching meshes
492  IS_DEPRECATED inline size_type add_nonmatching_meshes_contact_brick
493  (model &md, const mesh_im &mim1, const mesh_im &mim2,
494  const std::string &varname_u1, const std::string &varname_u2,
495  std::string &multname_n, const std::string &dataname_r,
496  const std::vector<size_type> &rg1, const std::vector<size_type> &rg2,
497  bool slave1=true, bool slave2=false, int aug_version=1)
499  (md, mim1, mim2, varname_u1, varname_u2, multname_n, dataname_r,
500  rg1, rg2, slave1, slave2, aug_version); }
501 
502  IS_DEPRECATED inline size_type add_nonmatching_meshes_contact_brick
503  (model &md, const mesh_im &mim1, const mesh_im &mim2,
504  const std::string &varname_u1, const std::string &varname_u2,
505  std::string &multname_n, const std::string &dataname_r,
506  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
507  int aug_version=0)
509  (md, mim1, mim2, varname_u1, varname_u2, multname_n, dataname_r,
510  rg1, rg2, slave1, slave2, aug_version); }
511 
512  IS_DEPRECATED inline size_type add_nonmatching_meshes_contact_brick
513  (model &md, const mesh_im &mim, const std::string &varname_u,
514  std::string &multname_n, const std::string &dataname_r,
515  const std::vector<size_type> &rg1, const std::vector<size_type> &rg2,
516  bool slave1=true, bool slave2=false, int aug_version=1)
518  (md, mim, varname_u, multname_n, dataname_r,
519  rg1, rg2, slave1, slave2, aug_version); }
520 
521  IS_DEPRECATED inline size_type add_nonmatching_meshes_contact_brick
522  (model &md, const mesh_im &mim, const std::string &varname_u,
523  std::string &multname_n, const std::string &dataname_r,
524  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
525  int aug_version=1)
527  (md, mim, varname_u, multname_n, dataname_r,
528  rg1, rg2, slave1, slave2, aug_version); }
529 
530  // non-matching meshes with friction
531  IS_DEPRECATED inline size_type add_nonmatching_meshes_contact_with_friction_brick
532  (model &md, const mesh_im &mim1, const mesh_im &mim2,
533  const std::string &varname_u1, const std::string &varname_u2,
534  std::string &multname_n, std::string &multname_t,
535  const std::string &dataname_r, const std::string &dataname_friction_coeff,
536  const std::vector<size_type> &rg1, const std::vector<size_type> &rg2,
537  bool slave1=true, bool slave2=false, int aug_version=1)
539  (md, mim1, mim2, varname_u1, varname_u2, multname_n, multname_t, dataname_r,
540  dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
541 
542  IS_DEPRECATED inline size_type add_nonmatching_meshes_contact_with_friction_brick
543  (model &md, const mesh_im &mim1, const mesh_im &mim2,
544  const std::string &varname_u1, const std::string &varname_u2,
545  std::string &multname_n, std::string &multname_t,
546  const std::string &dataname_r, const std::string &dataname_friction_coeff,
547  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
548  int aug_version=1)
550  (md, mim1, mim2, varname_u1, varname_u2, multname_n, multname_t,
551  dataname_r, dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
552 
553  IS_DEPRECATED inline size_type add_nonmatching_meshes_contact_with_friction_brick
554  (model &md, const mesh_im &mim, const std::string &varname_u,
555  std::string &multname_n, std::string &multname_t,
556  const std::string &dataname_r, const std::string &dataname_friction_coeff,
557  const std::vector<size_type> &rg1, const std::vector<size_type> &rg2,
558  bool slave1=true, bool slave2=false, int aug_version=1)
560  (md, mim, varname_u, multname_n, multname_t, dataname_r,
561  dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
562 
563  IS_DEPRECATED inline size_type add_nonmatching_meshes_contact_with_friction_brick
564  (model &md, const mesh_im &mim, const std::string &varname_u,
565  std::string &multname_n, std::string &multname_t,
566  const std::string &dataname_r, const std::string &dataname_friction_coeff,
567  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
568  int aug_version=1)
570  (md, mim, varname_u, multname_n, multname_t, dataname_r,
571  dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
572 
573 } /* end of namespace getfem. */
574 
575 
576 #endif /* GETFEM_CONTACT_AND_FRICTION_NODAL_H__ */
`‘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
Definition: bgeot_poly.h:48
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.