Unverified Commit 6027de53 authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #870 from lammps/doc-tweak

add info to compute heat/flux doc page and a small update to the developer's guide
parents 43002746 398f3173
Loading
Loading
Loading
Loading
+16 −15
Original line number Diff line number Diff line
@@ -609,8 +609,9 @@ this situation there are several methods which should be implemented:
\item \verb|double memory_usage| - return how much memory fix uses
\item \verb|void grow_arrays(int)| - do reallocation of the per particle arrays
  in your fix
\item \verb|void copy_arrays(int i, int j)| - copy i-th per-particle information 
  to j-th. Used when atoms sorting is performed
\item \verb|void copy_arrays(int i, int j, int delflag)| - copy i-th per-particle
  information to j-th. Used when atoms sorting is performed. if delflag is set
  and atom j owns a body, move the body information to atom i.
\item \verb|void set_arrays(int i)| - sets i-th particle related information to zero
\end{itemize}

@@ -654,7 +655,7 @@ void FixSavePos::grow_arrays(int nmax)
    memory->grow(this->x, nmax, 3, "FixSavePos:x");
}

void FixSavePos::copy_arrays(int i, int j)
void FixSavePos::copy_arrays(int i, int j, int delflag)
{
    memcpy(this->x[j], this->x[i], sizeof(double) * 3);
}
+10 −8
Original line number Diff line number Diff line
@@ -26,14 +26,16 @@ compute myFlux all heat/flux myKE myPE myStress :pre

Define a computation that calculates the heat flux vector based on
contributions from atoms in the specified group.  This can be used by
itself to measure the heat flux into or out of a reservoir of atoms,
or to calculate a thermal conductivity using the Green-Kubo formalism.

See the "fix thermal/conductivity"_fix_thermal_conductivity.html
command for details on how to compute thermal conductivity in an
alternate way, via the Muller-Plathe method.  See the "fix
heat"_fix_heat.html command for a way to control the heat added or
subtracted to a group of atoms.
itself to measure the heat flux through a set of atoms (e.g. a region
between two thermostatted reservoirs held at different temperatures),
or to calculate a thermal conductivity using the equilibrium
Green-Kubo formalism.

For other non-equilibrium ways to compute a thermal conductivity, see
"this section"_Section_howto.html#howto_20.  These include use of the
"fix thermal/conductivity"_fix_thermal_conductivity.html command for
the Muller-Plathe method.  Or the "fix heat"_fix_heat.html command
which can add or subtract heat from groups of atoms.

The compute takes three arguments which are IDs of other
"computes"_compute.html.  One calculates per-atom kinetic energy