Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
slitvinov committed Mar 13, 2024
1 parent d2d6f12 commit d3f0436
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion example/min/helfrich_xin_fa/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
23 changes: 12 additions & 11 deletions example/min/juelicher/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
#include <math.h>

#include <real.h>
#include <co/err.h>
#include <co/util.h>
#include <co/x.h>
#include <co/vec.h>
#include <co/ddih.h>
#include <co/tri.h>
#include <co/dedg.h>
#include <co/dih.h>
#include <co/dtri.h>
#include <co/memory.h>
#include <co/err.h>
#include <co/macro.h>
#include <co/memory.h>
#include <co/punto.h>
#include <co/dedg.h>
#include <co/tri.h>
#include <co/util.h>
#include <co/vec.h>
#include <co/x.h>

#include <alg/x.h>
#include <alg/min.h>
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand All @@ -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);
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion example/min/rbc1_Langevin/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d3f0436

Please sign in to comment.