Commit 7f9f091f authored by graham's avatar graham
Browse files

Removing size specification for OPstream and IPstream for neighbour face...

Removing size specification for OPstream and IPstream for neighbour face centre and area exchanges, as per email from Mattijs re buffer alignment.
parent 98f01a33
......@@ -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;
......
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment