diff -Nru getfem++-4.0.0/debian/changelog getfem++-4.0.0/debian/changelog --- getfem++-4.0.0/debian/changelog 2010-03-18 13:49:46.000000000 +0000 +++ getfem++-4.0.0/debian/changelog 2010-03-18 19:01:28.000000000 +0000 @@ -1,4 +1,4 @@ -getfem++ (4.0.0-3ubuntu1+svn3501~ppak2) karmic; urgency=low +getfem++ (4.0.0-3ubuntu1+svn3501~ppak3) karmic; urgency=low * Build current svn version. * Enable muparser support. diff -Nru getfem++-4.0.0/interface/src/gf_model_set.cc getfem++-4.0.0/interface/src/gf_model_set.cc --- getfem++-4.0.0/interface/src/gf_model_set.cc 2010-02-24 20:12:15.000000000 +0000 +++ getfem++-4.0.0/interface/src/gf_model_set.cc 2010-03-18 18:59:16.000000000 +0000 @@ -1254,7 +1254,7 @@ ); - /*@SET ind = ('add contact with rigid obstacle brick', @tmim mim, @str varname_u, @str multname_n[, @str multname_t], @str dataname_r[, @str dataname_friction_coeff], @int region, @str obstacle, [, @int symmetrized]) + /*@SET ind = ('add contact with rigid obstacle brick', @tmim mim, @str varname_u, @str multname_n[, @str multname_t], @str dataname_r[, @str dataname_friction_coeff], @int region, @str obstacle[, @int symmetrized]) Add a contact with or without friction condition with a rigid obstacle to the model. The condition is applied on the variable `varname_u` @@ -1278,7 +1278,7 @@ representing the friction coefficient on each contact node. The parameter `symmetrized` indicates that the symmetry of the tangent matrix will be kept or not. Basically, this brick compute the matrix BN - and the vectors gap and alpha and call the basic contact brick. @*/ + and the vectors gap and alpha and calls the basic contact brick. @*/ sub_command ("add contact with rigid obstacle brick", 6, 9, 0, 1, @@ -1319,6 +1319,72 @@ out.pop().from_integer(int(ind + config::base_index())); ); + /*@SET ind = ('add frictionless contact brick', @tmim mim1[, @tmim mim2], @str varname_u1[, @str varname_u2], @str multname_n, @str dataname_r, @int rg1, @int rg2[, @int slave1, @int slave2, @int symmetrized]) + + Add a frictionless contact condition between two faces of one or two + elastic bodies. The condition is applied on the variable `varname_u` or + the variables `varname_u1` and `varname_u2` depending if a single or + two distinct displacement fields are given. Vectors `rg1` and `rg2` + contain pairs of regions expected to come in contact with each other. In + case of a single region per side, `rg1` and `rg2` can be given as normal + integers. In the single displacement variable case the regions defined in + both `rg1` and `rg2` refer to the variable `varname_u`. In the case of + two displacement variables, `rg1` refers to `varname_u1` and `rg2` refers + to `varname_u2`. `multname_n` should be a fixed size variable whose size + is the number of degrees of freedom on those regions among the ones + defined in `rg1` and `rg2` which are characterized as "slaves". It + represents the contact equivalent nodal forces. The augmentation + parameter `r` should be chosen in a range of acceptabe values (close to + the Young modulus of the elastic body, see Getfem user documentation). + The optional parameters `slave1` and `slave2` declare if the regions + defined in `rg1` and `rg2` are correspondingly considered as "slaves". + By default `slave1` is true and `slave2` is false, i.e. `rg1` contains + the slave surfaces, while 'rg2' the master surfaces. Preferrably only + one of `slave1` and `slave2` is set to true. The parameter `symmetrized` + indicates that the symmetry of the tangent matrix will be kept or not. + Basically, this brick computes the matrix BN and the vectors gap and + alpha and calls the basic contact brick. @*/ + sub_command + ("add frictionless contact brick", 6, 11, 0, 1, + + bool two_variables = true; + + getfemint_mesh_im *gfi_mim1; + getfemint_mesh_im *gfi_mim2; + std::string varname_u1; + std::string varname_u2; + bool slave1=true; bool slave2=false; bool symmetrized=false; + + gfi_mim1 = in.pop().to_getfemint_mesh_im(); + mexarg_in argin = in.pop(); + if (argin.is_string()) { + two_variables = false; + gfi_mim2 = gfi_mim1; + varname_u1 = argin.to_string(); + varname_u2 = varname_u1; + } else { + gfi_mim2 = argin.to_getfemint_mesh_im(); + varname_u1 = in.pop().to_string(); + varname_u2 = in.pop().to_string(); + } + std::string multname_n = in.pop().to_string(); + std::string dataname_r = in.pop().to_string(); + std::vector vrg1(1,in.pop().to_integer()); + std::vector vrg2(1,in.pop().to_integer()); + if (in.remaining()) slave1 = (in.pop().to_integer(0,1)) != 0; + if (in.remaining()) slave2 = (in.pop().to_integer(0,1)) != 0; + if (in.remaining()) symmetrized = (in.pop().to_integer(0,1)) != 0; + + size_type ind; + ind = getfem::add_frictionless_contact_brick + (md->model(), gfi_mim1->mesh_im(), gfi_mim2->mesh_im(), + varname_u1, varname_u2, multname_n, dataname_r, + vrg1, vrg2, slave1, slave2, symmetrized); + workspace().set_dependance(md, gfi_mim1); + workspace().set_dependance(md, gfi_mim2); + out.pop().from_integer(int(ind + config::base_index())); + ); + } if (m_in.narg() < 2) THROW_BADARG( "Wrong number of input arguments"); diff -Nru getfem++-4.0.0/src/getfem/getfem_Coulomb_friction.h getfem++-4.0.0/src/getfem/getfem_Coulomb_friction.h --- getfem++-4.0.0/src/getfem/getfem_Coulomb_friction.h 2010-01-15 20:31:28.000000000 +0000 +++ getfem++-4.0.0/src/getfem/getfem_Coulomb_friction.h 2010-03-18 18:02:28.000000000 +0000 @@ -157,7 +157,7 @@ /** Add a frictionless contact condition between two faces of one or two elastic bodies. The condition is applied on the variable `varname_u` or - the variables `varname_u1` and `varname_u2` depending on if a single or + the variables `varname_u1` and `varname_u2` depending if a single or two distinct displacement fields are given. Vectors `rg1` and `rg2` contain pairs of regions expected to come in contact with each other. In case of a single region per side, `rg1` and `rg2` can be given as normal