From 4308f005ab4b0ab2b943eb7c083f3a2f548efcb1 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 24 May 2018 23:12:01 -0500 Subject: [PATCH] Updated pair body rounded/polygon --- src/BODY/pair_body_rounded_polygon.cpp | 6 ++++-- src/BODY/pair_body_rounded_polyhedron.cpp | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/BODY/pair_body_rounded_polygon.cpp b/src/BODY/pair_body_rounded_polygon.cpp index 72591d2bd0..9f9cdea31b 100644 --- a/src/BODY/pair_body_rounded_polygon.cpp +++ b/src/BODY/pair_body_rounded_polygon.cpp @@ -374,6 +374,8 @@ void PairBodyRoundedPolygon::settings(int narg, char **arg) mu = force->numeric(FLERR,arg[2]); delta_ua = force->numeric(FLERR,arg[3]); cut_inner = force->numeric(FLERR,arg[4]); + + if (delta_ua < 0) delta_ua = 1; } /* ---------------------------------------------------------------------- @@ -1078,12 +1080,12 @@ int PairBodyRoundedPolygon::compute_distance_to_vertex(int ibody, // check if x0 (the queried vertex) and xmi (the body's center of mass) // are on the different sides of the edge - int m = opposite_sides(xi1, xi2, x0, xmi); + int m = 1;//opposite_sides(xi1, xi2, x0, xmi); if (m == 0) { // x0 and xmi are on not the opposite sides of the edge - // leave xpi for another edge to detect + // leave xpi for another edge to detect -- for convex shapes only mode = NONE; diff --git a/src/BODY/pair_body_rounded_polyhedron.cpp b/src/BODY/pair_body_rounded_polyhedron.cpp index 8d5f9ec72c..bc94b9cc80 100644 --- a/src/BODY/pair_body_rounded_polyhedron.cpp +++ b/src/BODY/pair_body_rounded_polyhedron.cpp @@ -82,6 +82,9 @@ PairBodyRoundedPolyhedron::PairBodyRoundedPolyhedron(LAMMPS *lmp) : Pair(lmp) c_t = 0.2; mu = 0.0; A_ua = 1.0; + + k_n = NULL; + k_na = NULL; } /* ---------------------------------------------------------------------- */