  Stress tensors are derived for the multiparticle collision dynamics
algorithm, a particle-based mesoscale simulation method for fluctuating fluids,
resembling those of atomistic or molecular systems. Systems with periodic
boundary conditions as well as fluids confined in a slit are considered. For
every case, two equivalent expressions for the tensor are provided, the
internal stress tensor, which involves all degrees of freedom of a system, and
the external stress, which only includes the interactions with the confining
surfaces. In addition, stress tensors for a system with embedded particles are
determined. Based on the derived stress tensors, analytical expressions are
calculated for the shear viscosity. Simulations illustrate the difference in
fluctuations between the various derived expressions and yield very good
agreement between the numerical results and the analytically derived expression
for the viscosity.
