Commit 8187170d authored by Henry Weller's avatar Henry Weller
Browse files

tetPtI -> tetPti

parent 813baea8
......@@ -34,7 +34,7 @@ Foam::tetIndices::tetIndices()
faceBasePtI_(-1),
facePtAI_(-1),
facePtBI_(-1),
tetPtI_(-1)
tetPti_(-1)
{}
......@@ -53,7 +53,7 @@ Foam::tetIndices::tetIndices
faceBasePtI_(faceBasePtI),
facePtAI_(facePtAI),
facePtBI_(facePtBI),
tetPtI_(tetPtI)
tetPti_(tetPtI)
{}
......@@ -70,7 +70,7 @@ Foam::tetIndices::tetIndices
faceBasePtI_(-1),
facePtAI_(-1),
facePtBI_(-1),
tetPtI_(tetPtI)
tetPti_(tetPtI)
{
const faceList& pFaces = mesh.faces();
const labelList& pOwner = mesh.faceOwner();
......@@ -81,7 +81,7 @@ Foam::tetIndices::tetIndices
faceBasePtI_ = mesh.tetBasePtIs()[facei_];
label facePtI = (tetPtI_ + faceBasePtI_) % f.size();
label facePtI = (tetPti_ + faceBasePtI_) % f.size();
label otherFacePtI = f.fcIndex(facePtI);
if (own)
......
......@@ -104,7 +104,7 @@ class tetIndices
//- Point on the face, *relative to the base point*, which
// characterises this tet on the face.
label tetPtI_;
label tetPti_;
public:
......
......@@ -23,8 +23,6 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::label Foam::tetIndices::cell() const
......@@ -59,7 +57,7 @@ Foam::label Foam::tetIndices::facePtB() const
Foam::label Foam::tetIndices::tetPt() const
{
return tetPtI_;
return tetPti_;
}
......@@ -185,7 +183,7 @@ Foam::label& Foam::tetIndices::facePtB()
Foam::label& Foam::tetIndices::tetPt()
{
return tetPtI_;
return tetPti_;
}
......
......@@ -34,7 +34,6 @@ void Foam::wallBoundedParticle::patchInteraction
const scalar trackFraction
)
{
// typedef TrackData::CloudType cloudType;
typedef typename TrackData::cloudType::particleType particleType;
particleType& p = static_cast<particleType&>(*this);
......@@ -45,7 +44,7 @@ void Foam::wallBoundedParticle::patchInteraction
label origFacei = facei_;
label patchi = patch(facei_);
// No action taken for tetPtI_ for tetFacei_ here, handled by
// No action taken for tetPti_ for tetFacei_ here, handled by
// patch interaction call or later during processor transfer.
......@@ -175,7 +174,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
// Check angle to nbrCell tet. Is it in the direction of the
// endposition? I.e. since volume of nbr tet is positive the
// tracking direction should be into the tet.
tetIndices nbrTi(nbrCelli, tetFacei_, tetPtI_, mesh_);
tetIndices nbrTi(nbrCelli, tetFacei_, tetPti_, mesh_);
if ((nbrTi.faceTri(mesh_).normal() & (endPosition-position())) < 0)
{
// Change into nbrCell. No need to change tetFace, tetPt.
......
......@@ -468,7 +468,7 @@ void Foam::DSMCCloud<ParcelType>::addNewParcel
const scalar Ei,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label typeId
)
{
......@@ -480,7 +480,7 @@ void Foam::DSMCCloud<ParcelType>::addNewParcel
Ei,
celli,
tetFacei,
tetPtI,
tetPti,
typeId
);
......
......@@ -455,7 +455,7 @@ public:
const scalar Ei,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label typeId
);
......
......@@ -183,7 +183,7 @@ public:
const scalar Ei,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label typeId
);
......
......@@ -60,11 +60,11 @@ inline Foam::DSMCParcel<ParcelType>::DSMCParcel
const scalar Ei,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label typeId
)
:
ParcelType(mesh, position, celli, tetFacei, tetPtI),
ParcelType(mesh, position, celli, tetFacei, tetPti),
U_(U),
Ei_(Ei),
typeId_(typeId)
......
......@@ -44,7 +44,7 @@ Foam::dsmcParcel::dsmcParcel
const scalar Ei,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label typeId
)
:
......@@ -56,7 +56,7 @@ Foam::dsmcParcel::dsmcParcel
Ei,
celli,
tetFacei,
tetPtI,
tetPti,
typeId
)
{}
......
......@@ -68,11 +68,11 @@ public:
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const label index = 0
)
:
particle(mesh, position, celli, tetFacei, tetPtI),
particle(mesh, position, celli, tetFacei, tetPti),
index_(index)
{}
......
......@@ -50,7 +50,7 @@ Foam::particle::particle
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI
const label tetPti
)
:
mesh_(mesh),
......@@ -59,7 +59,7 @@ Foam::particle::particle
facei_(-1),
stepFraction_(0.0),
tetFacei_(tetFacei),
tetPtI_(tetPtI),
tetPti_(tetPti),
origProc_(Pstream::myProcNo()),
origId_(getNewParticleID())
{}
......@@ -79,7 +79,7 @@ Foam::particle::particle
facei_(-1),
stepFraction_(0.0),
tetFacei_(-1),
tetPtI_(-1),
tetPti_(-1),
origProc_(Pstream::myProcNo()),
origId_(getNewParticleID())
{
......@@ -98,7 +98,7 @@ Foam::particle::particle(const particle& p)
facei_(p.facei_),
stepFraction_(p.stepFraction_),
tetFacei_(p.tetFacei_),
tetPtI_(p.tetPtI_),
tetPti_(p.tetPti_),
origProc_(p.origProc_),
origId_(p.origId_)
{}
......@@ -112,7 +112,7 @@ Foam::particle::particle(const particle& p, const polyMesh& mesh)
facei_(p.facei_),
stepFraction_(p.stepFraction_),
tetFacei_(p.tetFacei_),
tetPtI_(p.tetPtI_),
tetPti_(p.tetPti_),
origProc_(p.origProc_),
origId_(p.origId_)
{}
......
......@@ -156,7 +156,7 @@ protected:
//- Index of the point on the face that defines the decomposed
// tet that the particle is in. Relative to the face base
// point.
label tetPtI_;
label tetPti_;
//- Originating processor id
label origProc_;
......@@ -189,7 +189,7 @@ protected:
const label tetPlaneBasePtI,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const scalar tol
) const;
......@@ -203,7 +203,7 @@ protected:
const label tetPlaneBasePtI,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const scalar tol
) const;
......@@ -211,12 +211,12 @@ protected:
inline void tetNeighbour(label triI);
//- Cross the from the given face across the given edge of the
// given cell to find the resulting face and tetPtI
// given cell to find the resulting face and tetPti
inline void crossEdgeConnectedFace
(
const label& celli,
label& tetFacei,
label& tetPtI,
label& tetPti,
const edge& e
);
......@@ -316,7 +316,7 @@ public:
DefinePropertyList
(
"(Px Py Pz) celli facei stepFraction "
"tetFacei tetPtI origProc origId"
"tetFacei tetPti origProc origId"
);
//- Cumulative particle counter - used to provode unique ID
......@@ -343,10 +343,10 @@ public:
const vector& position,
const label celli,
const label tetFacei,
const label tetPtI
const label tetPti
);
//- Construct from components, tetFacei_ and tetPtI_ are not
//- Construct from components, tetFacei_ and tetPti_ are not
// supplied so they will be deduced by a search
particle
(
......
......@@ -53,7 +53,7 @@ inline void Foam::particle::findTris
tetPlaneBasePtIs[i],
celli_,
tetFacei_,
tetPtI_,
tetPti_,
tol
);
......@@ -74,7 +74,7 @@ inline Foam::scalar Foam::particle::tetLambda
const label tetPlaneBasePtI,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const scalar tol
) const
{
......@@ -91,7 +91,7 @@ inline Foam::scalar Foam::particle::tetLambda
tetPlaneBasePtI,
celli,
tetFacei,
tetPtI,
tetPti,
tol
);
}
......@@ -146,7 +146,7 @@ inline Foam::scalar Foam::particle::movingTetLambda
const label tetPlaneBasePtI,
const label celli,
const label tetFacei,
const label tetPtI,
const label tetPti,
const scalar tol
) const
{
......@@ -169,7 +169,7 @@ inline Foam::scalar Foam::particle::movingTetLambda
vector n0 = Zero;
{
tetIndices tetIs(celli, tetFacei, tetPtI, mesh_);
tetIndices tetIs(celli, tetFacei, tetPti, mesh_);
// Tet at timestep start
tetPointRef tet00 = tetIs.oldTet(mesh_);
......@@ -337,7 +337,7 @@ inline void Foam::particle::tetNeighbour(label triI)
<< abort(FatalError);
}
label facePtI = (tetPtI_ + tetBasePtI) % f.size();
label facePtI = (tetPti_ + tetBasePtI) % f.size();
label otherFacePtI = f.fcIndex(facePtI);
switch (triI)
......@@ -348,7 +348,7 @@ inline void Foam::particle::tetNeighbour(label triI)
// neighbour cell over tetFacei
// Modification of celli_ will happen by other indexing,
// tetFacei_ and tetPtI don't change.
// tetFacei_ and tetPti don't change.
break;
}
......@@ -358,7 +358,7 @@ inline void Foam::particle::tetNeighbour(label triI)
(
celli_,
tetFacei_,
tetPtI_,
tetPti_,
Foam::edge(f[facePtI], f[otherFacePtI])
);
......@@ -368,9 +368,9 @@ inline void Foam::particle::tetNeighbour(label triI)
{
if (own)
{
if (tetPtI_ < f.size() - 2)
if (tetPti_ < f.size() - 2)
{
tetPtI_ = f.fcIndex(tetPtI_);
tetPti_ = f.fcIndex(tetPti_);
}
else
{
......@@ -378,16 +378,16 @@ inline void Foam::particle::tetNeighbour(label triI)
(
celli_,
tetFacei_,
tetPtI_,
tetPti_,
Foam::edge(f[tetBasePtI], f[otherFacePtI])
);
}
}
else
{
if (tetPtI_ > 1)
if (tetPti_ > 1)
{
tetPtI_ = f.rcIndex(tetPtI_);
tetPti_ = f.rcIndex(tetPti_);
}
else
{
......@@ -395,7 +395,7 @@ inline void Foam::particle::tetNeighbour(label triI)
(
celli_,
tetFacei_,
tetPtI_,
tetPti_,
Foam::edge(f[tetBasePtI], f[facePtI])
);
}
......@@ -407,9 +407,9 @@ inline void Foam::particle::tetNeighbour(label triI)
{
if (own)
{
if (tetPtI_ > 1)
if (tetPti_ > 1)
{
tetPtI_ = f.rcIndex(tetPtI_);
tetPti_ = f.rcIndex(tetPti_);
}
else
{
......@@ -417,16 +417,16 @@ inline void Foam::particle::tetNeighbour(label triI)
(
celli_,
tetFacei_,
tetPtI_,
tetPti_,
Foam::edge(f[tetBasePtI], f[facePtI])
);
}
}
else
{
if (tetPtI_ < f.size() - 2)
if (tetPti_ < f.size() - 2)
{
tetPtI_ = f.fcIndex(tetPtI_);
tetPti_ = f.fcIndex(tetPti_);
}
else
{
......@@ -434,7 +434,7 @@ inline void Foam::particle::tetNeighbour(label triI)
(
celli_,
tetFacei_,
tetPtI_,
tetPti_,
Foam::edge(f[tetBasePtI], f[otherFacePtI])
);
}
......@@ -458,7 +458,7 @@ inline void Foam::particle::crossEdgeConnectedFace
(
const label& celli,
label& tetFacei,
label& tetPtI,
label& tetPti,
const edge& e
)
{
......@@ -542,17 +542,17 @@ inline void Foam::particle::crossEdgeConnectedFace
{
// The point is the base point, so this is first tet
// in the face circulation
tetPtI = 1;
tetPti = 1;
}
else if (eIndex == otherFace.size() - 1)
{
// The point is the last before the base point, so
// this is the last tet in the face circulation
tetPtI = otherFace.size() - 2;
tetPti = otherFace.size() - 2;
}
else
{
tetPtI = eIndex;
tetPti = eIndex;
}
break;
......@@ -621,19 +621,19 @@ inline Foam::label& Foam::particle::tetFace()
inline Foam::label Foam::particle::tetPt() const
{
return tetPtI_;
return tetPti_;
}
inline Foam::label& Foam::particle::tetPt()
{
return tetPtI_;
return tetPti_;
}
inline Foam::tetIndices Foam::particle::currentTetIndices() const
{
return tetIndices(celli_, tetFacei_, tetPtI_, mesh_);
return tetIndices(celli_, tetFacei_, tetPti_, mesh_);
}
......@@ -676,21 +676,22 @@ inline void Foam::particle::initCellFacePt()
position_,
celli_,
tetFacei_,
tetPtI_
tetPti_
);
if (celli_ == -1)
if (debug && celli_ == -1)
{
FatalErrorInFunction
<< "cell, tetFace and tetPt search failure at position "
<< position_ << abort(FatalError);
WarningInFunction
<< "cell, tetFace and tetPt search failure for position "
<< position_
<< endl;
}
}
else
{
mesh_.findTetFacePt(celli_, position_, tetFacei_, tetPtI_);
mesh_.findTetFacePt(celli_, position_, tetFacei_, tetPti_);
if (tetFacei_ == -1 || tetPtI_ == -1)
if (tetFacei_ == -1 || tetPti_ == -1)
{
label oldCelli = celli_;
......@@ -699,43 +700,45 @@ inline void Foam::particle::initCellFacePt()
position_,
celli_,
tetFacei_,
tetPtI_
tetPti_
);
if (celli_ == -1 || tetFacei_ == -1 || tetPtI_ == -1)
if (celli_ == -1 || tetFacei_ == -1 || tetPti_ == -1)
{
// The particle has entered this function with a cell
// number, but hasn't been able to find a cell to
// occupy.
// The particle has entered this function with a cell number,
// but hasn't been able to find a cell to occupy.
if (!mesh_.pointInCellBB(position_, oldCelli, 0.1))
{
// If the position is not inside the (slightly
// extended) bound-box of the cell that it thought
// it should be in, then this is considered an
// error.
FatalErrorInFunction
<< "position " << position_ << nl
<< " for requested cell " << oldCelli << nl
<< " If this is a restart or "
"reconstruction/decomposition etc. it is likely that"
" the write precision is not sufficient.\n"
" Either increase 'writePrecision' or "
"set 'writeFormat' to 'binary'"
<< abort(FatalError);
// If the position is not inside the (slightly extended)
// bound-box of the cell that it thought it should be in,
// then this is considered an error.
if (debug)
{
WarningInFunction
<< "position " << position_
<< " not in specified cell " << oldCelli
<< " with centre " << mesh_.cellCentres()[oldCelli]
<< endl;
}
celli_ = -1;
tetFacei_ = -1;
tetPti_ = -1;
return;
}
// The position is in the (slightly extended)
// bound-box of the cell. This situation may arise
// because the face decomposition of the cell is not
// the same as when the particle acquired the cell
// index. For example, it has been read into a mesh
// that has made a different face base-point decision
// for a boundary face and now this particle is in a
// position that is not in the mesh. Gradually move
// the particle towards the centre of the cell that it
// thought that it was in.
// The position is in the (slightly extended) bound-box of the
// cell. This situation may arise because the face
// decomposition of the cell is not the same as when the
// particle acquired the cell index. For example, it has been
// read into a mesh that has made a different face base-point
// decision for a boundary face and now this particle is in a
// position that is not in the mesh. Gradually move the
// particle towards the centre of the cell that it thought that
// it was in.
celli_ = oldCelli;
......@@ -756,7 +759,7 @@ inline void Foam::particle::initCellFacePt()
celli_,
newPosition,
tetFacei_,
tetPtI_
tetPti_
);
iterNo++;
......@@ -777,7 +780,7 @@ inline void Foam::particle::initCellFacePt()
<< " to " << newPosition
<< " in cell " << celli_
<< " tetFace " << tetFacei_
<< " tetPt " << tetPtI_ << nl
<< " tetPt " << tetPti_ << nl
<< " (A fraction of "
<< 1.0 - mag(cC - newPosition)/mag(cC - position_)
<< " of the distance to the cell centre)"
......@@ -797,7 +800,7 @@ inline void Foam::particle::initCellFacePt()
<< " Found"
<< " cell " << celli_
<< " tetFace " << tetFacei_
<< " tetPt " << tetPtI_ << nl
<< " tetPt " << tetPti_ << nl
<< " This is a different cell to that which was supplied"
<< " (" << oldCelli << ")." << nl
<< endl;
......