Removing size specification for OPstream and IPstream for neighbour face centre and area exchanges, as per email from Mattijs re buffer alignment.

This commit is contained in:
graham
2009-01-09 17:37:25 +00:00
parent 98f01a33dd
commit 7f9f091f42
2 changed files with 10 additions and 12 deletions

View File

@ -234,8 +234,7 @@ void Foam::referredCellList::buildReferredCellList
OPstream toNeighbProc
(
Pstream::blocking,
patch.neighbProcNo(),
+ 2*(sizeof(label) + patch.size()*sizeof(vector))
patch.neighbProcNo()
);
toNeighbProc << patch.faceCentres() << patch.faceAreas();
@ -261,8 +260,7 @@ void Foam::referredCellList::buildReferredCellList
IPstream fromNeighbProc
(
Pstream::blocking,
patch.neighbProcNo(),
2*(sizeof(label) + patch.size()*sizeof(vector))
patch.neighbProcNo()
);
fromNeighbProc >> neighbFaceCentres >> neighbFaceAreas;

View File

@ -48,7 +48,7 @@ scalar singleStepTotalPE = 0.0;
scalar singleStepTotalrDotf = 0.0;
vector singleStepCentreOfMass(vector::zero);
//vector singleStepCentreOfMass(vector::zero);
label singleStepNMols = molecules.size();
@ -68,13 +68,13 @@ label singleStepNMols = molecules.size();
singleStepTotalMass += molMass;
singleStepCentreOfMass += mol().position()*molMass;
//singleStepCentreOfMass += mol().position()*molMass;
}
if(singleStepNMols)
{
singleStepCentreOfMass /= singleStepTotalMass;
}
// if(singleStepNMols)
// {
// singleStepCentreOfMass /= singleStepTotalMass;
// }
for
(
@ -97,8 +97,8 @@ label singleStepNMols = molecules.size();
singleStepTotalLinearMomentum += molV * molMass;
singleStepTotalAngularMomentum += molPiGlobal
+((mol().position() - singleStepCentreOfMass) ^ (molV * molMass));
singleStepTotalAngularMomentum += molPiGlobal;
//+((mol().position() - singleStepCentreOfMass) ^ (molV * molMass));
if(mag(molV) > singleStepMaxVelocityMag)
{