getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] r4538 - /trunk/getfem/src/getfem_contact_and_friction_c


From: logari81
Subject: [Getfem-commits] r4538 - /trunk/getfem/src/getfem_contact_and_friction_common.cc
Date: Fri, 14 Mar 2014 22:42:10 -0000

Author: logari81
Date: Fri Mar 14 23:42:10 2014
New Revision: 4538

URL: http://svn.gna.org/viewcvs/getfem?rev=4538&view=rev
Log:
enable the use of previous versions of the displacement field as velocity 
reference for large sliding contact

Modified:
    trunk/getfem/src/getfem_contact_and_friction_common.cc

Modified: trunk/getfem/src/getfem_contact_and_friction_common.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_contact_and_friction_common.cc?rev=4538&r1=4537&r2=4538&view=diff
==============================================================================
--- trunk/getfem/src/getfem_contact_and_friction_common.cc      (original)
+++ trunk/getfem/src/getfem_contact_and_friction_common.cc      Fri Mar 14 
23:42:10 2014
@@ -333,10 +333,16 @@
       l = &(md->real_variable(mmultname));
     }
     const model_real_plain_vector *w(0);
-    if (wname.size()) {
+    if (wname.compare(vvarname) == 0) {
+      GMM_ASSERT1(md->n_iter_of_variable(vvarname) > 1, "More than one "
+                 "versions of the displacement variable were expected here");
+      w = &(md->real_variable(vvarname,1));
+    }
+    else if (wname.size()) {
       GMM_ASSERT1(&(md->mesh_fem_of_variable(wname))
-                 == &(md->mesh_fem_of_variable(vvarname)), "The velocity "
-                 "should be defined on the same mesh_fem as the displacement");
+                 == &(md->mesh_fem_of_variable(vvarname)), "The previous "
+                 "displacement should be defined on the same mesh_fem as the "
+                 "current one");
       w = &(md->real_variable(wname));
     }
     return add_master_boundary(mim, &(md->mesh_fem_of_variable(vvarname)),
@@ -356,10 +362,16 @@
       l = &(md->real_variable(mmultname));
     }
     const model_real_plain_vector *w(0);
-    if (wname.size()) {
+    if (wname.compare(vvarname) == 0) {
+      GMM_ASSERT1(md->n_iter_of_variable(vvarname) > 1, "More than one "
+                 "versions of the displacement variable were expected here");
+      w = &(md->real_variable(vvarname,1));
+    }
+    else if (wname.size()) {
       GMM_ASSERT1(&(md->mesh_fem_of_variable(wname))
-                 == &(md->mesh_fem_of_variable(vvarname)), "The velocity "
-                 "should be defined on the same mesh_fem as the displacement");
+                 == &(md->mesh_fem_of_variable(vvarname)), "The previous "
+                 "displacement should be defined on the same mesh_fem as the "
+                 "current one");
       w = &(md->real_variable(wname));
     }
     return add_slave_boundary(mim, &(md->mesh_fem_of_variable(vvarname)),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]