Skip to content

Commit

Permalink
fix bug in adhesion (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalillusions authored Mar 6, 2024
1 parent 9696086 commit dc2f63f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SPlisHSPlasH/SurfaceTension/SurfaceTension_Jeske2023.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ void SurfaceTension_Jeske2023::computeRHS(VectorXr &b, VectorXr &g) {
// + getDensityGrad(neighborIndex)
) / (rhoij * rhoij)
);
const Vector3r a = adhesion * xixj * density_i * W_firstOrder;
const Vector3r a = adhesion * (xixj - dt*vj) * density_i * W_firstOrder;
bi += a;
bm_neighbor->addForce(xi, -m_model->getMass(i) / density_i * a);
);
Expand Down Expand Up @@ -1159,7 +1159,7 @@ void SurfaceTension_Jeske2023::computeRHS(VectorXr &b, VectorXr &g) {
// + getDensityGrad(neighborIndex)
) / (rhoij * rhoij)
);
bi += adhesion * xixj * density_i * W_firstOrder;
bi += adhesion * (xixj - dt * vj) * density_i * W_firstOrder;

);
}
Expand Down

0 comments on commit dc2f63f

Please sign in to comment.