initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / molecularDynamics / molecule / mdTools / calculateMDFields.H
blobaf5c938da43cf3308ea2caf8ded6466cc27d09ad
1 const List<DynamicList<molecule*> >& cellOccupancy = molecules.cellOccupancy();
3 forAll(cellOccupancy, cell)
5     const List<molecule*>& molsInCell = cellOccupancy[cell];
7     forAll(molsInCell, mIC)
8     {
9         molecule* mol = molsInCell[mIC];
11         const label molId = mol->id();
13         const vector& molU = mol->U();
15         allSpeciesN_RU[molId][cell]++;
17         allSpeciesM_RU[molId][cell] += mol->mass();
19         allSpeciesVelocitySum_RU[molId][cell] += molU;
21         allSpeciesVelocityMagSquaredSum_RU[molId][cell] += molU & molU;
22     }