From d3f0436be7d0af92d088ce886ea7434cefb67997 Mon Sep 17 00:00:00 2001 From: Sergey Litvinov Date: Wed, 13 Mar 2024 11:53:48 -0400 Subject: [PATCH] up --- example/min/helfrich_xin_fa/main.c | 2 +- example/min/juelicher/main.c | 23 ++++++++++++----------- example/min/rbc1_Langevin/main.c | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/example/min/helfrich_xin_fa/main.c b/example/min/helfrich_xin_fa/main.c index 7e58acb9b..af9c9312a 100644 --- a/example/min/helfrich_xin_fa/main.c +++ b/example/min/helfrich_xin_fa/main.c @@ -199,7 +199,7 @@ static void main0(real *vx, real *vy, real *vz, int cnt, i, j; real dt, dt_max, h, mu, rnd; real A, V, Vr; - real *queue[] = {XX, YY, ZZ, NULL}; + const real *queue[] = {XX, YY, ZZ, NULL}; int nsub; real et, eb, ek; diff --git a/example/min/juelicher/main.c b/example/min/juelicher/main.c index 2a6d0c4c9..83063a512 100644 --- a/example/min/juelicher/main.c +++ b/example/min/juelicher/main.c @@ -3,17 +3,18 @@ #include #include -#include -#include -#include -#include #include -#include +#include +#include #include -#include +#include #include +#include #include -#include +#include +#include +#include +#include #include #include @@ -80,7 +81,7 @@ static real energy(const real *xx, const real *yy, const real *zz) { if ( bnd(h) ) continue; i = D0[e]; j = D1[e]; k = D2[e]; l = D3[e]; get4(xx, yy, zz, i, j, k, l, /**/ a, b, c, d); - theta = tri_dih(a, b, c, d); + theta = dih_angle(a, b, c, d); vec_minus(b, c, u); len = vec_abs(u); cur = len*theta/4; @@ -126,7 +127,7 @@ static void force(const real *xx, const real *yy, const real *zz, i = D0[e]; j = D1[e]; k = D2[e]; l = D3[e]; get4(xx, yy, zz, i, j, k, l, /**/ a, b, c, d); vec_minus(c, b, u); - lentheta0 = vec_abs(u) * tri_dih(a, b, c, d); + lentheta0 = vec_abs(u) * dih_angle(a, b, c, d); lentheta[j] += lentheta0; lentheta[k] += lentheta0; } @@ -141,7 +142,7 @@ static void force(const real *xx, const real *yy, const real *zz, for (e = 0; e < NE; e++) { i = D0[e]; j = D1[e]; k = D2[e]; l = D3[e]; get4(xx, yy, zz, i, j, k, l, /**/ a, b, c, d); - theta0 = tri_dih(a, b, c, d); + theta0 = dih_angle(a, b, c, d); dedg_abs(c, b, /**/ dc, db); coef = -(lentheta[j]/AREA[j] + lentheta[k]/AREA[k])/4.0*theta0*Kb; vec_scalar_append(db, coef, j, fx, fy, fz); @@ -244,7 +245,7 @@ int main(int __UNUSED argc, const char *v[]) { f_area_ini(a0, Ka); f_garea_ini(A0, Kga); f_harmonic_ref_ini(Ke, XX, YY, ZZ); - real *queue[] = {XX, YY, ZZ, NULL}; + const real *queue[] = {XX, YY, ZZ, NULL}; min_ini(CONJUGATE_PR); diff --git a/example/min/rbc1_Langevin/main.c b/example/min/rbc1_Langevin/main.c index 7a0245288..ed6daed72 100644 --- a/example/min/rbc1_Langevin/main.c +++ b/example/min/rbc1_Langevin/main.c @@ -65,7 +65,7 @@ static void usg(void) { static int mkdir0(const char *path) { int rc; - char cmd[4048]; + char cmd[8192]; sprintf(cmd, "mkdir -p \"%s\"", path); rc = system(cmd); if (rc != 0)