mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user