Skip to content

Commit

Permalink
fix signs (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahRo authored Apr 22, 2022
1 parent 92e5f6b commit 85badf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp/contact_kernels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ dolfinx_cuas::kernel_fn<T> generate_contact_kernel(
{
double sign_du = (lmbda * tr(j, l) * n_dot + mu * epsn(j, l));
double Pn_du
= (gamma_inv * sign_du - n_surf(l) * phi_f(q, j)) * -Pn_u * w0;
= (gamma_inv * sign_du - n_surf(l) * phi_f(q, j)) * Pn_u * w0;
sign_du *= w0;
for (int i = 0; i < ndofs_cell; i++)
{ // Insert over block size in matrix
Expand Down
2 changes: 1 addition & 1 deletion cpp/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ double dolfinx_contact::R_plus(double x) { return 0.5 * (std::abs(x) + x); }
//-------------------------------------------------------------------------------------
double dolfinx_contact::R_minus(double x) { return 0.5 * (x - std::abs(x)); }
//-------------------------------------------------------------------------------------
double dolfinx_contact::dR_minus(double x) { return -double(x < 0); }
double dolfinx_contact::dR_minus(double x) { return double(x < 0); }
//-------------------------------------------------------------------------------------

double dolfinx_contact::dR_plus(double x) { return double(x > 0); }
Expand Down

0 comments on commit 85badf2

Please sign in to comment.