BUG: lagrangian - corrected references to position()

This commit is contained in:
Andrew Heather
2017-12-19 21:25:12 +00:00
parent e97275cf12
commit bd181f9a6c
9 changed files with 16 additions and 16 deletions

View File

@ -74,7 +74,7 @@ void Foam::ensightCloud::writePositions
// Master // Master
forAllConstIter(Cloud<passiveParticle>, cloudPtr(), elmnt) forAllConstIter(Cloud<passiveParticle>, cloudPtr(), elmnt)
{ {
const point& p = elmnt().position(); const point p(elmnt().position());
os.write(p.x()); os.write(p.x());
os.write(p.y()); os.write(p.y());
@ -104,7 +104,7 @@ void Foam::ensightCloud::writePositions
label parcelId = 0; label parcelId = 0;
forAllConstIter(Cloud<passiveParticle>, cloudPtr(), elmnt) forAllConstIter(Cloud<passiveParticle>, cloudPtr(), elmnt)
{ {
const point& p = elmnt().position(); const point p(elmnt().position());
os.write(++parcelId, 8); // unusual width os.write(++parcelId, 8); // unusual width
os.write(p.x()); os.write(p.x());
@ -140,7 +140,7 @@ void Foam::ensightCloud::writePositions
label pti = 0; label pti = 0;
forAllConstIter(Cloud<passiveParticle>, cloudPtr(), elmnt) forAllConstIter(Cloud<passiveParticle>, cloudPtr(), elmnt)
{ {
const point& p = elmnt().position(); const point p(elmnt().position());
points[pti++] = p; points[pti++] = p;
} }

View File

@ -76,7 +76,7 @@ void Foam::vtk::lagrangianWriter::writePoints()
forAllConstIters(parcels, iter) forAllConstIters(parcels, iter)
{ {
const point& pt = iter().position(); const point pt(iter().position());
vtk::write(format(), pt); vtk::write(format(), pt);
} }

View File

@ -283,7 +283,7 @@ int main(int argc, char *argv[])
forAll(ids, j) forAll(ids, j)
{ {
const label localId = particleIds[j]; const label localId = particleIds[j];
const vector& pos = particles[localId].position(); const vector pos(particles[localId].position());
os << pos.x() << ' ' << pos.y() << ' ' << pos.z() os << pos.x() << ' ' << pos.y() << ' ' << pos.z()
<< nl; << nl;
} }

View File

@ -388,7 +388,7 @@ void Foam::particle::changeFace(const label tetTriI)
tetFacei_ = newFaceI; tetFacei_ = newFaceI;
tetPti_ = edgeI; tetPti_ = edgeI;
// Exit the loop now that the the tet point has been found // Exit the loop now that the tet point has been found
break; break;
} }
@ -890,11 +890,11 @@ Foam::scalar Foam::particle::trackToMovingTri
// Calculate the hit fraction // Calculate the hit fraction
label iH = -1; label iH = -1;
scalar muH = std::isnormal(detA[0]) && detA[0] <= 0 ? VGREAT : 1/detA[0]; scalar muH = std::isnormal(detA[0]) && detA[0] <= 0 ? VGREAT : 1/detA[0];
for (label i = 0; i < 4; ++ i) for (label i = 0; i < 4; ++i)
{ {
const Roots<3> mu = hitEqn[i].roots(); const Roots<3> mu = hitEqn[i].roots();
for (label j = 0; j < 3; ++ j) for (label j = 0; j < 3; ++j)
{ {
if (mu.type(j) == roots::real && hitEqn[i].derivative(mu[j]) < 0) if (mu.type(j) == roots::real && hitEqn[i].derivative(mu[j]) < 0)
{ {

View File

@ -220,7 +220,7 @@ void Foam::PairCollision<CloudType>::wallInteraction()
typename CloudType::parcelType& p = typename CloudType::parcelType& p =
*cellOccupancy[realCelli][cellParticleI]; *cellOccupancy[realCelli][cellParticleI];
const point& pos = p.position(); const point pos(p.position());
scalar r = wallModel_->pREff(p); scalar r = wallModel_->pREff(p);

View File

@ -292,7 +292,7 @@ Foam::label Foam::InflationInjection<CloudType>::parcelsToInject
continue; continue;
} }
const point& pP = pPtr->position(); const point pP(pPtr->position());
const vector& pU = pPtr->U(); const vector& pU = pPtr->U();
// Generate a tetrahedron of new positions with the // Generate a tetrahedron of new positions with the

View File

@ -93,7 +93,7 @@ Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled
const vector& omega = srf.omega().value(); const vector& omega = srf.omega().value();
const vector& r = p.position(); const vector r(p.position());
// Coriolis and centrifugal acceleration terms // Coriolis and centrifugal acceleration terms
value.Su() = value.Su() =

View File

@ -172,7 +172,7 @@ void Foam::SprayParcel<ParcelType>::calcAtomization
scalar soi = cloud.injectors().timeStart(); scalar soi = cloud.injectors().timeStart();
scalar currentTime = cloud.db().time().value(); scalar currentTime = cloud.db().time().value();
const vector& pos = this->position(); const vector pos(this->position());
const vector& injectionPos = this->position0(); const vector& injectionPos = this->position0();
// Disregard the continous phase when calculating the relative velocity // Disregard the continous phase when calculating the relative velocity

View File

@ -50,15 +50,15 @@ bool Foam::TrajectoryCollision<CloudType>::collideParcels
{ {
bool coalescence = false; bool coalescence = false;
const vector& pos1 = p1.position(); const vector pos1(p1.position());
const vector& pos2 = p2.position(); const vector pos2(p2.position());
const vector& U1 = p1.U(); const vector& U1 = p1.U();
const vector& U2 = p2.U(); const vector& U2 = p2.U();
vector URel = U1 - U2; vector URel(U1 - U2);
vector d = pos2 - pos1; vector d(pos2 - pos1);
scalar magd = mag(d); scalar magd = mag(d);
scalar vAlign = URel & (d/(magd + ROOTVSMALL)); scalar vAlign = URel & (d/(magd + ROOTVSMALL));