[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ESPResSo-devel] Confused by this code: is it a bug?

From: Josh Berryman
Subject: [ESPResSo-devel] Confused by this code: is it a bug?
Date: Wed, 24 Jul 2013 13:00:00 +0200

Hello devs, 

this is basically a question for Olaf as he is the only author mentioned for pressure_tcl.c.

I have different results for these two commands (which I had thought to be the total stress tensor in both cases): 

     set tens [analyze stress_tensor total] 
     puts $tens

     set tens [analyze stress_tensor] 
     set tens [lindex $tens 0 ]
     puts $tens

 I find this in  the file: tcl/pressure_tcl.c

    else if (ARG0_IS_S("total")) {
      for(j=0; j<9; j++) {
        tvalue[j] =[j];
        for (i = 1; i <; i++) tvalue[j] +=[9*i + j];

But this in:
  for(j=0; j<9; j++) {
    value =[j];
    for (i = 1; i <; i++) value +=[9*i + j];
    Tcl_PrintDouble(interp, value, buffer);


The first version looks a bit suspicious to me, but could be legitimate code.... if these two are supposed to be different, can I have something in the docs to say how and why please?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]