Browse files

Merge pull request #137 from ohickey/working_branch

added explanation of inelegant LB checkpoint fix, fixed two typos in LB ...
  • Loading branch information...
2 parents 3a95cfb + 45ba504 commit 758de6f8de08d486c620aa2e1c09c64b37fd7139 @fweik fweik committed Feb 27, 2014
Showing with 9 additions and 3 deletions.
  1. +3 −2 doc/tutorials/01-lennard_jones/01-lennard_jones.tex
  2. +5 −0 doc/ug/lb.tex
  3. +1 −1 src/lb.cpp
5 doc/tutorials/01-lennard_jones/01-lennard_jones.tex
@@ -394,7 +394,8 @@ \subsection{Comparisons and looping}
-set i 0 foreach j $x {\
+set i 0
+foreach j $x {\
puts "$j is item number $i in list x"; incr i}
@@ -418,7 +419,7 @@ \subsection{Comparisons and looping}
llength $x ; # get the size of list x (number of elements)
lappend x 5 ; # add a new member end of list
puts "x is {$x}" ; # print list again
-set $x [linsert $x 3 3a] ; # insert an element "3a" at index 3
+set x [linsert $x 3 3a] ; # insert an element "3a" at index 3
puts "x is {$x}" ; # print list again
5 doc/ug/lb.tex
@@ -139,6 +139,11 @@ \section{Setting up a LB fluid}
The two load commands load the populations from \var{filename}. This is useful for restarting a simulation either on the same
machine or a different machine. Some care should be taken when using the binary format as the format of doubles can depend
on both the computer being used as well as the compiler. This is currently only implemented for the cpu version of LB.
+One thing that one needs to be aware of is that loading the checkpoint causes Espresso to reuse the old forces. This is necessary
+since the coupling force between the paricles and the fluid has already been applied to the fluid. The correct way to restart
+an LB simulation is to first load in the particles with the correct forces, followed by "integrate 0", and then load the LB
+checkpoint with the above command. Failing to do this means that the particles do not have the correct forces during the first Verlet
\section{LB as a thermostat}
2 src/lb.cpp
@@ -891,7 +891,7 @@ int lb_lbfluid_load_checkpoint(char* filename, int binary) {
resort_particles = 0; //Prevents a call of on_resort_particles which gets called when the particle data is reset and then set recalc_forces = 1
else {
- fprintf (stderr, "To load an LB checkpoint one needs to have already initialized the LB fluid.\n");
+ fprintf (stderr, "To load an LB checkpoint one needs to have already initialized the LB fluid with the same grid size.\n");
return ES_ERROR;
if(lattice_switch & LATTICE_LB_GPU) {

0 comments on commit 758de6f

Please sign in to comment.