GetFEM  5.4.3
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-2020 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, write to the Free Software Foundation,
19  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20 
21  As a special exception, you may use this file as it is a part of a free
22  software library without restriction. Specifically, if other files
23  instantiate templates or use macros or inline functions from this file,
24  or you compile this file and link it with other files to produce an
25  executable, this file does not by itself cause the resulting executable
26  to be covered by the GNU Lesser General Public License. This exception
27  does not however invalidate any other reasons why the executable file
28  might be covered by the GNU Lesser General Public License.
29 
30 ===========================================================================*/
31 
32 /** @file getfem_contact_and_friction_nodal.h
33  @author Yves Renard <[email protected]>
34  @author Konstantinos Poulios <[email protected]>
35  @date July 6, 2004.
36  @brief Unilateral contact and Coulomb friction condition brick.
37  */
38 #ifndef GETFEM_CONTACT_AND_FRICTION_NODAL_H__
39 #define GETFEM_CONTACT_AND_FRICTION_NODAL_H__
40 
41 #include "getfem_models.h"
42 
43 namespace getfem {
44 
45  typedef gmm::row_matrix<gmm::rsvector<scalar_type> > CONTACT_B_MATRIX;
46 
47  /** Add a frictionless contact condition to the model. If U is the vector
48  of degrees of freedom on which the unilateral constraint is applied,
49  the matrix `BN` has to be such that this condition is defined by
50  $B_N U \le gap$. The constraint is prescribed thank to a multiplier
51  `multname_n` whose dimension should be equal to the number of lines of
52  `BN`. The augmentation parameter `r` should be chosen in a range of
53  acceptabe values (see Getfem user documentation). `dataname_gap` is an
54  optional parameter representing the initial gap. It can be a single value
55  or a vector of value. `dataname_alpha` is an optional homogenization
56  parameter for the augmentation parameter
57  (see Getfem user documentation). The parameter `aug_version` indicates
58  the augmentation strategy : 1 for the non-symmetric Alart-Curnier
59  augmented Lagrangian, 2 for the symmetric one, 3 for the unsymmetric
60  method with augmented multiplier.
61  */
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);
67 
68  /** Add a frictionless contact condition to the model between two deformable
69  bodies. If U1, U2 are the vector
70  of degrees of freedom on which the unilateral constraint is applied,
71  the matrices `BN1` and `BN2` have to be such that this condition
72  is defined by
73  $B_{N1} U_1 B_{N2} U_2 + \le gap$. The constraint is prescribed thank
74  to a multiplier
75  `multname_n` whose dimension should be equal to the number of lines of
76  `BN`. The augmentation parameter `r` should be chosen in a range of
77  acceptabe values (see Getfem user documentation). `dataname_gap` is an
78  optional parameter representing the initial gap. It can be a single value
79  or a vector of value. `dataname_alpha` is an optional homogenization
80  parameter for the augmentation parameter
81  (see Getfem user documentation). The parameter `aug_version` indicates
82  the augmentation strategy : 1 for the non-symmetric Alart-Curnier
83  augmented Lagrangian, 2 for the symmetric one, 3 for the unsymmetric
84  method with augmented multiplier.
85  */
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);
92 
93 
94 
95  /** Add a contact with friction condition to the model. If U is the vector
96  of degrees of freedom on which the condition is applied,
97  the matrix `BN` has to be such that the contact condition is defined
98  by $B_N U \le gap$ and `BT` have to be such that the relative tangential
99  displacement is $B_T U$. The matrix `BT` should have as many rows as
100  `BN` multiplied by $d-1$ where $d$ is the domain dimension.
101  The contact condition is prescribed thank to a multiplier
102  `multname_n` whose dimension should be equal to the number of rows of
103  `BN` and the friction condition by a mutliplier `multname_t` whose size
104  should be the number of rows of `BT`.
105  The parameter `dataname_friction_coeff` describes the friction
106  coefficient. It could be a scalar or a vector describing the
107  coefficient on each contact condition.
108  The augmentation parameter
109  `r` should be chosen in a range of acceptabe values
110  (see Getfem user documentation). `dataname_gap` is an
111  optional parameter representing the initial gap. It can be a single value
112  or a vector of value. `dataname_alpha` is an optional homogenization
113  parameter for the augmentation parameter
114  (see Getfem user documentation). The parameter `aug_version`
115  indicates the augmentation strategy : 1 for the non-symmetric
116  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
117  3 for the unsymmetric
118  method with augmented multiplier and 4 for the unsymmetric
119  method with augmented multiplier and De Saxce projection.
120  */
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);
129 
130 
131 
132  /** Can be used to change the matrix BN of a basic contact/friction brick
133  */
134  CONTACT_B_MATRIX &contact_brick_set_BN(model &md, size_type indbrick);
135 
136  /** Can be used to set the stationary option
137  */
138  void contact_brick_set_stationary(model &md, size_type indbrick);
139 
140  /** Can be used to change the matrix DN of a basic contact/friction brick
141  */
142  CONTACT_B_MATRIX &contact_brick_set_DN(model &md, size_type indbrick);
143 
144  /** Can be used to change the matrix DT of a basic contact/friction brick
145  */
146  CONTACT_B_MATRIX &contact_brick_set_DT(model &md, size_type indbrick);
147 
148  /** Can be used to change the matrix BT of a basic contact/friction brick
149  */
150  CONTACT_B_MATRIX &contact_brick_set_BT(model &md, size_type indbrick);
151 
152 /** Add Hughes stabilized frictionless contact condition to the model. If U
153  is the vector of degrees of freedom on which the unilateral constraint is applied,
154  and Lambda the multiplier Vector of contact force.Then Hughes stabilized frictionless
155  contact condition is defined by the matrix `BN` and 'DN' have to be such that this
156  condition is defined by $B_N U - DN Lambda \le 0$. where 'DN' is the masse matrix
157  relative to stabilzed term.
158  The augmentation parameter `r` should be chosen in a range of acceptabe values.
159  `dataname_gap` is an optional parameter representing the initial gap. It can be
160  a single value or a vector of value. `dataname_alpha` is an optional homogenization
161  parameter for the augmentation parameter. The parameter `aug_version`
162  indicates the augmentation strategy : 1 for the non-symmetric
163  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
164  3 for the unsymmetric method with augmented multiplier.
165  */
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="",
170  int aug_version=1) {
171 
173  (md, varname_u, multname_n, dataname_r, BN,
174  dataname_gap, dataname_alpha, aug_version, true);
175  gmm::resize(contact_brick_set_DN(md, indbrick),
176  gmm::mat_nrows(DN), gmm::mat_ncols(DN));
177  gmm::copy(DN, contact_brick_set_DN(md, indbrick));
178  return indbrick;
179  }
180 
181  /** Add Hughes stabilized friction contact condition to the model (broken ?). If U is the vector
182  of degrees of freedom on which the condition is applied,
183  the matrix `BN` have to be such that the contact condition is defined
184  by $B_N U+DN Lambda \le 0$ (where 'DN' is the masse matrix
185  relative to stabilzed term) and `BT` have to be such that the relative
186  tangential displacement is $B_T U$. The matrix `BT` should have as many
187  rows as `BN` multiplied b $d-1$ where $d$ is the domain dimension.
188  The contact condition is prescribed thank to a multiplier
189  `multname_n` whose dimension should be equal to the number of rows of
190  `BN` and the friction condition by a mutliplier `multname_t` whise size
191  should be the number of rows of `BT`.
192  The parameter `dataname_friction_coeff` describe the friction
193  coefficient. It could be a scalar or a vector describing the
194  coefficient on each contact condition.
195  The augmentation parameter
196  `r` should be chosen in a range of acceptabe values
197  (see Getfem user documentation). `dataname_gap` is an
198  optional parameter representing the initial gap. It can be a single value
199  or a vector of value. `dataname_alpha` is an optional homogenization
200  parameter for the augmentation parameter
201  (see Getfem user documentation). The parameter `aug_version`
202  indicates the augmentation strategy : 1 for the non-symmetric
203  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
204  3 for the unsymmetric
205  method with augmented multiplier and 4 for the unsymmetric
206  method with augmented multiplier and De Saxce projection.
207  **/
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="") {
215 
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);
220  gmm::resize(contact_brick_set_DN(md, indbrick),
221  gmm::mat_nrows(DN), gmm::mat_ncols(DN));
222  gmm::copy(DN, contact_brick_set_DN(md, indbrick));
223 
224  gmm::resize(contact_brick_set_DT(md, indbrick),
225  gmm::mat_nrows(DT), gmm::mat_ncols(DT));
226  gmm::copy(DT, contact_brick_set_DT(md, indbrick));
227  return indbrick;
228  }
229 
230 
231 
232  /** Add a frictionless contact condition with a rigid obstacle
233  to the model. The condition is applied on the variable `varname_u`
234  on the boundary corresponding to `region`. The rigid obstacle should
235  be described with the string `obstacle` being a signed distance to
236  the obstacle. This string should be an expression where the coordinates
237  are 'x', 'y' in 2D and 'x', 'y', 'z' in 3D. For instance, if the rigid
238  obstacle correspond to $z \le 0$, the corresponding signed distance will
239  be simply "z". `multname_n` should be a fixed size variable whose size is
240  the number of degrees of freedom on boundary `region`. It represents the
241  contact equivalent nodal forces.
242  The augmentation parameter `r` should be chosen in a
243  range of acceptabe values (close to the Young modulus of the elastic
244  body, see Getfem user documentation). The parameter `aug_version`
245  indicates the augmentation strategy : 1 for the non-symmetric
246  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
247  3 for the unsymmetric
248  method with augmented multiplier.
249  Basically, this brick computes the matrix BN
250  and the vectors gap and alpha and calls the basic contact brick.
251  */
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);
256 
257 
258  /** Add a contact with friction condition with a rigid obstacle
259  to the model. The condition is applied on the variable `varname_u`
260  on the boundary corresponding to `region`. The rigid obstacle should
261  be described with the string `obstacle` being a signed distance to
262  the obstacle. This string should be an expression where the coordinates
263  are 'x', 'y' in 2D and 'x', 'y', 'z' in 3D. For instance, if the rigid
264  obstacle correspond to $z \le 0$, the corresponding signed distance will
265  be simply "z". `multname_n` should be a fixed size variable whose size is
266  the number of degrees of freedom on boundary `region`. It represents the
267  contact equivalent nodal forces.
268  `multname_t` should be a fixed size variable whose size is
269  the number of degrees of freedom on boundary `region` multiplied by
270  $d-1$ where $d$ is the domain dimension. It represents the
271  friction equivalent nodal forces.
272  The augmentation parameter `r` should be chosen in a
273  range of acceptabe values (close to the Young modulus of the elastic
274  body, see Getfem user documentation). `dataname_friction_coeff` is
275  the friction coefficient. It could be a scalar or a vector of values
276  representing the friction coefficient on each contact node.
277  The parameter `aug_version`
278  indicates the augmentation strategy : 1 for the non-symmetric
279  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
280  3 for the unsymmetric
281  method with augmented multiplier and 4 for the unsymmetric
282  method with augmented multiplier and De Saxce projection.
283  Basically, this brick computes the matrix BN
284  and the vectors gap and alpha and calls the basic contact brick.
285  */
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);
291 
292 
293  /** Add a frictionless contact condition between two faces of one or two
294  elastic bodies. The condition is applied on the variable `varname_u` or
295  the variables `varname_u1` and `varname_u2` depending if a single or
296  two distinct displacement fields are given. Vectors `rg1` and `rg2`
297  contain pairs of regions expected to come in contact with each other. In
298  case of a single region per side, `rg1` and `rg2` can be given as normal
299  integers. In the single displacement variable case the regions defined in
300  both `rg1` and `rg2` refer to the variable `varname_u`. In the case of
301  two displacement variables, `rg1` refers to `varname_u1` and `rg2` refers
302  to `varname_u2`. `multname_n` should be a fixed size variable whose size
303  is the number of degrees of freedom on those regions among the ones
304  defined in `rg1` and `rg2` which are characterized as "slaves". It
305  represents the contact equivalent nodal forces. The augmentation
306  parameter `r` should be chosen in a range of acceptabe values (close to
307  the Young modulus of the elastic body, see Getfem user documentation).
308  The optional parameters `slave1` and `slave2` declare if the regions
309  defined in `rg1` and `rg2` are correspondingly considered as "slaves".
310  By default `slave1` is true and `slave2` is false, i.e. `rg1` contains
311  the slave surfaces, while 'rg2' the master surfaces. Preferably only
312  one of `slave1` and `slave2` is set to true. The parameter `aug_version`
313  indicates the augmentation strategy : 1 for the non-symmetric
314  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
315  3 for the unsymmetric
316  method with augmented multiplier.
317  Basically, this brick computes the matrix BN and the vectors gap and
318  alpha and calls the basic contact brick.
319  */
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);
326 
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,
331  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
332  int aug_version=1) {
333 
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);
339  }
340 
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) {
346 
348  (md, mim, mim, varname_u, varname_u, multname_n, dataname_r,
349  rg1, rg2, slave1, slave2, aug_version);
350  }
351 
353  (model &md, const mesh_im &mim, const std::string &varname_u,
354  std::string &multname_n, const std::string &dataname_r,
355  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
356  int aug_version=1) {
357 
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);
363  }
364 
365 
366  /** Add a contact with friction condition between two faces of one or two
367  elastic bodies. The condition is applied on the variable `varname_u` or
368  the variables `varname_u1` and `varname_u2` depending if a single or
369  two distinct displacement fields are given. Vectors `rg1` and `rg2`
370  contain pairs of regions expected to come in contact with each other. In
371  case of a single region per side, `rg1` and `rg2` can be given as normal
372  integers. In the single displacement variable case the regions defined in
373  both `rg1` and `rg2` refer to the variable `varname_u`. In the case of
374  two displacement variables, `rg1` refers to `varname_u1` and `rg2` refers
375  to `varname_u2`. `multname_n` should be a fixed size variable whose size
376  is the number of degrees of freedom on those regions among the ones
377  defined in `rg1` and `rg2` which are characterized as "slaves". It
378  represents the contact equivalent nodal normal forces. `multname_t`
379  should be a fixed size variable whose size corresponds to the size of
380  `multname_n` multiplied by qdim - 1 . It represents the contact
381  equivalent nodal tangent (frictional) forces. The augmentation parameter
382  `r` should be chosen in a range of acceptabe values (close to the Young
383  modulus of the elastic body, see Getfem user documentation). The friction
384  coefficient stored in the parameter `friction_coeff` is either a single
385  value or a vector of the same size as `multname_n`. The optional
386  parameters `slave1` and `slave2` declare if the regions defined in `rg1`
387  and `rg2` are correspondingly considered as "slaves". By default `slave1`
388  is true and `slave2` is false, i.e. `rg1` contains the slave surfaces,
389  while 'rg2' the master surfaces. Preferably only one of `slave1` and
390  `slave2` is set to true. The parameter `aug_version`
391  indicates the augmentation strategy : 1 for the non-symmetric
392  Alart-Curnier augmented Lagrangian, 2 for the symmetric one,
393  3 for the unsymmetric
394  method with augmented multiplier and 4 for the unsymmetric
395  method with augmented multiplier and De Saxce projection.
396  Basically, this brick computes the matrices BN and BT as well the vectors
397  gap and alpha and calls the basic contact brick.
398  */
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);
406 
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,
412  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
413  int aug_version=1) {
414 
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);
421  }
422 
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) {
429 
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);
434  }
435 
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,
440  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
441  int aug_version=1) {
442 
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);
449  }
450 
451 
452  // DEPRECATED FUNCTION NAMES
453 
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)
461  { return add_basic_contact_brick
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); }
464 
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, ""); }
474 
475  // rigid obstacle
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); }
482 
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); }
491 
492  // non-matching meshes
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); }
502 
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,
507  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
508  int aug_version=0)
510  (md, mim1, mim2, varname_u1, varname_u2, multname_n, dataname_r,
511  rg1, rg2, slave1, slave2, aug_version); }
512 
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); }
521 
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,
525  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
526  int aug_version=1)
528  (md, mim, varname_u, multname_n, dataname_r,
529  rg1, rg2, slave1, slave2, aug_version); }
530 
531  // non-matching meshes with friction
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); }
542 
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,
548  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
549  int aug_version=1)
551  (md, mim1, mim2, varname_u1, varname_u2, multname_n, multname_t,
552  dataname_r, dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
553 
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); }
563 
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,
568  size_type rg1, size_type rg2, bool slave1=true, bool slave2=false,
569  int aug_version=1)
571  (md, mim, varname_u, multname_n, multname_t, dataname_r,
572  dataname_friction_coeff, rg1, rg2, slave1, slave2, aug_version); }
573 
574 } /* end of namespace getfem. */
575 
576 
577 #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:49
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.