[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] r4624 - /trunk/getfem/src/getfem/getfem_error_estimate.
From: |
mathieu . fabre |
Subject: |
[Getfem-commits] r4624 - /trunk/getfem/src/getfem/getfem_error_estimate.h |
Date: |
Fri, 25 Apr 2014 08:45:40 -0000 |
Author: fabremathieu
Date: Fri Apr 25 10:45:39 2014
New Revision: 4624
URL: http://svn.gna.org/viewcvs/getfem?rev=4624&view=rev
Log:
work in progress
Modified:
trunk/getfem/src/getfem/getfem_error_estimate.h
Modified: trunk/getfem/src/getfem/getfem_error_estimate.h
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/getfem_error_estimate.h?rev=4624&r1=4623&r2=4624&view=diff
==============================================================================
--- trunk/getfem/src/getfem/getfem_error_estimate.h (original)
+++ trunk/getfem/src/getfem/getfem_error_estimate.h Fri Apr 25 10:45:39 2014
@@ -154,14 +154,39 @@
void error_estimate_nitsche(const mesh_im & mim,
const mesh_fem &mf_u,
const base_vector &U,
- scalar_type GAMMAC,
- scalar_type GAMMAN,
+ int GAMMAC,
+ int GAMMAN,
scalar_type lambda,
scalar_type mu,
scalar_type gamma0,
scalar_type f_coeff,
base_vector &ERR);
+
+
+
+ //#include "getfem/getfem_contact_and_friction_common.h"
+
+ template <typename VEC, typename VECR>
+ void coupled_projection(const VEC &x, const VEC &n,
+ scalar_type f, VECR &g) {
+ scalar_type xn = gmm::vect_sp(x, n);
+ scalar_type xnm = gmm::neg(xn);
+ scalar_type th = f * xnm;
+ scalar_type xtn = gmm::sqrt(gmm::vect_norm2_sqr(x) - xn*xn);
+
+ gmm::copy(gmm::scaled(n, -xnm), g);
+ if (th > scalar_type(0)) {
+ if (xtn <= th) {
+ gmm::add(x, g);
+ gmm::add(gmm::scaled(n, -xn), g);
+ } else {
+ gmm::add(gmm::scaled(x, f*xnm/xtn), g);
+ gmm::add(gmm::scaled(n, -f*xnm*xn/xtn), g);
+ }
+ }
+ }
+
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] r4624 - /trunk/getfem/src/getfem/getfem_error_estimate.h,
mathieu . fabre <=